@@ -6,6 +6,7 @@ ARG LIBNVINFER=6.0.1-1
6
6
ARG LIBNVINFER_MAJOR_VERSION=6
7
7
ARG CUDNN=7.6.5.32-1
8
8
ENV NCCL_VERSION=2.7.6-1+cuda10.1
9
+ ENV CUDNN_VERSION 7.6.5.32
9
10
10
11
# Python 2.7 or 3.6 is supported by Ubuntu Bionic out of the box
11
12
ARG python=3.6
@@ -42,7 +43,6 @@ RUN apt-get update -y && \
42
43
libssl-dev \
43
44
libmpdec2 \
44
45
pdsh curl net-tools \
45
- iputils-ping \
46
46
cuda-command-line-tools-${CUDA/./-} \
47
47
libcublas10=10.2.1.243-1 \
48
48
libcublas-dev=10.2.1.243-1 \
@@ -57,6 +57,7 @@ RUN apt-get update -y && \
57
57
libcudnn7-dev=${CUDNN}+cuda${CUDA} \
58
58
libnccl2=${NCCL_VERSION} \
59
59
libnccl-dev=${NCCL_VERSION} \
60
+ iputils-ping \
60
61
libcurl3-dev \
61
62
libfreetype6-dev \
62
63
libhdf5-serial-dev \
@@ -74,6 +75,9 @@ RUN apt-get update -y && \
74
75
proj-bin libproj-dev libgeos-dev libgeos++-dev graphviz \
75
76
python${PYTHON_VERSION} \
76
77
python${PYTHON_VERSION}-dev \
78
+ libxml2-dev \
79
+ libxslt1-dev \
80
+ libasound2-dev \
77
81
libnuma-dev \
78
82
libjasper-dev \
79
83
libtiff-dev \
@@ -97,7 +101,7 @@ RUN ln -s /usr/local/cuda/lib64/stubs/libcuda.so /usr/local/cuda/lib64/stubs/lib
97
101
&& echo "/usr/local/cuda/lib64/stubs" > /etc/ld.so.conf.d/z-cuda-stubs.conf \
98
102
&& ldconfig
99
103
100
- # Install CUDA-10.1 + cuDNN 7.6.0
104
+ # Install CUDA-10.1 + cuDNN 7.6
101
105
RUN ln -s /usr/local/cuda-10.1 /usr/local/cuda && \
102
106
ln -s /usr/lib/x86_64-linux-gnu/libcudnn.so.7.6.0 /usr/local/cuda/lib64/libcudnn.so && \
103
107
ldconfig
@@ -107,12 +111,17 @@ RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - && \
107
111
apt-get install -y nodejs
108
112
109
113
RUN apt-get update && \
110
- apt-get install -y --no-install-recommends libnvinfer${LIBNVINFER_MAJOR_VERSION}=${LIBNVINFER}+cuda${CUDA} \
114
+ apt-get install -y --no-install-recommends \
115
+ libnvinfer${LIBNVINFER_MAJOR_VERSION}=${LIBNVINFER}+cuda${CUDA} \
111
116
libnvinfer-dev=${LIBNVINFER}+cuda${CUDA} \
112
117
libnvinfer-plugin-dev=${LIBNVINFER}+cuda${CUDA} \
113
- libnvinfer-plugin${LIBNVINFER_MAJOR_VERSION}=${LIBNVINFER}+cuda${CUDA} \
114
- && apt-get clean \
115
- && rm -rf /var/lib/apt/lists/*
118
+ libnvinfer-plugin${LIBNVINFER_MAJOR_VERSION}=${LIBNVINFER}+cuda${CUDA} && \
119
+ apt-get clean && \
120
+ rm -rf /var/lib/apt/lists/*
121
+
122
+ # Add OpenCL ICD files for LightGBM
123
+ RUN mkdir -p /etc/OpenCL/vendors && \
124
+ echo "libnvidia-opencl.so.1" > /etc/OpenCL/vendors/nvidia.icd
116
125
117
126
# OFED
118
127
ENV STAGE_DIR=/tmp
@@ -131,10 +140,10 @@ RUN mkdir -p ${STAGE_DIR} && \
131
140
cd ${STAGE_DIR}/nv_peer_memory && \
132
141
./build_module.sh && \
133
142
cd ${STAGE_DIR} && \
134
- tar xzf ${STAGE_DIR}/nvidia-peer-memory_1.0 .orig.tar.gz && \
135
- cd ${STAGE_DIR}/nvidia-peer-memory-1.0 && \
143
+ tar xzf ${STAGE_DIR}/nvidia-peer-memory_1.1 .orig.tar.gz && \
144
+ cd ${STAGE_DIR}/nvidia-peer-memory-1.1 && \
136
145
dpkg-buildpackage -us -uc && \
137
- dpkg -i ${STAGE_DIR}/nvidia-peer-memory_1.0-9_all .deb
146
+ dpkg -i ${STAGE_DIR}/nvidia-peer-memory_1.1-0_all .deb
138
147
139
148
RUN if [[ "${PYTHON_VERSION}" == "3.6" ]]; then \
140
149
apt-get install -y python${PYTHON_VERSION}-distutils python-apt ; \
@@ -179,8 +188,15 @@ RUN python3 -m pip install pip --no-cache-dir \
179
188
WORKDIR /tmp
180
189
COPY ./requirements.20.08.txt /tmp
181
190
RUN python3 -m pip install --no-cache-dir --upgrade -r requirements.20.08.txt && \
191
+ python3 -m pip install --no-cache-dir tensorflow_model_analysis && \
192
+ python3 -m pip uninstall -y tensorboard tensorboard-plugin-wit tensorflow tensorflow-gpu \
193
+ tensorflow-estimator tensorflow-addons tensorflow-datasets \
194
+ tensorflow-gan tensorflow-hub tensorflow-metadata \
195
+ tensorflow-probability tensorflow-text \
196
+ tensorflow-model-analysis tensorflow-serving-api && \
182
197
rm -f /tmp/*.whl /tmp/requirements.20.08.txt
183
198
199
+ # install NLP packages *mecab-ko & khai*
184
200
RUN apt-get update && \
185
201
apt-get install -y \
186
202
openjdk-8-jdk \
@@ -239,15 +255,15 @@ RUN ln -s /usr/include/libv4l1-videodev.h /usr/include/linux/videodev.h && \
239
255
apt-get clean && \
240
256
rm -rf /var/lib/apt/lists/
241
257
242
- RUN wget https://github.com/Kitware/CMake/releases/download/v3.15.3 /cmake-3.15.3 -Linux-x86_64.sh \
258
+ RUN wget https://github.com/Kitware/CMake/releases/download/v3.18.1 /cmake-3.18.1 -Linux-x86_64.sh \
243
259
-q -O /tmp/cmake-install.sh && \
244
260
chmod u+x /tmp/cmake-install.sh && \
245
261
mkdir /usr/bin/cmake && \
246
262
/tmp/cmake-install.sh --skip-license --prefix=/usr/bin/cmake && \
247
263
rm /tmp/cmake-install.sh
248
264
249
265
WORKDIR /tmp
250
- ENV OPENCV_VERSION="4.3 .0"
266
+ ENV OPENCV_VERSION="4.4 .0"
251
267
RUN wget https://github.com/opencv/opencv/archive/${OPENCV_VERSION}.zip && \
252
268
wget -O opencv-contrib.zip https://github.com/opencv/opencv_contrib/archive/${OPENCV_VERSION}.zip && \
253
269
unzip ${OPENCV_VERSION}.zip && \
@@ -272,7 +288,7 @@ RUN wget https://github.com/opencv/opencv/archive/${OPENCV_VERSION}.zip && \
272
288
-D WITH_V4L=ON \
273
289
-D BUILD_TESTS=OFF \
274
290
-D BUILD_PERF_TESTS=OFF \
275
- -D OPENCV_EXTRA_MODULES_PATH="../../opencv_contrib-4.3 .0/modules" \
291
+ -D OPENCV_EXTRA_MODULES_PATH="../../opencv_contrib-4.4 .0/modules" \
276
292
-D CMAKE_BUILD_TYPE=RELEASE \
277
293
-D CMAKE_INSTALL_PREFIX=$(python3 -c "import sys; print(sys.prefix)") \
278
294
-D PYTHON_EXECUTABLE=$(which python3) \
@@ -325,30 +341,39 @@ RUN cat /etc/ssh/ssh_config | grep -v StrictHostKeyChecking > /etc/ssh/ssh_confi
325
341
echo " StrictHostKeyChecking no" >> /etc/ssh/ssh_config.new && \
326
342
mv /etc/ssh/ssh_config.new /etc/ssh/ssh_config
327
343
344
+ # Create a wrapper for OpenMPI to allow running as root by default
345
+ RUN mv /usr/local/bin/mpirun /usr/local/bin/mpirun.real && \
346
+ echo '#!/bin/bash' > /usr/local/bin/mpirun && \
347
+ echo 'mpirun.real --allow-run-as-root "$@"' >> /usr/local/bin/mpirun && \
348
+ chmod a+x /usr/local/bin/mpirun
349
+
350
+ # Configure OpenMPI to run good defaults:
351
+ RUN echo "btl_tcp_if_exclude = lo,docker0" >> /usr/local/etc/openmpi-mca-params.conf
352
+
353
+ # Install OpenSSH for MPI to communicate between containers
354
+ RUN mkdir -p /var/run/sshd
355
+
356
+ # Allow OpenSSH to talk to containers without asking for confirmation
357
+ RUN cat /etc/ssh/ssh_config | grep -v StrictHostKeyChecking > /etc/ssh/ssh_config.new && \
358
+ echo " StrictHostKeyChecking no" >> /etc/ssh/ssh_config.new && \
359
+ mv /etc/ssh/ssh_config.new /etc/ssh/ssh_config
360
+
361
+ # install git-lfs
362
+ WORKDIR /tmp
363
+ RUN curl -sLO https://github.com/git-lfs/git-lfs/releases/download/v2.11.0/git-lfs-linux-amd64-v2.11.0.tar.gz && \
364
+ tar -zxf git-lfs-linux-amd64-v2.11.0.tar.gz && \
365
+ bash install.sh && \
366
+ rm -rf /tmp/*
367
+
328
368
COPY ./service-defs /etc/backend.ai/service-defs
329
369
RUN curl -fL https://github.com/cdr/code-server/releases/download/v3.4.1/code-server-3.4.1-linux-amd64.tar.gz \
330
370
| tar -C /usr/local/lib -xz && \
331
371
mv /usr/local/lib/code-server-3.4.1-linux-amd64 /usr/local/lib/code-server-3.4.1 && \
332
372
ln -s /usr/local/lib/code-server-3.4.1/bin/code-server /usr/local/bin/code-server
333
- #COPY ./vscode-exts.tar.gz /etc/backend.ai/vscode-exts.tar.gz
334
-
335
- #RUN mkdir -p /etc/backend.ai/vscode-exts && \
336
- # tar xvzf /etc/backend.ai/vscode-exts.tar.gz -C /etc/backend.ai/vscode-exts && \
337
- # rm -rf /etc/backend.ai/vscode-exts.tar.gz
338
-
339
- RUN apt autoclean && \
340
- rm -rf /var/lib/apt/lists/* && \
341
- rm -rf /root/.cache && \
342
- rm -rf /tmp/*
343
-
344
- # Jupyter notebook extension
345
- RUN mkdir -p /home/work/.jupyter/nbextension
346
- WORKDIR /home/work/.jupyter/nbextension
347
373
348
374
RUN jupyter nbextensions_configurator enable && \
349
375
jupyter contrib nbextension install && \
350
376
jupyter nbextension enable --py --sys-prefix widgetsnbextension && \
351
- jupyter contrib nbextension install && \
352
377
jupyter serverextension enable --py jupyterlab --sys-prefix && \
353
378
jupyter labextension install --no-build @jupyter-widgets/jupyterlab-manager && \
354
379
# git clone https://github.com/lambdalisue/jupyter-vim-binding vim_binding && \
@@ -358,14 +383,16 @@ RUN jupyter nbextensions_configurator enable && \
358
383
jupyter serverextension enable --py jupyter_lsp && \
359
384
jupyter labextension install --no-build @jupyterlab/toc && \
360
385
# jupyter labextension install @jupyterlab/hdf5
361
- jupyter nbextension enable --py tensorflow_model_analysis \
386
+ jupyter nbextension enable execute_time/ExecuteTime && \
387
+ jupyter nbextension enable toc2/main && \
388
+ jupyter labextension install @pyviz/jupyterlab_pyviz && \
389
+ jupyter labextension install @bokeh/jupyter_bokeh && \
362
390
jupyter labextension install --no-build jupyterlab-nvdashboard && \
363
391
jupyter lab build
364
392
365
- RUN curl -sLO https://github.com/git-lfs/git-lfs/releases/download/v2.11.0/git-lfs-linux-amd64-v2.11.0.tar.gz && \
366
- tar -zxf git-lfs-linux-amd64-v2.11.0.tar.gz && \
367
- mv git-lfs-2.11.0/git-lfs /usr/bin/ && \
368
- rm -rf git-lfs-2.11.0 && \
369
- rm -rf git-lfs-linux-amd64-2.11.0.tar.gz
393
+ RUN apt autoclean && \
394
+ rm -rf /var/lib/apt/lists/* && \
395
+ rm -rf /root/.cache && \
396
+ rm -rf /tmp/*
370
397
371
398
WORKDIR /home/work
0 commit comments