Skip to content

Commit 5c6b2e7

Browse files
committed
update nvidia peer
1 parent e47ba57 commit 5c6b2e7

File tree

1 file changed

+60
-33
lines changed

1 file changed

+60
-33
lines changed

commons/Dockerfile.base.20.08-py36-cuda10.1

Lines changed: 60 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ ARG LIBNVINFER=6.0.1-1
66
ARG LIBNVINFER_MAJOR_VERSION=6
77
ARG CUDNN=7.6.5.32-1
88
ENV NCCL_VERSION=2.7.6-1+cuda10.1
9+
ENV CUDNN_VERSION 7.6.5.32
910

1011
# Python 2.7 or 3.6 is supported by Ubuntu Bionic out of the box
1112
ARG python=3.6
@@ -42,7 +43,6 @@ RUN apt-get update -y && \
4243
libssl-dev \
4344
libmpdec2 \
4445
pdsh curl net-tools \
45-
iputils-ping \
4646
cuda-command-line-tools-${CUDA/./-} \
4747
libcublas10=10.2.1.243-1 \
4848
libcublas-dev=10.2.1.243-1 \
@@ -57,6 +57,7 @@ RUN apt-get update -y && \
5757
libcudnn7-dev=${CUDNN}+cuda${CUDA} \
5858
libnccl2=${NCCL_VERSION} \
5959
libnccl-dev=${NCCL_VERSION} \
60+
iputils-ping \
6061
libcurl3-dev \
6162
libfreetype6-dev \
6263
libhdf5-serial-dev \
@@ -74,6 +75,9 @@ RUN apt-get update -y && \
7475
proj-bin libproj-dev libgeos-dev libgeos++-dev graphviz \
7576
python${PYTHON_VERSION} \
7677
python${PYTHON_VERSION}-dev \
78+
libxml2-dev \
79+
libxslt1-dev \
80+
libasound2-dev \
7781
libnuma-dev \
7882
libjasper-dev \
7983
libtiff-dev \
@@ -97,7 +101,7 @@ RUN ln -s /usr/local/cuda/lib64/stubs/libcuda.so /usr/local/cuda/lib64/stubs/lib
97101
&& echo "/usr/local/cuda/lib64/stubs" > /etc/ld.so.conf.d/z-cuda-stubs.conf \
98102
&& ldconfig
99103

100-
# Install CUDA-10.1 + cuDNN 7.6.0
104+
# Install CUDA-10.1 + cuDNN 7.6
101105
RUN ln -s /usr/local/cuda-10.1 /usr/local/cuda && \
102106
ln -s /usr/lib/x86_64-linux-gnu/libcudnn.so.7.6.0 /usr/local/cuda/lib64/libcudnn.so && \
103107
ldconfig
@@ -107,12 +111,17 @@ RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - && \
107111
apt-get install -y nodejs
108112

109113
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} \
111116
libnvinfer-dev=${LIBNVINFER}+cuda${CUDA} \
112117
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
116125

117126
# OFED
118127
ENV STAGE_DIR=/tmp
@@ -131,10 +140,10 @@ RUN mkdir -p ${STAGE_DIR} && \
131140
cd ${STAGE_DIR}/nv_peer_memory && \
132141
./build_module.sh && \
133142
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 && \
136145
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
138147

139148
RUN if [[ "${PYTHON_VERSION}" == "3.6" ]]; then \
140149
apt-get install -y python${PYTHON_VERSION}-distutils python-apt ; \
@@ -179,8 +188,15 @@ RUN python3 -m pip install pip --no-cache-dir \
179188
WORKDIR /tmp
180189
COPY ./requirements.20.08.txt /tmp
181190
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 && \
182197
rm -f /tmp/*.whl /tmp/requirements.20.08.txt
183198

199+
# install NLP packages *mecab-ko & khai*
184200
RUN apt-get update && \
185201
apt-get install -y \
186202
openjdk-8-jdk \
@@ -239,15 +255,15 @@ RUN ln -s /usr/include/libv4l1-videodev.h /usr/include/linux/videodev.h && \
239255
apt-get clean && \
240256
rm -rf /var/lib/apt/lists/
241257

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 \
243259
-q -O /tmp/cmake-install.sh && \
244260
chmod u+x /tmp/cmake-install.sh && \
245261
mkdir /usr/bin/cmake && \
246262
/tmp/cmake-install.sh --skip-license --prefix=/usr/bin/cmake && \
247263
rm /tmp/cmake-install.sh
248264

249265
WORKDIR /tmp
250-
ENV OPENCV_VERSION="4.3.0"
266+
ENV OPENCV_VERSION="4.4.0"
251267
RUN wget https://github.com/opencv/opencv/archive/${OPENCV_VERSION}.zip && \
252268
wget -O opencv-contrib.zip https://github.com/opencv/opencv_contrib/archive/${OPENCV_VERSION}.zip && \
253269
unzip ${OPENCV_VERSION}.zip && \
@@ -272,7 +288,7 @@ RUN wget https://github.com/opencv/opencv/archive/${OPENCV_VERSION}.zip && \
272288
-D WITH_V4L=ON \
273289
-D BUILD_TESTS=OFF \
274290
-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" \
276292
-D CMAKE_BUILD_TYPE=RELEASE \
277293
-D CMAKE_INSTALL_PREFIX=$(python3 -c "import sys; print(sys.prefix)") \
278294
-D PYTHON_EXECUTABLE=$(which python3) \
@@ -325,30 +341,39 @@ RUN cat /etc/ssh/ssh_config | grep -v StrictHostKeyChecking > /etc/ssh/ssh_confi
325341
echo " StrictHostKeyChecking no" >> /etc/ssh/ssh_config.new && \
326342
mv /etc/ssh/ssh_config.new /etc/ssh/ssh_config
327343

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+
328368
COPY ./service-defs /etc/backend.ai/service-defs
329369
RUN curl -fL https://github.com/cdr/code-server/releases/download/v3.4.1/code-server-3.4.1-linux-amd64.tar.gz \
330370
| tar -C /usr/local/lib -xz && \
331371
mv /usr/local/lib/code-server-3.4.1-linux-amd64 /usr/local/lib/code-server-3.4.1 && \
332372
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
347373

348374
RUN jupyter nbextensions_configurator enable && \
349375
jupyter contrib nbextension install && \
350376
jupyter nbextension enable --py --sys-prefix widgetsnbextension && \
351-
jupyter contrib nbextension install && \
352377
jupyter serverextension enable --py jupyterlab --sys-prefix && \
353378
jupyter labextension install --no-build @jupyter-widgets/jupyterlab-manager && \
354379
# git clone https://github.com/lambdalisue/jupyter-vim-binding vim_binding && \
@@ -358,14 +383,16 @@ RUN jupyter nbextensions_configurator enable && \
358383
jupyter serverextension enable --py jupyter_lsp && \
359384
jupyter labextension install --no-build @jupyterlab/toc && \
360385
# 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 && \
362390
jupyter labextension install --no-build jupyterlab-nvdashboard && \
363391
jupyter lab build
364392

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/*
370397

371398
WORKDIR /home/work

0 commit comments

Comments
 (0)