Skip to content

Commit 87b3e1d

Browse files
committed
Merge branch '20.12' of https://github.com/lablup/backend.ai-kernels into 20.12
2 parents 64df5ad + 065d20e commit 87b3e1d

File tree

4 files changed

+342
-23
lines changed

4 files changed

+342
-23
lines changed

commons/Dockerfile.base.cuda11.1

Lines changed: 11 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ ENV OPENMPI 4.0.5
1818
ENV DEBIAN_FRONTEND=noninteractive \
1919
MPLBACKEND=Svg \
2020
PYTHONUNBUFFERED=1 \
21-
LIBRARY_PATH=/usr/local/cuda/lib64/stubs \
21+
LIBRARY_PATH="/usr/local/cuda/lib64/stubs" \
2222
_CUDA_COMPAT_PATH="/usr/local/cuda/compat" \
23-
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/local/nvidia/lib64:/usr/include/x86_64-linux-gnu" \
24-
PATH="/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/bin/cmake/bin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/src/lightgbm/LightGBM:/usr/local/bin/mecab" \
23+
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/include/x86_64-linux-gnu:/opt/intel/compilers_and_libraries_2020.3.279/linux/mkl/lib/intel64" \
24+
PATH="/usr/local/mpi/bin:/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/bin/cmake/bin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/tensorrt/bin:/usr/local/src/lightgbm/LightGBM:/usr/local/bin/mecab" \
2525
mecab_dicdir=/usr/local/lib/mecab/dic/mecab-ko-dic \
2626
LANG=C.UTF-8
2727

@@ -101,8 +101,6 @@ RUN rm -fr /var/lib/apt/lists/* && \
101101
echo "/opt/intel/mkl/lib/intel64" >> /etc/ls.so.conf && \
102102
find /usr/local/cuda-${CUDA}/lib64/ -type f -name 'lib*_static.a' -not -name 'libcudart_static.a' -delete
103103

104-
# NCCL_DOWNLOAD_SUM=34000cbe6a0118bfd4ad898ebc5f59bf5d532bbf2453793891fa3f1621e25653
105-
# echo "$NCCL_DOWNLOAD_SUM nccl_2.8.3-1+cuda11.1_x86_64.txz" | sha256sum -c -
106104
RUN curl -fsSL https://developer.download.nvidia.com/compute/redist/nccl/v2.8/nccl_2.8.3-1+cuda11.1_x86_64.txz -O && \
107105
tar --no-same-owner --keep-old-files --lzma -xvf nccl_${NCCL}-1+cuda11.1_x86_64.txz -C /usr/local/cuda/lib64/ --strip-components=2 --wildcards '*/lib/libnccl.so.*' && \
108106
tar --no-same-owner --keep-old-files --lzma -xvf nccl_${NCCL}-1+cuda11.1_x86_64.txz -C /usr/lib/pkgconfig/ --strip-components=3 --wildcards '*/lib/pkgconfig/*' && \
@@ -125,21 +123,13 @@ RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - && \
125123
RUN apt-get update && \
126124
apt-get install -y --no-install-recommends \
127125
libnvinfer${LIBNVINFER_MAJOR_VERSION}=${LIBNVINFER}+cuda${CUDA} \
128-
# libnvinfer-bin=${LIBNVINFER}+cuda${CUDA} \
129126
libnvinfer-dev=${LIBNVINFER}+cuda${CUDA} \
130127
libnvinfer-plugin7 \
131128
libnvinfer-plugin-dev=${LIBNVINFER}+cuda${CUDA} \
132129
&& \
133130
apt-get clean && \
134131
rm -rf /var/lib/apt/lists/*
135132

136-
WORKDIR /tmp
137-
#RUN mkdir -p /opt/intel/lib && \
138-
# curl -fsSL https://anaconda.org/intel/mkl-static/${MKL_VERSION}/download/linux-64/mkl-static-${MKL_VERSION}-intel_${MKL_BUILD}.tar.bz2 | tar xjv && \
139-
# mv lib/* /opt/intel/lib/ && \
140-
# curl -fsSL https://anaconda.org/intel/mkl-include/${MKL_VERSION}/download/linux-64/mkl-include-${MKL_VERSION}-intel_${MKL_BUILD}.tar.bz2 | tar xjv && \
141-
# mv include /opt/intel/
142-
143133
# Add OpenCL ICD files for LightGBM
144134
RUN mkdir -p /etc/OpenCL/vendors && \
145135
echo "libnvidia-opencl.so.1" > /etc/OpenCL/vendors/nvidia.icd
@@ -268,8 +258,7 @@ RUN python3 -m pip install pip --no-cache-dir \
268258
WORKDIR /tmp
269259
COPY ./requirements.txt /tmp
270260
RUN python3 -m pip install --no-cache-dir -r requirements.txt && \
271-
rm -f /tmp/*.whl /tmp/requirements.txt
272-
261+
rm -f /tmp/requirements.txt
273262

274263
# OpenCV
275264
RUN ln -s /usr/include/libv4l1-videodev.h /usr/include/linux/videodev.h && \
@@ -341,10 +330,10 @@ RUN wget https://github.com/opencv/opencv/archive/${OPENCV_VERSION}.zip && \
341330
-D PYTHON_PACKAGES_PATH=$(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") \
342331
.. 2>&1 | tee cmake_messages.txt && \
343332
make -j$(nproc) && \
344-
make install && \
345-
cd /tmp && \
346-
python3 -m pip install --no-cache-dir opencv-python && \
347-
rm -fr opencv*
333+
make install
334+
#RUN cd /tmp && \
335+
# python3 -m pip install --no-cache-dir ./opencv-contrib-python*.whl && \
336+
# rm -fr opencv*
348337

349338
# XGBoost
350339
RUN git clone --recursive https://github.com/dmlc/xgboost && \
@@ -365,9 +354,8 @@ RUN cd /usr/local/src && mkdir lightgbm && cd lightgbm && \
365354
cd /usr/local/src/lightgbm/LightGBM/python-package && \
366355
python3 setup.py install --precompile
367356

368-
369357
# Install Open MPI
370-
RUN mkdir /tmp/openmpi && \
358+
RUN mkdir -p /tmp/openmpi && \
371359
cd /tmp/openmpi && \
372360
wget https://www.open-mpi.org/software/ompi/v4.0/downloads/openmpi-${OPENMPI}.tar.gz && \
373361
tar zxf openmpi-${OPENMPI}.tar.gz && \
@@ -422,7 +410,7 @@ RUN jupyter nbextensions_configurator enable && \
422410
jupyter nbextension enable --py --sys-prefix widgetsnbextension && \
423411
jupyter serverextension enable --py jupyterlab --sys-prefix && \
424412
jupyter labextension install --no-build @jupyter-widgets/jupyterlab-manager && \
425-
# git clone https://github.com/lambdalisue/jupyter-vim-binding vim_binding && \
413+
git clone https://github.com/lambdalisue/jupyter-vim-binding vim_binding && \
426414
# jupyter nbextension enable /home/work/.jupyter/nbextension/vim_binding/vim_binding && \
427415
# jupyter labextension install --no-build @lckr/jupyterlab_variableinspector && \
428416
jupyter labextension install --no-build @krassowski/jupyterlab-lsp && \
@@ -437,6 +425,7 @@ RUN jupyter nbextensions_configurator enable && \
437425
jupyter lab build
438426

439427
RUN apt autoclean && \
428+
ln -s /usr/local/cuda-11.1/targets/x86_64-linux/lib/libcusolver.so.11 /usr/local/cuda-11.1/targets/x86_64-linux/lib/libcusolver.so.10 && \
440429
sed -i 's/source \/usr\/local\/nvm\/nvm.sh//' /etc/bash.bashrc && \
441430
python3 -m pip uninstall -y tensorboard-plugin-wit && \
442431
rm -rf /var/lib/apt/lists/* && \
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
FROM lablup/common-base:py36-cuda11.1
2+
3+
RUN python3 -m pip install --no-cache-dir --upgrade \
4+
-q git+https://github.com/google-research/tensorflow_constrained_optimization
5+
6+
RUN python3 -m pip install --no-cache-dir \
7+
--use-feature=2020-resolver \
8+
requests_oauthlib==1.2.0 \
9+
neural-structured-learning==1.3.1 \
10+
pydot==1.4.0 \
11+
proto-plus==1.10.2
12+
RUN python3 -m pip install --no-cache-dir \
13+
--use-feature=2020-resolver \
14+
tensorflow-transform==0.25.0 \
15+
tensorflow_model_analysis \
16+
tensorflow-datasets \
17+
tensorflow_probability==0.11.1 \
18+
tensorflow-addons==0.11.2 \
19+
neural-structured-learning==1.3.1 \
20+
tensorflow-model-optimization==0.5.0 \
21+
tfx==0.25.0 \
22+
tfx-bsl==0.25.0 \
23+
tf-agents==0.6.0
24+
RUN python3 -m pip install --no-cache-dir \
25+
--use-feature=2020-resolver \
26+
tensorflow-cloud==0.1.10 \
27+
tensorflow-hub==0.9.0 \
28+
tensorflow_text==2.4.1 \
29+
tensorflow-graphics-gpu==1.0.0 \
30+
tensorflow-gan==2.0.0 \
31+
tensorflow-data-validation \
32+
tensorflow-plot==0.3.2 \
33+
tensorflow-lattice==2.0.7 \
34+
tensorflow_ranking==0.3.2 \
35+
tensorflow-compression==1.3 \
36+
mesh-tensorflow==0.1.13 \
37+
google_cloud_spanner==1.19.0 \
38+
pymongo==3.11.2 \
39+
googleapis-common-protos==1.51.0 \
40+
google_cloud_videointelligence==1.15.0 \
41+
google_cloud_vision==0.42.0 \
42+
google_cloud_pubsub==1.6.0 \
43+
google_cloud_dlp==0.15.0 \
44+
google_cloud_datastore==1.15.2 \
45+
fastavro==1.2.0 \
46+
google_cloud_bigtable==1.6.0 \
47+
google_api_core==1.24.0 \
48+
pbr==5.5.1 \
49+
mock==1.3.0 \
50+
proto-plus==1.13.0 \
51+
oauth2client==4.1.3 \
52+
joblib==0.14.0 \
53+
libcst==0.3.14 \
54+
tensorflow-io==0.17.0
55+
56+
RUN python3 -m pip install --extra-index-url \
57+
https://developer.download.nvidia.com/compute/redist nvidia-dali-cuda100 \
58+
&& \
59+
python3 -m pip install --extra-index-url \
60+
https://developer.download.nvidia.com/compute/redist nvidia-dali-tf-plugin-cuda100
61+
62+
# Install Horovod, temporarily using CUDA stubs
63+
RUN ldconfig /usr/local/cuda/targets/x86_64-linux/lib/stubs && \
64+
HOROVOD_GPU_ALLREDUCE=NCCL HOROVOD_GPU_BROADCAST=NCCL HOROVOD_NCCL_LINK=SHARED \
65+
HOROVOD_WITH_TENSORFLOW=1 HOROVOD_WITHOUT_PYTORCH=1 HOROVOD_WITHOUT_MXNET=1\
66+
HOROVOD_GPU=CUDA \
67+
python3 -m pip install --no-cache-dir horovod==0.21.0 && \
68+
ldconfig
69+
70+
RUN python3 -m pip install --no-cache-dir \
71+
mpi4py==3.0.3 \
72+
nni==1.9 \
73+
mlflow==1.12.1 \
74+
scikit-nni==0.2.1
75+
76+
# Install ipython kernelspec
77+
Run python3 -m ipykernel install --display-name "TensorFlow 2.4 on Python 3.6 & CUDA 11ᇂᇂᇂᇂ.1" && \
78+
cat /usr/local/share/jupyter/kernels/python3/kernel.json
79+
80+
# Backend.AI specifics
81+
LABEL ai.backend.kernelspec="1" \
82+
ai.backend.envs.corecount="OPENBLAS_NUM_THREADS,OMP_NUM_THREADS,NPROC" \
83+
ai.backend.features="batch query uid-match user-input" \
84+
ai.backend.base-distro="ubuntu16.04" \
85+
ai.backend.resource.min.cpu="1" \
86+
ai.backend.resource.min.mem="1g" \
87+
ai.backend.resource.min.cuda.device=0 \
88+
ai.backend.resource.min.cuda.shares=0 \
89+
ai.backend.runtime-type="python" \
90+
ai.backend.runtime-path="/usr/bin/python3" \
91+
ai.backend.service-ports="ipython:pty:3000,jupyter:http:8080,jupyterlab:http:8090,vscode:http:8180,tensorboard:http:6006,mlflow-ui:preopen:5000,nniboard:preopen:8080"
92+
93+
WORKDIR /home/work
94+
# vim: ft=dockerfile

vendor/ngc-pytorch/Dockerfile.20.11-py3

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ LABEL ai.backend.kernelspec="1" \
246246
ai.backend.base-distro="ubuntu16.04" \
247247
ai.backend.runtime-type="python" \
248248
ai.backend.runtime-path="/opt/conda/bin/python3" \
249-
ai.backend.service-ports="ipython:pty:3000,jupyter:http:8091,jupyterlab:http:8090,vscode:http:8180,tensorboard:http:6006,mlflow-ui:http:5000,nniboard:http:8080"
249+
ai.backend.service-ports="ipython:pty:3000,jupyter:http:8091,jupyterlab:http:8090,vscode:http:8180,tensorboard:http:6006,mlflow-ui:preopen:5000,nniboard:preopen:8080"
250250

251251

252252
WORKDIR /home/work

0 commit comments

Comments
 (0)