-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile.ubuntu
282 lines (249 loc) · 10.7 KB
/
Dockerfile.ubuntu
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
# FROM fedora:33
#RUN dnf install -y gcc-c++ gcc make git \
# bzip2 hwloc-devel blas blas-devel lapack lapack-devel boost-devel \
# libatomic which vim-enhanced wget zlib-devel cmake \
# python3-flake8 gdb sudo python3 python3-pip openmpi-devel sqlite-devel sqlite \
# findutils openssl-devel papi papi-devel lm_sensors-devel tbb-devel \
# xz bzip2 patch flex openssh-server \
# texlive-xetex texlive-bibtex texlive-adjustbox texlive-caption texlive-collectbox \
# texlive-enumitem texlive-environ texlive-eurosym texlive-jknapltx texlive-parskip \
# texlive-pgf texlive-rsfs texlive-tcolorbox texlive-titling texlive-trimspaces \
# texlive-ucs texlive-ulem texlive-upquote texlive-latex pandoc
FROM ubuntu:22.04
ENV DEBIAN_FRONTEND noninteractive
RUN apt update -y && apt install -y bzip2 libhwloc-dev vim git gdb python3 python3-pip \
libpapi-dev patch cmake libblas-dev liblapack-dev libtbb-dev patch npm \
libglew-dev libboost-all-dev \
t1-xfree86-nonfree ttf-xfree86-nonfree ttf-xfree86-nonfree-syriac xfonts-75dpi xfonts-100dpi \
dpkg-dev cmake g++ gcc binutils libx11-dev libxpm-dev libxft-dev libxext-dev imagemagick \
&& apt clean
ARG CPUS
ARG BUILD_TYPE
WORKDIR /
## ENV GCC_VER 8.4.0
## COPY install-from-spack.sh /usr/local/bin
## RUN bash /usr/local/bin/install-from-spack.sh
## COPY alternatives.sh /usr/local/bin
## RUN bash /usr/local/bin/alternatives.sh
# ENV AH_VER 4.6.0
# RUN curl -kLO https://www.dyninst.org/sites/default/files/downloads/harmony/ah-${AH_VER}.tar.gz
# RUN tar -xzf ah-${AH_VER}.tar.gz
# WORKDIR /activeharmony-${AH_VER}
# COPY ./activeharmony-4.6.0/code-server/code_generator.cxx code-server/code_generator.cxx
# RUN make CFLAGS=-fPIC LDFLAGS=-fPIC && make install prefix=/usr/local/activeharmony
# ENV OTF2_VER 2.1.1
# WORKDIR /
# RUN curl -kLO https://www.vi-hps.org/cms/upload/packages/otf2/otf2-${OTF2_VER}.tar.gz
# RUN tar -xzf otf2-${OTF2_VER}.tar.gz
# WORKDIR otf2-${OTF2_VER}
# RUN ./configure --prefix=/usr/local/otf2 --enable-shared && make && make install
#RUN ln -s /usr/lib64/openmpi/lib/libmpi_cxx.so /usr/lib64/openmpi/lib/libmpi_cxx.so.1
#RUN ln -s /usr/lib64/openmpi/lib/libmpi.so /usr/lib64/openmpi/lib/libmpi.so.12
#ENV PYVER 3.6.8
#WORKDIR /
#RUN wget https://www.python.org/ftp/python/${PYVER}/Python-${PYVER}.tgz
#RUN tar xf Python-${PYVER}.tgz
#WORKDIR /Python-${PYVER}
#RUN ./configure
#RUN make -j ${CPUS} install
## Make headers available
#RUN cp /Python-${PYVER}/pyconfig.h /Python-${PYVER}/Include
#RUN ln -s /Python-${PYVER}/Include /usr/include/python${PYVER}
#RUN pip3 install --trusted-host pypi.org --trusted-host files.pythonhosted.org numpy tensorflow keras CNTK pytest
#RUN pip3 install numpy tensorflow keras CNTK pytest
WORKDIR /
#RUN dnf install -y python3-devel
WORKDIR /
RUN git clone --depth 1 https://github.com/pybind/pybind11.git && \
mkdir -p /pybind11/build && \
cd /pybind11/build && \
cmake -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DPYBIND11_PYTHON_VERSION=${PYVER} .. && \
make -j ${CPUS} install && \
rm -f $(find . -name \*.o)
RUN git clone --depth 1 https://bitbucket.org/blaze-lib/blaze.git && \
cd /blaze && \
mkdir -p /blaze/build && \
cd /blaze/build && \
cmake -DCMAKE_BUILD_TYPE=${BUILD_TYPE} .. && \
make -j ${CPUS} install && \
rm -f $(find . -name \*.o)
RUN git clone --depth 1 https://github.com/STEllAR-GROUP/blaze_tensor.git && \
mkdir -p /blaze_tensor/build && \
cd /blaze_tensor/build && \
cmake -DCMAKE_BUILD_TYPE=${BUILD_TYPE} .. && \
make -j ${CPUS} install && \
rm -f $(find . -name \*.o)
WORKDIR /etc/skel
#COPY ./notebooks/*.ipynb ./
#RUN git clone --depth 1 https://github.com/shortcourse/USACM16-shortcourse
RUN git clone --depth 1 https://github.com/shortcourse/WCCM-APCOM-22
RUN find . | xargs -d '\n' chmod +r
#RUN dnf install -y nodejs psmisc tbb-devel
RUN pip3 install --upgrade pip
RUN pip3 install jupyter jupyterhub matplotlib numpy termcolor
ENV DATE 2020-03-10
RUN mkdir -p /usr/install/cling
WORKDIR /usr/install/cling
RUN git clone --branch cling-patches http://root.cern.ch/git/llvm.git src
WORKDIR /usr/install/cling/src
RUN git checkout ac712f0f44b45a1455a302dd6cbb7b6cce269d2d
WORKDIR /usr/install/cling/src/tools
RUN git clone http://root.cern.ch/git/cling.git
WORKDIR /usr/install/cling/src/tools/cling
RUN git checkout 2949bf96b71f9301247275a8097a060aae3429f4
WORKDIR /usr/install/cling/src/tools
RUN git clone --branch cling-patches http://root.cern.ch/git/clang.git
WORKDIR /usr/install/cling/src/tools/clang
RUN git checkout 25f804797f80b69d8c56794e3e0300acd9458958
WORKDIR /usr/install/cling/src/tools/cling
RUN mkdir -p /usr/install/cling/src/build
COPY Pipe.hpp /usr/local/include/
COPY Augment_Kernel.hpp /usr/local/include
COPY Kernel.cpp /usr/install/cling/src/tools/cling/tools/Jupyter
WORKDIR /usr/install/cling/src/build
RUN cmake -DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_FLAGS='-Wl,-s' \
-DLLVM_ENABLE_RTTI=ON \
-DLLVM_ENABLE_EH=ON \
/usr/install/cling/src
# RUN dnf install -y patch
WORKDIR /usr/install/cling/src
COPY limits.patch .
RUN patch -p1 < limits.patch
WORKDIR /usr/install/cling/src/tools/cling
COPY noexcept.patch ./
RUN patch -p1 < noexcept.patch
WORKDIR /usr/install/cling/src/build
COPY make.sh /usr/install/cling/src/build/
RUN bash ./make.sh
RUN cd /usr/install/cling/src/tools/cling/tools/Jupyter/kernel && \
pip3 install -e . && \
jupyter-kernelspec install cling-cpp17 && \
npm install -g configurable-http-proxy
WORKDIR /usr
## ENV CLING cling_2020-11-05_ROOT-fedora32
## ENV CLING_TARBALL ${CLING}.tar.bz2
## RUN curl -LO https://root.cern/download/cling/${CLING_TARBALL} && \
## tar xjf ${CLING_TARBALL} && \
## rm -f ${CLING_TARBALL}
## WORKDIR /usr/${CLING}/share/cling/Jupyter/kernel
## RUN pip3 install -e . && \
## jupyter-kernelspec install cling-cpp17 && \
## npm install -g configurable-http-proxy && \
## ln -s /usr/${CLING}/bin/cling /usr/bin/cling
RUN git clone -b 1.8.1 --depth 1 https://github.com/STEllAR-GROUP/hpx.git /hpx
WORKDIR /hpx
RUN mkdir -p /hpx/build
WORKDIR /hpx/build
#RUN env CXX=$(which clang++) cmake -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
RUN cmake -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-DHPX_FILESYSTEM_WITH_BOOST_FILESYSTEM_COMPATIBILITY=ON \
-DHPX_WITH_CXX17_HARDWARE_DESTRUCTIVE_INTERFERENCE_SIZE=OFF \
-DHPX_WITH_FETCH_ASIO=ON \
-DHPX_WITH_BUILTIN_INTEGER_PACK=OFF \
-DHPX_WITH_ITTNOTIFY=OFF \
-DHPX_WITH_THREAD_COMPATIBILITY=ON \
-DHPX_WITH_MALLOC=system \
-DHPX_WITH_MORE_THAN_64_THREADS=ON \
-DHPX_WITH_MAX_CPU_COUNT=80 \
-DHPX_WITH_EXAMPLES=Off \
-DHPX_WITH_CXX_STANDARD=17 \
-DCMAKE_BUILD_TYPE=RelWithDebugInfo \
.. && \
make -j ${CPUS} install && \
rm -f $(find . -name \*.o)
RUN mkdir -p /hpx/build2
WORKDIR /hpx/build2
#RUN env CXX=$(which clang++) cmake -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
RUN cmake -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-DHPX_FILESYSTEM_WITH_BOOST_FILESYSTEM_COMPATIBILITY=ON \
-DHPX_WITH_CXX17_HARDWARE_DESTRUCTIVE_INTERFERENCE_SIZE=OFF \
-DHPX_WITH_FETCH_ASIO=ON \
-DHPX_WITH_BUILTIN_INTEGER_PACK=OFF \
-DHPX_WITH_ITTNOTIFY=OFF \
-DHPX_WITH_THREAD_COMPATIBILITY=ON \
-DHPX_WITH_MALLOC=system \
-DHPX_WITH_MORE_THAN_64_THREADS=ON \
-DHPX_WITH_MAX_CPU_COUNT=80 \
-DHPX_WITH_EXAMPLES=Off \
-DHPX_WITH_CXX_STANDARD=20 \
-DHPX_WITH_DATAPAR_BACKEND=STD_EXPERIMENTAL_SIMD \
-DCMAKE_BUILD_TYPE=RelWithDebugInfo \
-DCMAKE_INSTALL_PREFIX=/usr/local/hpx-corot \
.. && \
make -j ${CPUS} install && \
rm -f $(find . -name \*.o)
## RUN (make -j 8 install 2>&1 | tee make.out)
COPY ./run_hpx.cpp /usr/include/run_hpx.cpp
RUN chmod 644 /usr/include/run_hpx.cpp
RUN pip3 install oauthenticator
#RUN dnf install -y procps cppcheck python3-pycurl sqlite python3-libs
COPY ./login.html /usr/local/share/jupyterhub/templates/login.html
COPY ./login2.html /root
COPY ./stellar-logo.png /usr/local/share/jupyterhub/static/images/
ENV PYTHONPATH /usr/local/python
RUN mkdir -p /usr/local/python
COPY ./mkuser.py ${PYTHONPATH}/mkuser.py
COPY ./mkuser.py /usr/local/bin/mkuser
RUN chmod 755 /usr/local/bin/mkuser
RUN pip3 install tornado #==5.1.1 # There's a bug in newer versions
COPY ./clingk.py /usr/${CLING}/share/cling/Jupyter/kernel/clingkernel.py
RUN python3 -c 'import sys; print(sys.path[-1])' > /tmp/path.txt
COPY ./find.py ${PYTHONPATH}/
COPY ./pipes1.py ${PYTHONPATH}/
COPY ./pipes3.py ${PYTHONPATH}/
COPY ./cling.py ${PYTHONPATH}/
COPY ./py11.py ${PYTHONPATH}/
RUN python3 ${PYTHONPATH}/find.py > /usr/hpx-libs.txt
#RUN cp /Python-${PYVER}/pyconfig.h /Python-${PYVER}/Include
#RUN ln -s /Python-${PYVER}/Include /usr/include/python${PYVER}
WORKDIR /
RUN git clone --depth 1 https://github.com/STEllAR-GROUP/BlazeIterative
WORKDIR /BlazeIterative/build
RUN cmake ..
RUN make install
# For some reason, HPX will not link in @py11() unless I do this
RUN ldconfig /usr/local/lib64
WORKDIR /notebooks
COPY ./notebk.sh ./
WORKDIR /root
RUN chmod 755 .
COPY ./startup.sh startup.sh
COPY ./jup-config.py jup-config.py
# For authentication if we aren't using OAuth
RUN git clone -b v1.2 --depth 1 https://github.com/stevenrbrandt/cyolauthenticator.git
RUN pip3 install git+https://github.com/stevenrbrandt/[email protected]
# Use this CMD for a jupyterhub
# CMD bash startup.sh
COPY clingk.py /usr/install/cling/src/tools/cling/tools/Jupyter/kernel/clingkernel.py
# RUN ln -s /usr/${CLING}/lib/libclingJupyter.so /usr/lib/libclingJupyter.so
# RUN ln -s /usr/${CLING}/lib/clang /usr/lib/clang
# RUN ln -s /usr/${CLING}/include/cling /usr/include/cling
RUN echo "export PYTHONPATH=${PYTHONPATH}" >> /etc/bashrc
#RUN dnf install -y ImageMagick file hostname
COPY is_expr.py /usr/local/python
COPY cin.py /usr/local/python
COPY logo.png /usr/local/share/jupyterhub/static/images/
COPY teleplot.hpp /usr/include
COPY ./Dockerfile /Dockerfile
# Not sure why this makes sense
RUN ln -s /usr/lib/x86_64-linux-gnu/libboost_system.so.1.74.0 /usr/lib64/libboost_system.so.1.0.0
RUN python3 -m pip install piraha==1.1.7
COPY ./notebooks/*.ipynb /etc/skel/
RUN useradd -m jovyan -s /bin/bash
USER jovyan
WORKDIR /home/jovyan
ENV LD_LIBRARY_PATH /home/jovyan/install/phylanx/lib64:/usr/local/lib64:/home/jovyan/install/phylanx/lib/phylanx:/usr/lib64/openmpi/lib
RUN mkdir -p /home/jovyan/bot
COPY bot/cxxbot.py /home/jovyan/bot/
COPY bot/teleplot.py /home/jovyan/bot/
COPY bot/telecling.py /home/jovyan/bot/
COPY bot/thumbsup.png /home/jovyan/bot/
COPY bot/colored.py /home/jovyan/bot/
RUN pip3 install --user randpass python-telegram-bot
WORKDIR /home/jovyan
COPY nb.py /root/
COPY hpxcxx /usr/local/bin/
COPY vector_pack_type.hpp /usr/local/include/hpx/execution/traits/detail/simd/vector_pack_type.hpp
CMD bash /notebooks/notebk.sh