1
1
FROM nvidia/cuda:10.0-devel-ubuntu18.04
2
2
3
3
# TensorFlow version is tightly coupled to CUDA and cuDNN so it should be selected carefully
4
+ ENV TENSORFLOW_VERSION=2.1.0
4
5
ENV PYTORCH_VERSION=1.3.0
5
- ENV TORCHVISION_VERSION=0.4.1
6
+ ENV TORCHVISION_VERSION=0.5.0
6
7
ENV TORCHAUDIO_VERSION=0.4.0
8
+ ENV TORCHTEXT_VERSION=0.5.0
7
9
ENV TENSORBOARDX_VERSION=1.9
8
- ENV CUDNN_VERSION=7.6.0.64-1+cuda10.0
10
+ ENV MXNET_VERSION=1.5.1
11
+ ARG CUDA=10.0
12
+ ARG LIBNVINFER=6.0.1-1
13
+ ARG LIBNVINFER_MAJOR_VERSION=6
14
+ ENV CUDNN_VERSION=7.6.4.38-1+cuda10.0
9
15
ENV NCCL_VERSION=2.4.8-1+cuda10.0
10
16
ENV DEBIAN_FRONTEND=noninteractive
11
17
ENV mecab_dicdir /usr/local/lib/mecab/dic/mecab-ko-dic
12
18
13
- # Python 2.7 or 3.6 is supported by Ubuntu Bionic out of the box
19
+ # Python 2.7 or 3.67 is supported by Ubuntu Bionic out of the box
14
20
ARG python=3.6
15
21
ENV PYTHON_VERSION=${python}
16
22
17
23
ENV PYTHONUNBUFFERED=1 \
18
- LD_LIBRARY_PATH="/usr/local/cuda/lib64:/usr/local/nvidia/lib64" \
24
+ LD_LIBRARY_PATH="/usr/local/cuda/extras/CUPTI/ lib64:/usr/local/cuda/lib64:/usr/local/ nvidia/lib64:/usr/local/cuda/lib64/stubs:/usr/include/x64_64-linux-gnu " \
19
25
PATH="/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/bin/mecab" \
20
26
LANG=C.UTF-8
21
27
@@ -44,6 +50,16 @@ RUN apt-get update -y && \
44
50
libmpdec2 \
45
51
pdsh curl sudo net-tools \
46
52
iputils-ping \
53
+ libcublas10=10.2.1.243-1 \
54
+ libcublas-dev=10.2.1.243-1 \
55
+ cuda-command-line-tools-${CUDA/./-} \
56
+ cuda-nvrtc-${CUDA/./-} \
57
+ cuda-nvrtc-dev-${CUDA/./-} \
58
+ cuda-cudart-dev-${CUDA/./-} \
59
+ cuda-cufft-dev-${CUDA/./-} \
60
+ cuda-curand-dev-${CUDA/./-} \
61
+ cuda-cusolver-dev-${CUDA/./-} \
62
+ cuda-cusparse-dev-${CUDA/./-} \
47
63
libcudnn7=${CUDNN_VERSION} \
48
64
libnccl2=${NCCL_VERSION} \
49
65
libnccl-dev=${NCCL_VERSION} \
@@ -72,12 +88,22 @@ RUN apt-get update -y && \
72
88
libfreetype6-dev \
73
89
fonts-nanum \
74
90
fonts-nanum-coding \
75
- fonts-nanum-extra
91
+ fonts-nanum-extra && \
92
+ find /usr/local/cuda-${CUDA}/lib64/ -type f -name 'lib*_static.a' -not -name 'libcudart_static.a' -delete
93
+ # && rm /usr/lib/x86_64-linux-gnu/libcudnn_static_v7.a
76
94
77
95
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - && \
78
96
apt-get update -y && \
79
97
apt-get install -y nodejs
80
98
99
+ RUN apt-get update && \
100
+ apt-get install -y --no-install-recommends libnvinfer${LIBNVINFER_MAJOR_VERSION}=${LIBNVINFER}+cuda${CUDA} \
101
+ libnvinfer-dev=${LIBNVINFER}+cuda${CUDA} \
102
+ libnvinfer-plugin-dev=${LIBNVINFER}+cuda${CUDA} \
103
+ libnvinfer-plugin${LIBNVINFER_MAJOR_VERSION}=${LIBNVINFER}+cuda${CUDA} \
104
+ && apt-get clean \
105
+ && rm -rf /var/lib/apt/lists/*
106
+
81
107
# OFED
82
108
ENV STAGE_DIR=/tmp
83
109
RUN mkdir -p ${STAGE_DIR}
@@ -118,34 +144,37 @@ RUN curl https://bootstrap.pypa.io/get-pip.py | python3 && \
118
144
# Install TensorFlow, Keras, PyTorch and MXNet
119
145
RUN python3 -m pip install pip --no-cache-dir -Iv \
120
146
Cython==0.29.13 \
121
- numpy==1.16.5 \
147
+ numpy==1.16.3 \
122
148
scipy==1.4.1 \
123
149
scikit-image==0.16.2 \
124
- scikit-learn==0.21.3 \
125
- matplotlib==3.1.3 \
150
+ scikit-learn==0.22.2 \
126
151
tornado==6.0.4 \
127
152
pystan==2.19.1.1 \
128
- notebook==6.0.3
129
-
130
- RUN python3 -m pip install --no-cache-dir \
153
+ pycairo==1.19.0 \
154
+ matplotlib==3.1.3
155
+ RUN python3 -m pip install pip --no-cache-dir \
156
+ Cartopy==0.17.0 \
157
+ notebook==6.0.3
158
+
159
+ WORKDIR /tmp
160
+ COPY ./requirements.20.01.txt /tmp
161
+ RUN python3 -m pip install --no-cache-dir -Ir requirements.20.01.txt
162
+
163
+ RUN python3 -m pip install pip --no-cache-dir \
164
+ pandas==1.0.1 \
131
165
https://download.pytorch.org/whl/cu100/torch-${PYTORCH_VERSION}%2Bcu100-cp36-cp36m-linux_x86_64.whl \
132
166
https://download.pytorch.org/whl/cu100/torchvision-${TORCHVISION_VERSION}%2Bcu100-cp36-cp36m-linux_x86_64.whl \
133
- https://download.pytorch.org/whl/torchaudio-${TORCHAUDIO_VERSION}-cp36-cp36m-linux_x86_64.whl && \
167
+ https://download.pytorch.org/whl/torchaudio-${TORCHAUDIO_VERSION}-cp36-cp36m-linux_x86_64.whl \
168
+ torchtext==${TORCHTEXT_VERSION} && \
134
169
python3 -m pip install --no-cache-dir tensorboardX==${TENSORBOARDX_VERSION}
170
+
135
171
RUN python3 -m pip install --no-cache-dir --extra-index-url \
136
172
https://developer.download.nvidia.com/compute/redist/cuda/10.0 \
137
- nvidia-dali
138
-
139
- WORKDIR /tmp
140
- COPY ./requirements.20.03.txt /tmp
141
- RUN python3 -m pip install --no-cache-dir -Ir requirements.20.03.txt
173
+ nvidia-dali
142
174
143
175
RUN python3 -m pip install --no-cache-dir -Iv \
144
- tensorwatch==0.8.10 \
145
- jupyterlab-nvdashboard==0.2.0 \
146
- && \
147
- python3 -m pip install --no-cache-dir konlpy h5py && \
148
- rm -f /tmp/*.whl /tmp/requirements.20.03.txt
176
+ konlpy h5py && \
177
+ rm -f /tmp/*.whl /tmp/requirements.20.01.txt
149
178
150
179
RUN apt-get update && \
151
180
apt-get install -y \
@@ -272,44 +301,6 @@ RUN git clone --recursive https://github.com/Microsoft/LightGBM && \
272
301
cd ../python-package && \
273
302
python3 setup.py install --precompile
274
303
275
- # add 19.09.06
276
- RUN git clone https://github.com/scikit-optimize/scikit-optimize.git && \
277
- cd scikit-optimize && \
278
- python3 -m pip install -r requirements.txt && \
279
- python3 setup.py develop
280
-
281
- RUN python3 -m pip install --no-cache-dir imbalanced-learn && \
282
- python3 -m pip install --no-cache-dir bayesian-optimization && \
283
- python3 -m pip install --no-cache-dir scikit-plot && \
284
- python3 -m pip install --no-cache-dir vecstack && \
285
- python3 -m pip install --no-cache-dir category_encoders && \
286
- python3 -m pip install --no-cache-dir scikit-surprise && \
287
- python3 -m pip install --no-cache-dir folium && \
288
- python3 -m pip install --no-cache-dir lime && \
289
- python3 -m pip install --no-cache-dir pyldavis && \
290
- python3 -m pip install --no-cache-dir mlxtend && \
291
- python3 -m pip install --no-cache-dir dtreeviz && \
292
- python3 -m pip install --no-cache-dir pyglet && \
293
- python3 -m pip install --no-cache-dir descartes && \
294
- python3 -m pip install --no-cache-dir pydot && \
295
- python3 -m pip install --no-cache-dir tpot && \
296
- python3 -m pip install --no-cache-dir catboost && \
297
- rm -rf /root/.cache && \
298
- rm -f /tmp/*.whl
299
-
300
- # Jupyter notebook extension
301
- RUN mkdir -p /home/work/.jupyter/nbextension
302
- WORKDIR /home/work/.jupyter/nbextension
303
-
304
- RUN jupyter nbextensions_configurator enable && \
305
- jupyter contrib nbextension install && \
306
- jupyter nbextension enable --py --sys-prefix widgetsnbextension && \
307
- jupyter contrib nbextension install && \
308
- jupyter serverextension enable --py jupyterlab --sys-prefix && \
309
- jupyter labextension install @jupyter-widgets/jupyterlab-manager && \
310
- git clone https://github.com/lambdalisue/jupyter-vim-binding vim_binding && \
311
- jupyter nbextension enable /home/work/.jupyter/nbextension/vim_binding/vim_binding
312
-
313
304
# Install Open MPI
314
305
RUN mkdir /tmp/openmpi && \
315
306
cd /tmp/openmpi && \
@@ -320,7 +311,7 @@ RUN mkdir /tmp/openmpi && \
320
311
make -j $(nproc) all && \
321
312
make install && \
322
313
ldconfig && \
323
- rm -rf /tmp/openmpi
314
+ rm -rf /tmp/openmp*i
324
315
325
316
# Install Horovod, temporarily using CUDA stubs
326
317
RUN ldconfig /usr/local/cuda/targets/x86_64-linux/lib/stubs && \
@@ -331,8 +322,10 @@ RUN ldconfig /usr/local/cuda/targets/x86_64-linux/lib/stubs && \
331
322
332
323
RUN python3 -m pip install --no-cache-dir \
333
324
mpi4py==3.0.3 \
334
- nni
335
-
325
+ nni && \
326
+ rm -rf /root/.cache && \
327
+ rm -rf /tmp/*
328
+
336
329
# Install OpenSSH for MPI to communicate between containers
337
330
RUN apt-get install -y --no-install-recommends openssh-client openssh-server && \
338
331
mkdir -p /var/run/sshd
@@ -343,9 +336,22 @@ RUN cat /etc/ssh/ssh_config | grep -v StrictHostKeyChecking > /etc/ssh/ssh_confi
343
336
mv /etc/ssh/ssh_config.new /etc/ssh/ssh_config
344
337
345
338
# Install ipython kernelspec
346
- RUN python3 -m ipykernel install --display-name "PyTorch 1.3 on Python 3.6 (CUDA 10.0)" && \
339
+ Run python3 -m ipykernel install --display-name "PyTorch 1.3 on Python 3.6 (CUDA 10.0)" && \
347
340
cat /usr/local/share/jupyter/kernels/python3/kernel.json
348
341
342
+ # Jupyter notebook extension
343
+ RUN mkdir -p /home/work/.jupyter/nbextension
344
+ WORKDIR /home/work/.jupyter/nbextension
345
+
346
+ RUN jupyter nbextensions_configurator enable && \
347
+ jupyter contrib nbextension install && \
348
+ jupyter nbextension enable --py --sys-prefix widgetsnbextension && \
349
+ jupyter contrib nbextension install && \
350
+ jupyter serverextension enable --py jupyterlab --sys-prefix && \
351
+ jupyter labextension install @jupyter-widgets/jupyterlab-manager && \
352
+ git clone https://github.com/lambdalisue/jupyter-vim-binding vim_binding && \
353
+ jupyter nbextension enable /home/work/.jupyter/nbextension/vim_binding/vim_binding
354
+
349
355
# Backend.AI specifics
350
356
LABEL ai.backend.kernelspec="1" \
351
357
ai.backend.envs.corecount="OPENBLAS_NUM_THREADS,OMP_NUM_THREADS,NPROC" \
@@ -357,7 +363,7 @@ LABEL ai.backend.kernelspec="1" \
357
363
ai.backend.resource.min.cuda.shares=0.1 \
358
364
ai.backend.runtime-type="python" \
359
365
ai.backend.runtime-path="/usr/bin/python3" \
360
- ai.backend.service-ports="ipython:pty:3000,jupyter:http:8070 ,jupyterlab:http:8090"
366
+ ai.backend.service-ports="ipython:pty:3000,tensorboard:http:6006, jupyter:http:8080 ,jupyterlab:http:8090"
361
367
362
368
WORKDIR /home/work
363
369
# vim: ft=dockerfile
0 commit comments