1
- FROM nvidia/cuda:10.1 -cudnn7-devel-ubuntu18.04
1
+ FROM nvidia/cuda:10.2 -cudnn7-devel-ubuntu18.04
2
2
3
3
# 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
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
@@ -33,6 +33,7 @@ ENV DEBIAN_FRONTEND=noninteractive \
33
33
# Set default shell to /bin/bash
34
34
SHELL ["/bin/bash", "-cu"]
35
35
36
+ WORKDIR /tmp
36
37
RUN rm -fr /var/lib/apt/lists/* && \
37
38
apt-get update -y && \
38
39
apt-get install -y --no-install-recommends software-properties-common wget && \
@@ -41,8 +42,14 @@ RUN rm -fr /var/lib/apt/lists/* && \
41
42
add-apt-repository -y ppa:bashtop-monitor/bashtop && \
42
43
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB && \
43
44
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 && \
44
47
rm GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB && \
45
48
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/ /" && \
46
53
apt-get update -y && \
47
54
apt-get install -y --allow-downgrades --allow-change-held-packages --no-install-recommends \
48
55
bashtop \
@@ -78,6 +85,7 @@ RUN rm -fr /var/lib/apt/lists/* && \
78
85
make \
79
86
mime-support \
80
87
net-tools \
88
+ ncurses-term \
81
89
openssh-server \
82
90
pdsh \
83
91
proj-bin libproj-dev libgeos-dev libgeos++-dev graphviz \
@@ -107,42 +115,36 @@ RUN rm -fr /var/lib/apt/lists/* && \
107
115
pkg-config \
108
116
python${PYTHON_VERSION} \
109
117
python${PYTHON_VERSION}-dev \
118
+ libnccl2=${NCCL_VERSION} \
119
+ libnccl-dev=${NCCL_VERSION} \
110
120
vim \
111
121
wget \
112
122
zlib1g-dev && \
113
123
echo "/opt/intel/daal/lib/intel64" >> /etc/ls.so.conf && \
114
124
echo "/opt/intel/ipp/lib/intel64" >> /etc/ls.so.conf && \
115
125
echo "/opt/intel/lib/intel64" >> /etc/ls.so.conf && \
116
126
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 && \
127
129
echo "/usr/local/cuda/lib64/stubs" > /etc/ld.so.conf.d/z-cuda-stubs.conf && \
128
- ldconfig
129
130
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 && \
133
134
ldconfig
134
135
135
136
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash - && \
136
137
apt-get update -y && \
137
- apt-get install -y nodejs
138
+ apt-get install -y --no-install-recommends \
139
+ nodejs
138
140
139
- RUN apt-get update && \
141
+ WORKDIR /tmp
142
+ RUN apt-get update -y && \
140
143
apt-get install -y --no-install-recommends \
141
- libnvinfer${LIBNVINFER_MAJOR_VERSION}=${LIBNVINFER}+cuda${CUDA} \
144
+ libnvinfer${LIBNVINFER_MAJOR_VERSION}=${LIBNVINFER}+cuda${CUDA} \
142
145
libnvinfer-dev=${LIBNVINFER}+cuda${CUDA} \
143
- libnvinfer-plugin7 \
144
146
libnvinfer-plugin-dev=${LIBNVINFER}+cuda${CUDA} \
145
- && \
147
+ libnvinfer-plugin${LIBNVINFER_MAJOR_VERSION}=${LIBNVINFER}+cuda${CUDA} && \
146
148
apt-get clean && \
147
149
rm -rf /var/lib/apt/lists/*
148
150
@@ -158,7 +160,7 @@ RUN wget -q -O - https://www.mellanox.com/downloads/ofed/MLNX_OFED-5.1-2.3.7.1/M
158
160
cd /tmp && \
159
161
rm -rf /tmp/MLNX_OFED_LINUX-${MLNX_OFED_VERSION}-ubuntu18.04-x86_64*
160
162
161
- # nvidia -peer
163
+ # Nvidia -peer
162
164
WORKDIR /tmp
163
165
RUN git clone https://github.com/Mellanox/nv_peer_memory.git /tmp/nv_peer_memory && \
164
166
cd /tmp/nv_peer_memory && \
@@ -318,7 +320,7 @@ RUN wget https://github.com/opencv/opencv/archive/${OPENCV_VERSION}.zip && \
318
320
-D BUILD_opencv_java=OFF \
319
321
-D WITH_CUDA=ON \
320
322
-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 \
322
324
-D ENABLE_FAST_MATH=1 \
323
325
-D CUDA_FAST_MATH=1 \
324
326
-D WITH_CUBLAS=1 \
@@ -355,7 +357,7 @@ RUN cd /usr/local/src && mkdir lightgbm && cd lightgbm && \
355
357
git clone --recursive --branch stable --depth 1 https://github.com/microsoft/LightGBM && \
356
358
cd LightGBM && mkdir build && cd build && \
357
359
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) && \
359
361
cd /usr/local/src/lightgbm/LightGBM/python-package && \
360
362
python3 setup.py install --precompile
361
363
@@ -424,14 +426,12 @@ RUN jupyter nbextensions_configurator enable && \
424
426
jupyter labextension install --no-build @jupyterlab/toc && \
425
427
jupyter nbextension enable execute_time/ExecuteTime && \
426
428
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 && \
430
431
jupyter lab build
431
432
432
433
# Clean up
433
434
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 && \
435
435
sed -i 's/source \/ usr\/ local\/ nvm\/ nvm.sh//' /etc/bash.bashrc && \
436
436
ln -sf /usr/share/terminfo/x/xterm-color /usr/share/terminfo/x/xterm-256color && \
437
437
rm -rf /var/lib/apt/lists/* && \
0 commit comments