Skip to content

Commit 9059713

Browse files
committed
fixed dependency
1 parent 95fe65a commit 9059713

File tree

1 file changed

+34
-34
lines changed

1 file changed

+34
-34
lines changed

commons/Dockerfile.base.py38-cuda10.2

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
FROM nvidia/cuda:10.1-cudnn7-devel-ubuntu18.04
1+
FROM nvidia/cuda:10.2-cudnn7-devel-ubuntu18.04
22

33
# TensorFlow version is tightly coupled to CUDA and cuDNN so it should be selected carefully
4-
ARG CUDA=10.1
5-
ARG LIBNVINFER=6.0.1-1
6-
ARG LIBNVINFER_MAJOR_VERSION=6
7-
ARG CUDNN=7.6.5.32-1
8-
ENV NCCL=2.6.4
9-
ENV NCCL_VERSION=2.6.4-1+cuda10.1
10-
ENV CUDNN_VERSION 7.6.5.32
4+
ARG CUDA=10.2
5+
ARG LIBNVINFER=7.2.3-1
6+
ARG LIBNVINFER_MAJOR_VERSION=7
7+
ARG CUDNN=8.0.5.32-1
8+
ENV NCCL=2.9.8
9+
ENV NCCL_VERSION=2.9.8-1+cuda10.2
10+
ENV CUDNN_VERSION 8.0.5.32
1111
ENV MLNX_OFED_VERSION=5.1-2.3.7.1
1212
ENV MKL_VERSION=2020.3
1313
ENV MKL_BUILD=279
@@ -33,6 +33,7 @@ ENV DEBIAN_FRONTEND=noninteractive \
3333
# Set default shell to /bin/bash
3434
SHELL ["/bin/bash", "-cu"]
3535

36+
WORKDIR /tmp
3637
RUN rm -fr /var/lib/apt/lists/* && \
3738
apt-get update -y && \
3839
apt-get install -y --no-install-recommends software-properties-common wget && \
@@ -41,8 +42,14 @@ RUN rm -fr /var/lib/apt/lists/* && \
4142
add-apt-repository -y ppa:bashtop-monitor/bashtop && \
4243
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB && \
4344
apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB && \
45+
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-ubuntu1804.pin && \
46+
apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB && \
4447
rm GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB && \
4548
wget https://apt.repos.intel.com/setup/intelproducts.list -O /etc/apt/sources.list.d/intelproducts.list && \
49+
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-ubuntu1804.pin && \
50+
mv cuda-ubuntu1804.pin /etc/apt/preferences.d/cuda-repository-pin-600 && \
51+
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub && \
52+
add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/ /" && \
4653
apt-get update -y && \
4754
apt-get install -y --allow-downgrades --allow-change-held-packages --no-install-recommends \
4855
bashtop \
@@ -78,6 +85,7 @@ RUN rm -fr /var/lib/apt/lists/* && \
7885
make \
7986
mime-support \
8087
net-tools \
88+
ncurses-term \
8189
openssh-server \
8290
pdsh \
8391
proj-bin libproj-dev libgeos-dev libgeos++-dev graphviz \
@@ -107,42 +115,36 @@ RUN rm -fr /var/lib/apt/lists/* && \
107115
pkg-config \
108116
python${PYTHON_VERSION} \
109117
python${PYTHON_VERSION}-dev \
118+
libnccl2=${NCCL_VERSION} \
119+
libnccl-dev=${NCCL_VERSION} \
110120
vim \
111121
wget \
112122
zlib1g-dev && \
113123
echo "/opt/intel/daal/lib/intel64" >> /etc/ls.so.conf && \
114124
echo "/opt/intel/ipp/lib/intel64" >> /etc/ls.so.conf && \
115125
echo "/opt/intel/lib/intel64" >> /etc/ls.so.conf && \
116126
echo "/opt/intel/mkl/lib/intel64" >> /etc/ls.so.conf && \
117-
find /usr/local/cuda-${CUDA}/lib64/ -type f -name 'lib*_static.a' -not -name 'libcudart_static.a' -delete
118-
119-
WORKDIR /tmp
120-
RUN curl -fsSL https://developer.download.nvidia.com/compute/redist/nccl/v2.6/nccl_2.6.4-1+cuda10.1_x86_64.txz -O && \
121-
tar --no-same-owner --keep-old-files --lzma -xvf nccl_${NCCL}-1+cuda10.1_x86_64.txz -C /usr/local/cuda/lib64/ --strip-components=2 --wildcards '*/lib/libnccl.so.*' && \
122-
tar --no-same-owner --keep-old-files --lzma -xvf nccl_${NCCL}-1+cuda10.1_x86_64.txz -C /usr/lib/pkgconfig/ --strip-components=3 --wildcards '*/lib/pkgconfig/*' && \
123-
rm nccl_${NCCL}-1+cuda10.1_x86_64.txz && \
124-
ldconfig
125-
126-
RUN ln -s /usr/local/cuda/lib64/stubs/libcuda.so /usr/local/cuda/lib64/stubs/libcuda.so.1 && \
127+
find /usr/local/cuda-${CUDA}/lib64/ -type f -name 'lib*_static.a' -not -name 'libcudart_static.a' -delete && \
128+
ln -s /usr/local/cuda/lib64/stubs/libcuda.so /usr/local/cuda/lib64/stubs/libcuda.so.1 && \
127129
echo "/usr/local/cuda/lib64/stubs" > /etc/ld.so.conf.d/z-cuda-stubs.conf && \
128-
ldconfig
129130

130-
# Install CUDA-10.1 + cuDNN 7.6.5
131-
RUN ln -s /usr/local/cuda-10.1 /usr/local/cuda && \
132-
ln -s /usr/lib/x86_64-linux-gnu/libcudnn.so.7.6.5 /usr/local/cuda/lib64/libcudnn.so && \
131+
# Install CUDA-10.2 + cuDNN 8.0.5
132+
ln -s /usr/local/cuda-10.2 /usr/local/cuda && \
133+
ln -s /usr/lib/x86_64-linux-gnu/libcudnn.so.8.0.5 /usr/local/cuda/lib64/libcudnn.so && \
133134
ldconfig
134135

135136
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash - && \
136137
apt-get update -y && \
137-
apt-get install -y nodejs
138+
apt-get install -y --no-install-recommends \
139+
nodejs
138140

139-
RUN apt-get update && \
141+
WORKDIR /tmp
142+
RUN apt-get update -y && \
140143
apt-get install -y --no-install-recommends \
141-
libnvinfer${LIBNVINFER_MAJOR_VERSION}=${LIBNVINFER}+cuda${CUDA} \
144+
libnvinfer${LIBNVINFER_MAJOR_VERSION}=${LIBNVINFER}+cuda${CUDA} \
142145
libnvinfer-dev=${LIBNVINFER}+cuda${CUDA} \
143-
libnvinfer-plugin7 \
144146
libnvinfer-plugin-dev=${LIBNVINFER}+cuda${CUDA} \
145-
&& \
147+
libnvinfer-plugin${LIBNVINFER_MAJOR_VERSION}=${LIBNVINFER}+cuda${CUDA} && \
146148
apt-get clean && \
147149
rm -rf /var/lib/apt/lists/*
148150

@@ -158,7 +160,7 @@ RUN wget -q -O - https://www.mellanox.com/downloads/ofed/MLNX_OFED-5.1-2.3.7.1/M
158160
cd /tmp && \
159161
rm -rf /tmp/MLNX_OFED_LINUX-${MLNX_OFED_VERSION}-ubuntu18.04-x86_64*
160162

161-
# nvidia-peer
163+
# Nvidia-peer
162164
WORKDIR /tmp
163165
RUN git clone https://github.com/Mellanox/nv_peer_memory.git /tmp/nv_peer_memory && \
164166
cd /tmp/nv_peer_memory && \
@@ -318,7 +320,7 @@ RUN wget https://github.com/opencv/opencv/archive/${OPENCV_VERSION}.zip && \
318320
-D BUILD_opencv_java=OFF \
319321
-D WITH_CUDA=ON \
320322
-D CUDA_NVCC_FLAGS=--expt-relaxed-constexpr \
321-
-D CUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-10.1 \
323+
-D CUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-10.2 \
322324
-D ENABLE_FAST_MATH=1 \
323325
-D CUDA_FAST_MATH=1 \
324326
-D WITH_CUBLAS=1 \
@@ -355,7 +357,7 @@ RUN cd /usr/local/src && mkdir lightgbm && cd lightgbm && \
355357
git clone --recursive --branch stable --depth 1 https://github.com/microsoft/LightGBM && \
356358
cd LightGBM && mkdir build && cd build && \
357359
cmake -DUSE_GPU=1 -DOpenCL_LIBRARY=/usr/local/cuda/lib64/libOpenCL.so -DOpenCL_INCLUDE_DIR=/usr/local/cuda/include/ .. && \
358-
make OPENCL_HEADERS=/usr/local/cuda-10.1/targets/x86_64-linux/include LIBOPENCL=/usr/local/cuda-10.1/targets/x86_64-linux/lib -j$(nproc) && \
360+
make OPENCL_HEADERS=/usr/local/cuda-10.2/targets/x86_64-linux/include LIBOPENCL=/usr/local/cuda-10.2/targets/x86_64-linux/lib -j$(nproc) && \
359361
cd /usr/local/src/lightgbm/LightGBM/python-package && \
360362
python3 setup.py install --precompile
361363

@@ -424,14 +426,12 @@ RUN jupyter nbextensions_configurator enable && \
424426
jupyter labextension install --no-build @jupyterlab/toc && \
425427
jupyter nbextension enable execute_time/ExecuteTime && \
426428
jupyter nbextension enable toc2/main && \
427-
jupyter labextension install @pyviz/jupyterlab_pyviz && \
428-
jupyter labextension install @bokeh/jupyter_bokeh && \
429-
jupyter labextension install --no-build jupyterlab-nvdashboard && \
429+
jupyter labextension install @jupyterlab/toc && \
430+
# jupyter labextension install @bokeh/jupyter_bokeh && \
430431
jupyter lab build
431432

432433
# Clean up
433434
RUN apt autoclean && \
434-
ln -s /usr/local/cuda-10.1/targets/x86_64-linux/lib/libcusolver.so.11 /usr/local/cuda-10.1/targets/x86_64-linux/lib/libcusolver.so.10 && \
435435
sed -i 's/source \/usr\/local\/nvm\/nvm.sh//' /etc/bash.bashrc && \
436436
ln -sf /usr/share/terminfo/x/xterm-color /usr/share/terminfo/x/xterm-256color && \
437437
rm -rf /var/lib/apt/lists/* && \

0 commit comments

Comments
 (0)