-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Dockerfile
61 lines (48 loc) · 1.82 KB
/
Dockerfile
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
FROM wqael/docker:py3.8-cuda11.3.1
LABEL description="JupyterLab / PyTorch 1.12.1 / Python 3.8.10 / nvidia/cuda:11.3.1-cudnn8-runtime-ubuntu20.04" \
maintainer="https://github.com/rlan/notebooks"
# Build-time metadata as defined at http://label-schema.org
ARG BUILD_DATE
ARG VCS_REF
ARG VERSION
LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.vcs-url="https://github.com/rlan/notebooks" \
org.label-schema.version=$VERSION \
org.label-schema.schema-version="1.0"
ARG PYTHON=python3
ARG PIP=pip3
# Skips tzdata configuration
ARG DEBIAN_FRONTEND=noninteractive
# Fixes bug: https://github.com/NVIDIA/nvidia-docker/issues/1632
RUN apt-key del 7fa2af80 \
&& apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/3bf863cc.pub \
&& apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu2004/x86_64/7fa2af80.pub
RUN ${PIP} --no-cache-dir install -q --upgrade pip setuptools wheel
# Install pytorch
RUN ${PIP} --no-cache-dir install -q --upgrade \
torch==1.12.1+cu113 torchvision==0.13.1+cu113 torchaudio==0.12.1 --extra-index-url https://download.pytorch.org/whl/cu113
RUN ${PIP} --no-cache-dir install -q --upgrade \
ipywidgets \
jupyterlab \
matplotlib \
nltk \
opencv-python-headless \
pandas \
pillow \
pytorch-lightning \
scikit-learn \
scikit-image \
seaborn \
tensorboard \
six
# 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"]