Skip to content

Commit 384ebc7

Browse files
committed
update pip 20.0.3 & setuptools 60.9.3
1 parent a32e7c1 commit 384ebc7

File tree

1 file changed

+80
-0
lines changed

1 file changed

+80
-0
lines changed
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
FROM lablup/common-base:py38-cuda11.1
2+
3+
# Install PyTorch
4+
ENV PYTORCH_VERSION=1.10.0
5+
ENV TORCHVISION_VERSION=0.10.0
6+
ENV TORCHAUDIO_VERSION=0.10.0
7+
ENV TORCHTEXT_VERSION=0.10.0
8+
ENV TENSORBOARDX_VERSION=2.4.1
9+
10+
RUN python3 -m pip uninstall -y torch && \
11+
python3 -m pip install -U pip==22.0.3 setuptools==60.9.3 && \
12+
python3 -m pip install --no-cache-dir \
13+
http://download.pytorch.org/whl/cu111/torch-${PYTORCH_VERSION}%2Bcu111-cp38-cp38-linux_x86_64.whl \
14+
http://download.pytorch.org/whl/cu111/torchvision-${TORCHVISION_VERSION}%2Bcu111-cp38-cp38-linux_x86_64.whl \
15+
torchaudio==${TORCHAUDIO_VERSION} \
16+
torchserve \
17+
torchtext==${TORCHTEXT_VERSION} \
18+
# torchcsprng \
19+
jsonargparse \
20+
torchmetrics \
21+
pyDeprecate \
22+
fsspec[http]>=2021.05.0 \
23+
PyYAML>=5.1 \
24+
pretrainedmodels \
25+
cnn-finetune \
26+
keras4torch \
27+
pytorch-lightning
28+
# python3 -m pip install --no-cache-dir tensorboardX==${TENSORBOARDX_VERSION}
29+
30+
# torch2trt PyTorch to TensorRT converter which utilizes the TensorRT Python API
31+
WORKDIR /tmp
32+
RUN git clone --branch=v0.3.0 https://github.com/NVIDIA-AI-IOT/torch2trt /tmp/torch2trt && \
33+
cd /tmp/torch2trt && \
34+
python3 setup.py install --plugins && \
35+
rm -fr /tmp/torch2trt
36+
37+
RUN python3 -m pip install --extra-index-url \
38+
https://developer.download.nvidia.com/compute/redist nvidia-dali-cuda100
39+
40+
# Install Horovod, temporarily using CUDA stubs
41+
RUN ldconfig /usr/local/cuda/targets/x86_64-linux/lib/stubs && \
42+
HOROVOD_GPU_ALLREDUCE=NCCL HOROVOD_GPU_BROADCAST=NCCL \
43+
HOROVOD_WITHOUT_TENSORFLOW=1 HOROVOD_WITH_PYTORCH=1 HOROVOD_WITHOUT_MXNET=1 \
44+
pip install --no-cache-dir horovod==0.22.1 && \
45+
ldconfig
46+
47+
RUN python3 -m pip install --no-cache-dir \
48+
mpi4py==3.0.3 \
49+
mlflow==1.18.0 \
50+
nni==2.3 \
51+
tensorboard-plugin-wit \
52+
scikit-nni==0.2.1
53+
54+
RUN apt autoclean && \
55+
rm -rf /var/lib/apt/lists/* && \
56+
rm -rf /root/.cache && \
57+
rm -rf /tmp/*
58+
59+
COPY ./service-defs /etc/backend.ai/service-defs
60+
COPY ./runner-scripts/bootstrap.sh runner-scripts/setup_multinode.py /opt/container/
61+
62+
# Install ipython kernelspec
63+
Run python3 -m ipykernel install --display-name "PyTorch 1.10.0 on Python 3.8 (CUDA 11.1)" && \
64+
cat /usr/local/share/jupyter/kernels/python3/kernel.json
65+
66+
# Backend.AI specifics
67+
LABEL ai.backend.kernelspec="1" \
68+
ai.backend.envs.corecount="OPENBLAS_NUM_THREADS,OMP_NUM_THREADS,NPROC" \
69+
ai.backend.features="batch query uid-match user-input" \
70+
ai.backend.base-distro="ubuntu16.04" \
71+
ai.backend.resource.min.cpu="1" \
72+
ai.backend.resource.min.mem="1g" \
73+
ai.backend.resource.min.cuda.device=0 \
74+
ai.backend.resource.min.cuda.shares=0 \
75+
ai.backend.runtime-type="python" \
76+
ai.backend.runtime-path="/usr/bin/python3" \
77+
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"
78+
79+
WORKDIR /home/work
80+
# vim: ft=dockerfile

0 commit comments

Comments
 (0)