-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Dockerfile.pytorch2.2.1-cuda11.8
80 lines (67 loc) · 2.55 KB
/
Dockerfile.pytorch2.2.1-cuda11.8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
FROM nvidia/cuda:11.8.0-cudnn8-runtime-ubuntu22.04
# Annotation spec: https://github.com/opencontainers/image-spec/blob/main/annotations.md
ARG DESCRIPTION="PyTorch 2.2.1 / Python 3.10.12 / nvidia/cuda:11.8.0-cudnn8-runtime-ubuntu22.04"
ARG CREATED
ARG URL
ARG SOURCE
ARG VERSION
ARG REVISION
ARG VENDOR
ARG TITLE
LABEL org.label-schema.build-date=${CREATED} \
org.label-schema.url=${URL} \
org.label-schema.vcs-url=${SOURCE} \
org.label-schema.version=${VERSION} \
org.label-schema.vcs-ref=${REVISION} \
org.label-schema.vendor=${VENDOR} \
org.label-schema.name=${TITLE} \
org.label-schema.description=${DESCRIPTION} \
org.label-schema.schema-version="1.0" \
org.opencontainers.image.created=${CREATED} \
org.opencontainers.image.url=${URL} \
org.opencontainers.image.source=${SOURCE} \
org.opencontainers.image.version=${VERSION} \
org.opencontainers.image.revision=${REVISION} \
org.opencontainers.image.vendor=${VENDOR} \
org.opencontainers.image.title=${TITLE} \
org.opencontainers.image.description=${DESCRIPTION} \
org.opencontainers.image.base.digest="sha256:85fb7ac694079fff1061a0140fd5b5a641997880e12112d92589c3bbb1e8b7ca" \
org.opencontainers.image.base.name="docker.io/nvidia/cuda:11.8.0-cudnn8-runtime-ubuntu22.04" \
org.opencontainers.image.ref.name="nvidia/cuda:11.8.0-cudnn8-runtime-ubuntu22.04"
# Skips tzdata configuration
ARG DEBIAN_FRONTEND=noninteractive
# See http://bugs.python.org/issue19846
ENV LANG C.UTF-8
#ARG PYTHON=python3
ARG PIP=pip3
# Install python 3, make default and update pip
RUN apt-get update \
&& apt-get install -y python3 python3-pip \
&& apt-get -qq clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
&& update-alternatives --install /usr/bin/python python /usr/bin/python3 100 \
&& ${PIP} --no-cache-dir install -q --upgrade pip
# Install pytorch
RUN ${PIP} --no-cache-dir install -q --upgrade \
torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
RUN ${PIP} --no-cache-dir install -q --upgrade \
ipywidgets \
jupyterlab \
nltk \
opencv-python-headless \
pandas \
pytorch-lightning \
scikit-learn \
scikit-image \
seaborn \
tensorboard
# Jupyter has issues with being run directly:
# https://github.com/ipython/ipython/issues/7062
# We just add a little wrapper script.
COPY run_jupyter.sh /
# IPython
EXPOSE 8888
# Tensorboard
EXPOSE 6006
WORKDIR /notebooks
CMD ["/run_jupyter.sh", "--ip='*'", "--port=8888", "--no-browser", "--allow-root"]