3
3
4
4
ARG CUDA=11.2
5
5
ARG CUDNN=8.1.1.33-1
6
- # Python 3.8 is supported by Ubuntu Bionic out of the box
7
- ARG python=3.8
8
6
ENV CUDNN_VERSION 8.1.1.33
9
7
ENV NCCL=2.8.4
10
8
ENV NCCL_VERSION=2.8.4-1
11
9
ENV MLNX_OFED_VERSION=5.4-2.4.1.3
12
- ENV PYTHON_VERSION=${python}
13
10
ENV OPENMPI 4.1.2
14
- ENV NUMPY_VERSION 1.22.4
15
- ENV SCIPY_VERSION 1.8.1
16
- ENV MKL_VERSION=2020.3
17
- ENV MKL_BUILD=279
18
11
# configure for enviroments
19
12
ENV DEBIAN_FRONTEND=noninteractive \
20
13
TZ=Asia/Seoul \
@@ -24,7 +17,7 @@ ENV DEBIAN_FRONTEND=noninteractive \
24
17
LIBRARY_PATH=/usr/local/cuda/lib64/stubs \
25
18
_CUDA_COMPAT_PATH="/usr/local/cuda/compat" \
26
19
LD_LIBRARY_PATH="/usr/local/cuda/extras/CUPTI/lib64:/usr/local/cuda/compat/lib:/usr/local/nvidia/lib:/usr/local/nvidia/lib64:/usr/local/cuda/lib64:/usr/lib/x86_64-linux-gnu:/usr/include/x86_64-linux-gnu:/usr/local/lib" \
27
- PATH="/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/mpi/bin:/usr/local/ucx:/usr/local/sbin:/usr/bin/cmake/bin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/src/lightgbm/LightGBM" \
20
+ PATH="/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/mpi/bin:/usr/local/ucx:/opt/conda/bin:/ usr/local/sbin:/usr/bin/cmake/bin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/src/lightgbm/LightGBM" \
28
21
CPLUS_INCLUDE_PATH=/usr/include/gdal \
29
22
C_INCLUDE_PATH=/usr/include/gdal \
30
23
mecab_dicdir=/usr/local/lib/mecab/dic/mecab-ko-dic \
@@ -41,15 +34,11 @@ SHELL ["/bin/bash", "-cu"]
41
34
42
35
WORKDIR /tmp
43
36
RUN apt-get update -y && \
44
- apt-get install -y --no-install-recommends software-properties-common wget && \
37
+ apt-get install -y --no-install-recommends software-properties-common wget curl && \
45
38
curl -sL https://deb.nodesource.com/setup_12.x | bash - && \
46
39
add-apt-repository -y "deb http://security.ubuntu.com/ubuntu xenial-security main" && \
47
40
add-apt-repository -y ppa:deadsnakes/ppa && \
48
41
add-apt-repository -y ppa:bashtop-monitor/bashtop && \
49
- wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB && \
50
- apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB && \
51
- rm GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB && \
52
- wget https://apt.repos.intel.com/setup/intelproducts.list -O /etc/apt/sources.list.d/intelproducts.list && \
53
42
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/7fa2af80.pub && \
54
43
apt-get update -y && \
55
44
apt-get install -y --no-install-recommends \
@@ -77,7 +66,6 @@ RUN apt-get update -y && \
77
66
git \
78
67
graphviz \
79
68
htop \
80
- intel-mkl-2020.3-111 intel-ipp-2020.2-108 intel-tbb-2020.3-108 intel-daal-2020.2-108 intel-mpi-2019.8-108 \
81
69
iputils-ping \
82
70
libasound2-dev \
83
71
libatlas-base-dev \
@@ -92,6 +80,7 @@ RUN apt-get update -y && \
92
80
libdc1394-22-dev \
93
81
libeigen3-dev \
94
82
libfaac-dev \
83
+ libfftw3-dev \
95
84
libfreetype6-dev \
96
85
libfuse2 \
97
86
libgdal-dev \
@@ -157,6 +146,7 @@ RUN apt-get update -y && \
157
146
mpich \
158
147
ncurses-term \
159
148
net-tools \
149
+ nodejs \
160
150
openjdk-8-jdk \
161
151
openssh-client \
162
152
openssh-server \
@@ -165,11 +155,7 @@ RUN apt-get update -y && \
165
155
pkg-config \
166
156
proj-bin \
167
157
protobuf-compiler \
168
- python${PYTHON_VERSION} \
169
- python${PYTHON_VERSION}-dev \
170
- python${PYTHON_VERSION}-distutils \
171
158
python-apt \
172
- python3-gdal \
173
159
subversion \
174
160
swig \
175
161
tk \
@@ -194,17 +180,28 @@ RUN apt-get update -y && \
194
180
echo "/usr/local/cuda/lib64/stubs" > /etc/ld.so.conf.d/z-cuda-stubs.conf && \
195
181
ldconfig && \
196
182
# Add OpenCL ICD files for LightGBM
183
+ find /usr/local/cuda-${CUDA}/lib64/ -type f -name 'lib*_static.a' -not -name 'libcudart_static.a' -delete && \
197
184
mkdir -p /etc/OpenCL/vendors && \
198
185
echo "libnvidia-opencl.so.1" > /etc/OpenCL/vendors/nvidia.icd && \
199
186
ldconfig && \
200
- echo "/opt/intel/daal/lib/intel64" >> /etc/ls.so.conf && \
201
- echo "/opt/intel/ipp/lib/intel64" >> /etc/ls.so.conf && \
202
- echo "/opt/intel/lib/intel64" >> /etc/ls.so.conf && \
203
- echo "/opt/intel/mkl/lib/intel64" >> /etc/ls.so.conf && \
204
- find /usr/local/cuda-${CUDA}/lib64/ -type f -name 'lib*_static.a' -not -name 'libcudart_static.a' -delete && \
205
- # Add OpenCL ICD files for LightGBM
206
- mkdir -p /etc/OpenCL/vendors && \
207
- echo "libnvidia-opencl.so.1" > /etc/OpenCL/vendors/nvidia.icd
187
+ wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-py38_4.9.2-Linux-x86_64.sh -O /tmp/miniconda.sh && \
188
+ /bin/bash /tmp/miniconda.sh -b -p /opt/conda && \
189
+ rm /tmp/miniconda.sh && \
190
+ ln -s /opt/conda/etc/profile.d/conda.sh /etc/profile.d/conda.sh && \
191
+ echo ". /opt/conda/etc/profile.d/conda.sh" >> /root/.bashrc && \
192
+ echo "conda activate base" >> /root/.bashrc && \
193
+ curl -L "https://github.com/krallin/tini/releases/download/v0.19.0/tini_0.19.0.deb" > tini.deb && \
194
+ dpkg -i tini.deb && \
195
+ rm tini.deb && \
196
+ /opt/conda/bin/conda config --add channels conda-forge && \
197
+ /opt/conda/bin/conda config --add channels bioconda && \
198
+ /opt/conda/bin/conda config --add channels intel && \
199
+ /opt/conda/bin/conda config --add envs_dirs /home/work/.conda && \
200
+ /opt/conda/bin/conda update --prefix /opt/conda conda && \
201
+ /opt/conda/bin/conda install -c intel mkl intelpython3_core && \
202
+ /opt/conda/bin/conda install pip && \
203
+ /opt/conda/bin/python -m pip install --no-cache-dir -U "setuptools <58"
204
+
208
205
209
206
# OFED
210
207
WORKDIR /tmp
@@ -267,17 +264,6 @@ RUN git clone -q --branch=v0.3.20 https://github.com/xianyi/OpenBLAS.git && \
267
264
make DYNAMIC_ARCH=1 NO_AFFINITY=1 NUM_THREADS=48 FC=gfortran && \
268
265
make install
269
266
270
- # install python
271
- WORKDIR /tmp
272
- RUN curl https://bootstrap.pypa.io/get-pip.py | python3 && \
273
- # rm -r /usr/bin/python3 && \
274
- python3 -m pip install --no-cache-dir -U setuptools "pip < 22" && \
275
- python3 -m pip install --no-cache-dir cython pybind11 pythran && \
276
- # ln -s /usr/bin/python3.8 /usr/bin/python3 && \
277
- update-alternatives --install /usr/bin/python python /usr/bin/python3 1 && \
278
- update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 2
279
-
280
-
281
267
# XGBoost
282
268
RUN git clone --recursive https://github.com/dmlc/xgboost && \
283
269
cd xgboost && \
@@ -297,21 +283,24 @@ RUN cd /usr/local/src && mkdir lightgbm && cd lightgbm && \
297
283
cd /usr/local/src/lightgbm/LightGBM/python-package && \
298
284
python3 setup.py install --precompile
299
285
300
- ENV NUMPY_VERSION=1.17.4
286
+ ENV NUMPY_VERSION 1.22.4
287
+ ENV SCIPY_VERSION 1.8.1
288
+ ENV MKL_VERSION=2020.3
289
+ ENV MKL_BUILD=279
290
+
301
291
# Numpy
302
292
RUN git clone --branch=v${NUMPY_VERSION} --depth=1 https://github.com/numpy/numpy.git numpy && \
303
293
cd numpy && \
304
294
git checkout -b v${NUMPY_VERSION} && \
305
295
git submodule update --init && \
306
296
cp site.cfg.example site.cfg && \
307
297
echo "[mkl]" >> site.cfg && \
308
- echo "include_dirs = /opt/intel/compilers_and_libraries_2020 .3.279/linux/mkl/include/" >> site.cfg && \
298
+ echo "include_dirs = /opt/2020 .3.279/linux/mkl/include/" >> site.cfg && \
309
299
echo "library_dirs = /opt/intel/compilers_and_libraries_2020.3.279/linux/mkl/lib/intel64" >> site.cfg && \
310
300
echo "mkl_libs = mkl_rt" >> site.cfg && \
311
301
echo "lapack_libs =" >> site.cfg && \
312
302
python3 setup.py bdist_wheel -d /tmp
313
303
314
- ENV SCIPY_VERSION=1.6.0
315
304
# Scipy
316
305
RUN cd /tmp && \
317
306
git clone --branch=v${SCIPY_VERSION} --depth=1 https://github.com/scipy/scipy.git scipy && \
@@ -430,13 +419,13 @@ RUN mkdir /tmp/openmpi && \
430
419
chmod a+x /usr/local/bin/mpirun && \
431
420
ln -s /usr/local/lib/libmpi.so.40.30.2 /usr/local/lib/libmpi.so.12 && \
432
421
# Configure OpenMPI to run good defaults:
433
- echo "btl_tcp_if_exclude = lo,docker0" >> /usr/local/etc/openmpi-mca-params.conf && \
434
- MPICC=/usr/lib64/openmpi/bin/mpicc python3 -m pip install mpi4py && \
435
- python3 -m pip install "jax[cuda11_cudnn805]" -f https://storage.googleapis.com/jax-releases/jax_releases.html && \
436
- CUDA_ROOT=/usr/local/cuda python3 -m pip install mpi4jax \
437
- nni==1.9 \
438
- mlflow==1.12.1 \
439
- scikit-nni==0.2.1
422
+ echo "btl_tcp_if_exclude = lo,docker0" >> /usr/local/etc/openmpi-mca-params.conf
423
+ RUN MPICC=/usr/lib64/openmpi/bin/mpicc python3 -m pip install mpi4py && \
424
+ python3 -m pip install "jax[cuda11_cudnn805]" -f https://storage.googleapis.com/jax-releases/jax_releases.html
425
+ RUN CUDA_ROOT=/usr/local/cuda python3 -m pip install mpi4jax
426
+ # nni==1.9 \
427
+ # mlflow==1.12.1 \
428
+ # scikit-nni==0.2.1
440
429
441
430
RUN ldconfig /usr/local/cuda/targets/x86_64-linux/lib/stubs && \
442
431
HOROVOD_NCCL_LINK=SHARED \
0 commit comments