1
- FROM nvidia/cuda:11.1-cudnn8-devel-ubuntu18.04
1
+ 2FROM nvidia/cuda:11.1-cudnn8-devel-ubuntu18.04
2
2
3
3
# TensorFlow version is tightly coupled to CUDA and cuDNN so it should be selected carefully
4
4
ARG CUDA=11.1
5
- ARG LIBNVINFER=7.2.2 -1
5
+ ARG LIBNVINFER=7.2.3 -1
6
6
ARG LIBNVINFER_MAJOR_VERSION=7
7
7
ARG CUDNN=8.0.5.39-1
8
- ENV NCCL=2.8.3
9
- ENV NCCL_VERSION=2.8.3 -1+cuda11.1
8
+ ENV NCCL=2.8.4
9
+ ENV NCCL_VERSION=2.8.4 -1+cuda11.1
10
10
ENV CUDNN_VERSION 8.0.5.43
11
11
ENV MLNX_OFED_VERSION=5.1-2.3.7.1
12
12
ENV MKL_VERSION=2020.3
13
13
ENV MKL_BUILD=279
14
- ENV NUMPY_VERSION 1.19.4
15
- ENV SCIPY_VERSION 1.5.4
16
- ENV OPENMPI 4.0.5
17
- # Python 2.7 or 3.6 is supported by Ubuntu Bionic out of the box
14
+ ENV NUMPY_VERSION 1.20.2
15
+ ENV SCIPY_VERSION 1.6.2
16
+ ENV OPENMPI 4.1.0
17
+ # Python 3.6 is supported by Ubuntu Bionic out of the box
18
18
ARG python=3.6
19
19
ENV PYTHON_VERSION=${python}
20
20
@@ -23,10 +23,10 @@ ENV DEBIAN_FRONTEND=noninteractive \
23
23
CPLUS_INCLUDE_PATH=/usr/include/gdal \
24
24
C_INCLUDE_PATH=/usr/include/gdal \
25
25
PYTHONUNBUFFERED=1 \
26
- LIBRARY_PATH=" /usr/local/cuda/lib64/stubs" \
26
+ LIBRARY_PATH=/usr/local/cuda/lib64/stubs \
27
27
_CUDA_COMPAT_PATH="/usr/local/cuda/compat" \
28
28
LD_LIBRARY_PATH="/usr/local/cuda/extras/CUPTI/lib64:/usr/local/cuda/compat/lib:/usr/local/nvidia/lib:/usr/local/nvidia/lib64:/usr/local/cuda/lib64:/usr/include/x86_64-linux-gnu:/opt/intel/compilers_and_libraries_2020.3.279/linux/mkl/lib/intel64" \
29
- PATH="/usr/local/mpi/bin:/ur /local/ucx:/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/bin/cmake/bin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/tensorrt/bin:/usr/local/src/lightgbm/LightGBM:/usr/local/bin/mecab" \
29
+ PATH="/usr/local/mpi/bin:/usr /local/ucx:/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/bin/cmake/bin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/tensorrt/bin:/usr/local/src/lightgbm/LightGBM:/usr/local/bin/mecab" \
30
30
mecab_dicdir=/usr/local/lib/mecab/dic/mecab-ko-dic \
31
31
LANG=C.UTF-8
32
32
@@ -45,71 +45,79 @@ RUN rm -fr /var/lib/apt/lists/* && \
45
45
wget https://apt.repos.intel.com/setup/intelproducts.list -O /etc/apt/sources.list.d/intelproducts.list && \
46
46
apt-get update -y && \
47
47
apt-get install -y --allow-downgrades --allow-change-held-packages --no-install-recommends \
48
- build-essential \
48
+ bashtop \
49
49
ca-certificates \
50
- gcc g++ make \
51
- gfortran \
50
+ curl \
52
51
dkms \
53
- git \
54
- vim \
55
- htop bashtop \
56
- yasm \
57
- wget zip unzip \
58
- openssh-client openssh-server \
59
- libssl-dev \
60
- libmpdec2 \
61
- pdsh curl net-tools \
52
+ fonts-nanum \
53
+ fonts-nanum-coding \
54
+ fonts-nanum-extra \
55
+ g++ \
56
+ gfortran \
57
+ htop \
58
+ intel-mkl-2020.3-111 intel-ipp-2020.2-108 intel-tbb-2020.3-108 intel-daal-2020.2-108 intel-mpi-2019.8-108 \
62
59
iputils-ping \
60
+ libasound2-dev \
61
+ libavcodec-dev \
62
+ libboost-dev \
63
+ libboost-filesystem-dev \
64
+ libboost-system-dev \
65
+ libcairo2-dev libgirepository1.0-dev pkg-config gir1.2-gtk-3.0 \
66
+ libgdal-dev python3-gdal \
67
+ libjasper-dev \
68
+ libnuma-dev \
69
+ libopenblas-dev liblapack-dev \
70
+ libsm6 \
71
+ libswscale-dev \
72
+ libv4l-dev \
73
+ libxext6 \
74
+ libxine2-dev \
75
+ libxml2-dev \
76
+ libxrender-dev \
77
+ libxslt1-dev \
78
+ make \
79
+ mime-support \
80
+ net-tools \
81
+ openssh-server \
82
+ pdsh \
83
+ proj-bin libproj-dev libgeos-dev libgeos++-dev graphviz \
84
+ subversion \
85
+ unzip \
86
+ xvfb \
87
+ xz-utils \
88
+ yasm \
89
+ zip \
90
+ openssh-client \
91
+ build-essential \
92
+ gcc \
93
+ git \
94
+ libavformat-dev \
63
95
libcurl3-dev \
64
96
libfreetype6-dev \
97
+ libgeos-dev libgeos++-dev \
65
98
libhdf5-serial-dev \
66
- libzmq3-dev \
67
99
libjpeg-dev \
100
+ libmpdec2 \
68
101
libpng-dev \
69
- libsm6 \
70
- libxext6 \
71
- libxrender-dev \
72
- libgdal-dev python3-gdal \
73
102
libsdl-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev \
74
103
libsmpeg-dev libportmidi-dev libavformat-dev libswscale-dev \
75
- libcairo2-dev libgirepository1.0-dev pkg-config gir1.2-gtk-3.0 \
76
- libgeos-dev libgeos++-dev \
104
+ libssl-dev \
105
+ libtiff-dev \
106
+ libzmq3-dev \
77
107
pkg-config \
78
- zlib1g-dev \
79
- mime-support \
80
- intel-mkl-2020.3-111 intel-ipp-2020.2-108 intel-tbb-2020.3-108 intel-daal-2020.2-108 intel-mpi-2019.8-108 \
81
- proj-bin libproj-dev libgeos-dev libgeos++-dev graphviz \
82
108
python${PYTHON_VERSION} \
83
109
python${PYTHON_VERSION}-dev \
84
- libxml2-dev \
85
- libxslt1-dev \
86
- libasound2-dev \
87
- libnuma-dev \
88
- libjasper-dev \
89
- libtiff-dev \
90
- libavcodec-dev \
91
- libavformat-dev \
92
- libswscale-dev \
93
- libxine2-dev \
94
- libv4l-dev \
95
- libboost-dev \
96
- libboost-system-dev \
97
- libboost-filesystem-dev \
98
- libopenblas-dev liblapack-dev \
99
- xvfb \
100
- xz-utils \
101
- fonts-nanum \
102
- fonts-nanum-coding \
103
- fonts-nanum-extra \
104
- && \
110
+ vim \
111
+ wget \
112
+ zlib1g-dev && \
105
113
echo "/opt/intel/daal/lib/intel64" >> /etc/ls.so.conf && \
106
114
echo "/opt/intel/ipp/lib/intel64" >> /etc/ls.so.conf && \
107
115
echo "/opt/intel/lib/intel64" >> /etc/ls.so.conf && \
108
116
echo "/opt/intel/mkl/lib/intel64" >> /etc/ls.so.conf && \
109
117
find /usr/local/cuda-${CUDA}/lib64/ -type f -name 'lib*_static.a' -not -name 'libcudart_static.a' -delete
110
118
111
119
WORKDIR /tmp
112
- RUN curl -fsSL https://developer.download.nvidia.com/compute/redist/nccl/v2.8/nccl_2.8.3 -1+cuda11.1_x86_64.txz -O && \
120
+ RUN curl -fsSL https://developer.download.nvidia.com/compute/redist/nccl/v2.8/nccl_2.8.4 -1+cuda11.1_x86_64.txz -O && \
113
121
tar --no-same-owner --keep-old-files --lzma -xvf nccl_${NCCL}-1+cuda11.1_x86_64.txz -C /usr/local/cuda/lib64/ --strip-components=2 --wildcards '*/lib/libnccl.so.*' && \
114
122
tar --no-same-owner --keep-old-files --lzma -xvf nccl_${NCCL}-1+cuda11.1_x86_64.txz -C /usr/lib/pkgconfig/ --strip-components=3 --wildcards '*/lib/pkgconfig/*' && \
115
123
rm nccl_${NCCL}-1+cuda11.1_x86_64.txz && \
@@ -124,7 +132,7 @@ RUN ln -s /usr/local/cuda-11.1 /usr/local/cuda && \
124
132
ln -s /usr/lib/x86_64-linux-gnu/libcudnn.so.8.0.5 /usr/local/cuda/lib64/libcudnn.so && \
125
133
ldconfig
126
134
127
- RUN curl -sL https://deb.nodesource.com/setup_10 .x | bash - && \
135
+ RUN curl -sL https://deb.nodesource.com/setup_12 .x | bash - && \
128
136
apt-get update -y && \
129
137
apt-get install -y nodejs
130
138
@@ -161,6 +169,14 @@ RUN git clone https://github.com/Mellanox/nv_peer_memory.git /tmp/nv_peer_memory
161
169
dpkg-buildpackage -us -uc && \
162
170
dpkg -i /tmp/nvidia-peer-memory_1.1-0_all.deb
163
171
172
+ RUN wget https://github.com/Kitware/CMake/releases/download/v3.20.0/cmake-3.20.0-Linux-x86_64.sh \
173
+ -q -O /tmp/cmake-install.sh && \
174
+ chmod u+x /tmp/cmake-install.sh && \
175
+ mkdir /usr/bin/cmake && \
176
+ /tmp/cmake-install.sh --skip-license --prefix=/usr/bin/cmake && \
177
+ rm /tmp/cmake-install.sh
178
+
179
+ # Oracle client
164
180
RUN mkdir -p /opt/oracle && \
165
181
cd /opt/oracle && \
166
182
apt-get clean && \
@@ -179,26 +195,20 @@ RUN if [[ "${PYTHON_VERSION}" == "3.6" ]]; then \
179
195
apt-get install -y python${PYTHON_VERSION}-distutils python-apt ; \
180
196
fi
181
197
182
- RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 2
183
-
184
-
185
-
198
+ RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 1
186
199
187
200
WORKDIR /tmp
188
201
RUN curl https://bootstrap.pypa.io/get-pip.py | python3 && \
189
- python3 -m pip install --no-cache-dir -U setuptools pip==20.3.2
190
-
191
- RUN python3 -m pip install --no-cache-dir \
192
- Cython==0.29.21 \
193
- tornado==6.1 \
194
- nvidia-pyindex==1.0.5 \
195
- matplotlib==3.3.3
202
+ python3 -m pip install --no-cache-dir -U setuptools pip && \
203
+ python3 -m pip install --no-cache-dir cython pybind11
196
204
197
205
WORKDIR /tmp
206
+ # OpenBlas
198
207
RUN git clone -q --branch=master git://github.com/xianyi/OpenBLAS.git && \
199
208
cd OpenBLAS && \
200
209
make DYNAMIC_ARCH=1 NO_AFFINITY=1 NUM_THREADS=48 FC=gfortran && \
201
210
make install
211
+ # Numpy
202
212
RUN git clone --branch=v${NUMPY_VERSION} --depth=1 https://github.com/numpy/numpy.git numpy && \
203
213
cd numpy && \
204
214
git checkout -b v${NUMPY_VERSION} && \
@@ -210,7 +220,7 @@ RUN git clone --branch=v${NUMPY_VERSION} --depth=1 https://github.com/numpy/nump
210
220
echo "lapack_libs =" >> site.cfg && \
211
221
python3 setup.py bdist_wheel -d /tmp
212
222
213
- # Install scipy
223
+ # Scipy
214
224
RUN cd /tmp && \
215
225
git clone --branch=v${SCIPY_VERSION} --depth=1 https://github.com/scipy/scipy.git scipy && \
216
226
cd scipy && \
@@ -221,12 +231,12 @@ RUN cd /tmp && \
221
231
echo "library_dirs = /opt/intel/compilers_and_libraries_2020.3.279/linux/mkl/lib/intel64" >> site.cfg && \
222
232
echo "mkl_libs = mkl_rt" >> site.cfg && \
223
233
echo "lapack_libs =" >> site.cfg && \
224
- python3 -m pip install -U --no-cache-dir /tmp/numpy-1.19.4-cp36-cp36m-linux_x86_64 .whl && \
234
+ python3 -m pip install -U --no-cache-dir /tmp/numpy-* .whl && \
225
235
python3 setup.py install
226
236
RUN cd /tmp && \
227
237
git clone --recursive https://github.com/bodono/scs-python.git && \
228
238
cd scs-python && \
229
- python setup.py install --scs --gpu
239
+ python3 setup.py install --scs --gpu
230
240
231
241
# install NLP packages *mecab-ko & khai*
232
242
RUN apt-get update && \
@@ -257,15 +267,10 @@ RUN echo "Install mecab-ko-dic" && \
257
267
git clone https://bitbucket.org/eunjeon/mecab-python-0.996.git && \
258
268
python3 -m pip install /tmp/mecab-python-0.996
259
269
260
- RUN python3 -m pip install pip --no-cache-dir \
261
- Cartopy==0.18.0 \
262
- nvidia-dlprof \
263
- notebook==6.0.3
264
-
265
270
WORKDIR /tmp
266
- COPY ./requirements.txt /tmp
267
- RUN python3 -m pip install --no-cache-dir -r requirements.txt && \
268
- rm -f /tmp/requirements.txt
271
+ COPY ./requirements.py38. txt /tmp
272
+ RUN python3 -m pip install --no-cache-dir -r requirements.py38. txt && \
273
+ rm -f /tmp/*.whl /tmp/ requirements.py38 .txt
269
274
270
275
# OpenCV
271
276
RUN ln -s /usr/include/libv4l1-videodev.h /usr/include/linux/videodev.h && \
@@ -296,13 +301,6 @@ RUN ln -s /usr/include/libv4l1-videodev.h /usr/include/linux/videodev.h && \
296
301
apt-get clean && \
297
302
rm -rf /var/lib/apt/lists/
298
303
299
- RUN wget https://github.com/Kitware/CMake/releases/download/v3.19.2/cmake-3.19.2-Linux-x86_64.sh \
300
- -q -O /tmp/cmake-install.sh && \
301
- chmod u+x /tmp/cmake-install.sh && \
302
- mkdir /usr/bin/cmake && \
303
- /tmp/cmake-install.sh --skip-license --prefix=/usr/bin/cmake && \
304
- rm /tmp/cmake-install.sh
305
-
306
304
WORKDIR /tmp
307
305
ENV OPENCV_VERSION="4.5.1"
308
306
RUN wget https://github.com/opencv/opencv/archive/${OPENCV_VERSION}.zip && \
@@ -360,9 +358,9 @@ RUN cd /usr/local/src && mkdir lightgbm && cd lightgbm && \
360
358
361
359
# Install Open UCX
362
360
WORKDIR /tmp
363
- RUN wget https://github.com/openucx/ucx/archive/v1.9 .0.tar.gz && \
364
- tar xvf v1.9 .0.tar.gz && \
365
- cd ucx-1.9 .0 && \
361
+ RUN wget https://github.com/openucx/ucx/archive/v1.10 .0.tar.gz && \
362
+ tar xvf v1.10 .0.tar.gz && \
363
+ cd ucx-1.10 .0 && \
366
364
bash ./autogen.sh && \
367
365
mkdir build && \
368
366
cd build && \
@@ -373,7 +371,7 @@ RUN wget https://github.com/openucx/ucx/archive/v1.9.0.tar.gz && \
373
371
# Install Open MPI
374
372
RUN mkdir /tmp/openmpi && \
375
373
cd /tmp/openmpi && \
376
- wget https://www .open-mpi.org/software/ompi /v4.0/downloads /openmpi-${OPENMPI}.tar.gz && \
374
+ wget https://download .open-mpi.org/release/open-mpi /v4.1 /openmpi-${OPENMPI}.tar.gz && \
377
375
tar zxf openmpi-${OPENMPI}.tar.gz && \
378
376
cd openmpi-${OPENMPI} && \
379
377
./configure --enable-orterun-prefix-by-default --with-cuda --with-ucx=/usr/local/ucx --enable-mca-no-build=btl-uct && \
@@ -383,11 +381,10 @@ RUN mkdir /tmp/openmpi && \
383
381
rm -rf /tmp/openmpi*
384
382
385
383
# Install OpenSSH for MPI to communicate between containers
386
- RUN apt-get install -y --no-install-recommends openssh-client openssh-server && \
387
- mkdir -p /var/run/sshd
388
384
389
385
# Allow OpenSSH to talk to containers without asking for confirmation
390
- RUN cat /etc/ssh/ssh_config | grep -v StrictHostKeyChecking > /etc/ssh/ssh_config.new && \
386
+ RUN mkdir -p /var/run/sshd && \
387
+ cat /etc/ssh/ssh_config | grep -v StrictHostKeyChecking > /etc/ssh/ssh_config.new && \
391
388
echo " StrictHostKeyChecking no" >> /etc/ssh/ssh_config.new && \
392
389
mv /etc/ssh/ssh_config.new /etc/ssh/ssh_config
393
390
@@ -400,27 +397,20 @@ RUN mv /usr/local/bin/mpirun /usr/local/bin/mpirun.real && \
400
397
# Configure OpenMPI to run good defaults:
401
398
RUN echo "btl_tcp_if_exclude = lo,docker0" >> /usr/local/etc/openmpi-mca-params.conf
402
399
403
- # Install OpenSSH for MPI to communicate between containers
404
- RUN mkdir -p /var/run/sshd
405
-
406
- # Allow OpenSSH to talk to containers without asking for confirmation
407
- RUN cat /etc/ssh/ssh_config | grep -v StrictHostKeyChecking > /etc/ssh/ssh_config.new && \
408
- echo " StrictHostKeyChecking no" >> /etc/ssh/ssh_config.new && \
409
- mv /etc/ssh/ssh_config.new /etc/ssh/ssh_config
410
-
411
- # install git-lfs
400
+ # Install git-lfs
412
401
WORKDIR /tmp
413
- RUN curl -sLO https://github.com/git-lfs/git-lfs/releases/download/v2.13.1 /git-lfs-linux-amd64-v2.13.1 .tar.gz && \
414
- tar -zxf git-lfs-linux-amd64-v2.13.1 .tar.gz && \
402
+ RUN curl -sLO https://github.com/git-lfs/git-lfs/releases/download/v2.13.3 /git-lfs-linux-amd64-v2.13.3 .tar.gz && \
403
+ tar -zxf git-lfs-linux-amd64-v2.13.3 .tar.gz && \
415
404
bash install.sh && \
416
405
rm -rf /tmp/*
417
406
418
- COPY ./service-defs /etc/backend.ai/service-defs
419
- RUN curl -fL https://github.com/cdr/code-server/releases/download/v3.8.0 /code-server-3.8.0 -linux-amd64.tar.gz \
407
+ # Install VSCode
408
+ RUN curl -fL https://github.com/cdr/code-server/releases/download/v3.9.2 /code-server-3.9.2 -linux-amd64.tar.gz \
420
409
| tar -C /usr/local/lib -xz && \
421
- mv /usr/local/lib/code-server-3.8.0 -linux-amd64 /usr/local/lib/code-server-3.8.0 && \
422
- ln -s /usr/local/lib/code-server-3.8.0 /bin/code-server /usr/local/bin/code-server
410
+ mv /usr/local/lib/code-server-3.9.2 -linux-amd64 /usr/local/lib/code-server-3.9.2 && \
411
+ ln -s /usr/local/lib/code-server-3.9.2 /bin/code-server /usr/local/bin/code-server
423
412
413
+ # Install Jupyterlab extensions
424
414
RUN jupyter nbextensions_configurator enable && \
425
415
jupyter contrib nbextension install && \
426
416
jupyter nbextension enable --py --sys-prefix widgetsnbextension && \
@@ -429,18 +419,17 @@ RUN jupyter nbextensions_configurator enable && \
429
419
jupyter labextension install --no-build @krassowski/jupyterlab-lsp && \
430
420
jupyter serverextension enable --py jupyter_lsp && \
431
421
jupyter labextension install --no-build @jupyterlab/toc && \
432
- # jupyter labextension install @jupyterlab/hdf5
433
422
jupyter nbextension enable execute_time/ExecuteTime && \
434
423
jupyter nbextension enable toc2/main && \
435
424
jupyter labextension install @pyviz/jupyterlab_pyviz && \
436
425
jupyter labextension install @bokeh/jupyter_bokeh && \
437
426
jupyter labextension install --no-build jupyterlab-nvdashboard && \
438
427
jupyter lab build
439
428
429
+ # Clean up
440
430
RUN apt autoclean && \
441
431
ln -s /usr/local/cuda-11.1/targets/x86_64-linux/lib/libcusolver.so.11 /usr/local/cuda-11.1/targets/x86_64-linux/lib/libcusolver.so.10 && \
442
432
sed -i 's/source \/ usr\/ local\/ nvm\/ nvm.sh//' /etc/bash.bashrc && \
443
- python3 -m pip uninstall -y tensorboard-plugin-wit && \
444
433
rm -rf /var/lib/apt/lists/* && \
445
434
rm -rf /root/.cache && \
446
435
rm -rf /tmp/*
0 commit comments