Skip to content

Commit d55b257

Browse files
committed
Merge branch 'master' of github.com:lablup/backend.ai-kernels
2 parents eb3820d + 302ff4e commit d55b257

File tree

3 files changed

+453
-1
lines changed

3 files changed

+453
-1
lines changed
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
FROM lablup/common-base:py38-cuda11.3
2+
3+
# Install PyTorch
4+
ENV PYTORCH_VERSION=1.11.0
5+
ENV TORCHVISION_VERSION=0.12.0
6+
ENV TORCHAUDIO_VERSION=0.9.0
7+
ENV TORCHTEXT_VERSION=0.10.0
8+
ENV TENSORBOARDX_VERSION=2.1
9+
10+
RUN python3 -m pip uninstall -y torch && \
11+
python3 -m pip install -U pip setuptools
12+
RUN python3 -m pip install --no-cache-dir \
13+
http://download.pytorch.org/whl/cu113/torch-1.11.0%2Bcu113-cp38-cp38-linux_x86_64.whl \
14+
keras4torch==1.2.4 \
15+
pytorch-lightning==1.3.4 \
16+
torch-model-archiver==0.3.0 \
17+
torch-tb-profiler==0.4.0 \
18+
http://download.pytorch.org/whl/cu113/torchaudio-0.11.0%2Bcu113-cp38-cp38-linux_x86_64.whl \
19+
torchmetrics==0.7.2 \
20+
torchserve==0.5.3 \
21+
torchtext==0.12.0 \
22+
http://download.pytorch.org/whl/cu102/torchvision-0.12.0%2Bcu102-cp38-cp38-linux_x86_64.whl \
23+
http://download.pytorch.org/whl/torch_model_archiver-0.3.0-py2.py3-none-any.whl \
24+
jsonargparse \
25+
torchmetrics \
26+
pyDeprecate \
27+
fsspec[http]>=2021.05.0 \
28+
PyYAML>=5.1 \
29+
pretrainedmodels \
30+
cnn-finetune \
31+
keras4torch \
32+
pytorch-lightning
33+
34+
RUN python3 -m pip install --extra-index-url \
35+
https://developer.download.nvidia.com/compute/redist --upgrade nvidia-dali-cuda110
36+
37+
# Install Horovod, temporarily using CUDA stubs
38+
RUN ldconfig /usr/local/cuda/targets/x86_64-linux/lib/stubs && \
39+
HOROVOD_GPU_ALLREDUCE=NCCL HOROVOD_GPU_BROADCAST=NCCL \
40+
HOROVOD_WITHOUT_TENSORFLOW=1 HOROVOD_WITH_PYTORCH=1 HOROVOD_WITHOUT_MXNET=1 \
41+
pip install --no-cache-dir horovod==0.24.2 && \
42+
ldconfig
43+
44+
RUN python3 -m pip install --no-cache-dir \
45+
mpi4py==3.1.3 \
46+
mlflow==1.24.0 \
47+
nni==2.6.1 \
48+
tensorboard-plugin-wit \
49+
scikit-nni==0.2.1
50+
51+
RUN apt update && \
52+
apt install ncurses-term && \
53+
apt autoclean && \
54+
sed -i 's/source \/usr\/local\/nvm\/nvm.sh//' /etc/bash.bashrc && \
55+
ln -sf /usr/share/terminfo/x/xterm-color /usr/share/terminfo/x/xterm-256color && \
56+
rm -rf /var/lib/apt/lists/* && \
57+
rm -rf /root/.cache && \
58+
rm -rf /tmp/*
59+
60+
COPY ./service-defs /etc/backend.ai/service-defs
61+
COPY ./runner-scripts/bootstrap.sh runner-scripts/setup_multinode.py /opt/container/
62+
63+
# Install ipython kernelspec
64+
Run python3 -m ipykernel install --display-name "PyTorch 1.11.0 on Python 3.8 (CUDA 11.3)" && \
65+
cat /usr/local/share/jupyter/kernels/python3/kernel.json
66+
67+
# Backend.AI specifics
68+
LABEL ai.backend.kernelspec="1" \
69+
ai.backend.envs.corecount="OPENBLAS_NUM_THREADS,OMP_NUM_THREADS,NPROC" \
70+
ai.backend.features="batch query uid-match user-input" \
71+
ai.backend.base-distro="ubuntu16.04" \
72+
ai.backend.resource.min.cpu="1" \
73+
ai.backend.resource.min.mem="1g" \
74+
ai.backend.resource.min.cuda.device=0 \
75+
ai.backend.resource.min.cuda.shares=0 \
76+
ai.backend.runtime-type="python" \
77+
ai.backend.runtime-path="/usr/bin/python3" \
78+
ai.backend.service-ports="ipython:pty:3000,jupyter:http:8081,jupyterlab:http:8090,vscode:http:8180,tensorboard:http:6006,mlflow-ui:preopen:5000,nniboard:preopen:8080"
79+
80+
WORKDIR /home/work
81+
# vim: ft=dockerfile

0 commit comments

Comments
 (0)