-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Dockerfile.pytorch2.3.1
67 lines (57 loc) · 2.06 KB
/
Dockerfile.pytorch2.3.1
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
FROM python:3.10-slim-bookworm
# Annotation spec: https://github.com/opencontainers/image-spec/blob/main/annotations.md
ARG DESCRIPTION="PyTorch 2.3.1 / python:3.10-slim-bookworm"
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:5e38f0e65bd16247b4c2ad294d388c74bd96da3b7800edc570d72f2e3a403707" \
org.opencontainers.image.base.name="docker.io/library/python:3.10-slim-bookworm" \
org.opencontainers.image.ref.name="python:3.10-slim-bookworm"
#ARG PYTHON=python3
ARG PIP=pip3
RUN ${PIP} --no-cache-dir install -q --upgrade \
ipywidgets \
jupyterlab \
nltk \
opencv-python-headless \
pandas \
scikit-learn \
scikit-image \
seaborn
# Install PyTorch
RUN ${PIP} --no-cache-dir install -q --upgrade \
torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
RUN ${PIP} --no-cache-dir install -q --upgrade \
pytorch-lightning \
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"]