Skip to content

Commit 9541858

Browse files
committed
Fixes #47 #48 #49
1 parent 53506fb commit 9541858

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+581
-13
lines changed

README.md

+9-7
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ If you are reading this page from [Docker Hub](https://hub.docker.com/r/wqael/no
2929

3030
| Tag | Comment | Dockerfile | Info |
3131
| ----- | ------- | ---------- | ---- |
32-
| `latest` | CPU-only. Jupyter. PyTorch 1.2, Keras, TF 1.14.0. | [Dockerfile](docker/latest/Dockerfile) | [![](https://images.microbadger.com/badges/image/wqael/notebooks:latest.svg)](https://microbadger.com/images/wqael/notebooks:latest) |
33-
| `latest-gpu` | CUDA 10. Jupyter. PyTorch 1.2, Keras, TF 1.14.0. | [Dockerfile](docker/latest-gpu/Dockerfile) | [![](https://images.microbadger.com/badges/image/wqael/notebooks:latest-gpu.svg)](https://microbadger.com/images/wqael/notebooks:latest-gpu) |
32+
| `latest` | CPU-only. Jupyter. PyTorch 1.4, Keras, TF 1.15.0. | [Dockerfile](docker/latest/Dockerfile) | [![](https://images.microbadger.com/badges/image/wqael/notebooks:latest.svg)](https://microbadger.com/images/wqael/notebooks:latest) |
33+
| `latest-gpu` | CUDA 10.1. Jupyter. PyTorch 1.4, Keras, TF 1.15.0. | [Dockerfile](docker/latest-gpu/Dockerfile) | [![](https://images.microbadger.com/badges/image/wqael/notebooks:latest-gpu.svg)](https://microbadger.com/images/wqael/notebooks:latest-gpu) |
3434

3535

3636
### [Caffe](https://caffe2.ai/)
@@ -45,8 +45,9 @@ If you are reading this page from [Docker Hub](https://hub.docker.com/r/wqael/no
4545

4646
| Tag (OS-based python) | Comment | Dockerfile | Info |
4747
| --------------------- | ------- | ---------- | ---- |
48-
| `jupyter-pytorch1.3-py3` | CPU-only | [Dockerfile](docker/jupyter-pytorch1.3-py3/Dockerfile) | [![](https://images.microbadger.com/badges/image/wqael/notebooks:jupyter-pytorch1.3-py3.svg)](https://microbadger.com/images/wqael/notebooks:jupyter-pytorch1.3-py3) |
49-
| `jupyter-pytorch1.3-py3-cuda92` | Nvidia Driver >= 396.37 | [Dockerfile](docker/jupyter-pytorch1.3-py3-cuda92/Dockerfile) | [![](https://images.microbadger.com/badges/image/wqael/notebooks:jupyter-pytorch1.3-py3-cuda92.svg)](https://microbadger.com/images/wqael/notebooks:jupyter-pytorch1.3-py3-cuda92) |
48+
| `pytorch1.4` | CPU-only | [Dockerfile](docker/pytorch1.4/Dockerfile) | [![](https://images.microbadger.com/badges/image/wqael/notebooks:pytorch1.4.svg)](https://microbadger.com/images/wqael/notebooks:pytorch1.4) |
49+
| `pytorch1.4-cuda101` | Nvidia Driver >= 418.xx | [Dockerfile](docker/pytorch1.4-cuda101/Dockerfile) | [![](https://images.microbadger.com/badges/image/wqael/notebooks:pytorch1.4-cuda101.svg)](https://microbadger.com/images/wqael/notebooks:pytorch1.4-cuda101) |
50+
| `pytorch1.4-cuda92` | Nvidia Driver >= 396.xx | [Dockerfile](docker/pytorch1.4-cuda92/Dockerfile) | [![](https://images.microbadger.com/badges/image/wqael/notebooks:pytorch1.4-cuda92.svg)](https://microbadger.com/images/wqael/notebooks:pytorch1.4-cuda92) |
5051
| `jupyter-pytorch1.1-py3-cuda9` | Nvidia Driver >= 384.xx | [Dockerfile](docker/jupyter-pytorch1.1-py3-cuda9/Dockerfile) | [![](https://images.microbadger.com/badges/image/wqael/notebooks:jupyter-pytorch1.1-py3-cuda9.svg)](https://microbadger.com/images/wqael/notebooks:jupyter-pytorch1.1-py3-cuda9) |
5152
| `jupyter-pytorch1.0-py3-cuda8` | Nvidia Driver >= 375.xx | [Dockerfile](docker/jupyter-pytorch1.0-py3-cuda8/Dockerfile) | [![](https://images.microbadger.com/badges/image/wqael/notebooks:jupyter-pytorch1.0-py3-cuda8.svg)](https://microbadger.com/images/wqael/notebooks:jupyter-pytorch1.0-py3-cuda8) |
5253

@@ -63,10 +64,11 @@ If you are reading this page from [Docker Hub](https://hub.docker.com/r/wqael/no
6364

6465
| Tag (OS-based python) | Comment | Dockerfile | Info |
6566
| --------------------- | ------- | ---------- | ---- |
66-
| `tf2.0.0` | CPU-only | [Dockerfile](docker/tf2.0.0/Dockerfile) | [![](https://images.microbadger.com/badges/image/wqael/notebooks:tf2.0.0.svg)](https://microbadger.com/images/wqael/notebooks:tf2.0.0) |
67+
| `tf2.1.0` | CPU-only | [Dockerfile](docker/tf2.1.0/Dockerfile) | [![](https://images.microbadger.com/badges/image/wqael/notebooks:tf2.1.0.svg)](https://microbadger.com/images/wqael/notebooks:tf2.1.0) |
68+
| `tf2.1.0-cuda101` | Nvidia Driver >= 418.xx | [Dockerfile](docker/tf2.1.0-cuda101/Dockerfile) | [![](https://images.microbadger.com/badges/image/wqael/notebooks:tf2.1.0-cuda101.svg)](https://microbadger.com/images/wqael/notebooks:tf2.1.0-cuda101) |
6769
| `tf2.0.0-cuda10` | Nvidia Driver >= 410.xx | [Dockerfile](docker/tf2.0.0-cuda10/Dockerfile) | [![](https://images.microbadger.com/badges/image/wqael/notebooks:tf2.0.0-cuda10.svg)](https://microbadger.com/images/wqael/notebooks:tf2.0.0-cuda10) |
68-
| `jupyter-keras-tf1.14.0-py3` | CPU-only | [Dockerfile](docker/jupyter-keras-tf1.14.0-py3/Dockerfile) | [![](https://images.microbadger.com/badges/image/wqael/notebooks:jupyter-keras-tf1.14.0-py3.svg)](https://microbadger.com/images/wqael/notebooks:jupyter-keras-tf1.14.0-py3) |
69-
| `jupyter-keras-tf1.14.0-py3-cuda10` | Nvidia Driver >= 410.xx | [Dockerfile](docker/jupyter-keras-tf1.14.0-py3-cuda10/Dockerfile) | [![](https://images.microbadger.com/badges/image/wqael/notebooks:jupyter-keras-tf1.14.0-py3-cuda10.svg)](https://microbadger.com/images/wqael/notebooks:jupyter-keras-tf1.14.0-py3-cuda10) |
70+
| `tf1.15.0` | CPU-only | [Dockerfile](docker/tf1.15.0/Dockerfile) | [![](https://images.microbadger.com/badges/image/wqael/notebooks:tf1.15.0.svg)](https://microbadger.com/images/wqael/notebooks:tf1.15.0) |
71+
| `tf1.15.0-cuda10` | Nvidia Driver >= 410.xx | [Dockerfile](docker/tf1.15.0-cuda10/Dockerfile) | [![](https://images.microbadger.com/badges/image/wqael/notebooks:tf1.15.0-cuda10.svg)](https://microbadger.com/images/wqael/notebooks:tf1.15.0-cuda10) |
7072
| `jupyter-keras-tf1.12.3-py3-cuda9` | Nvidia Driver >= 384.xx | [Dockerfile](docker/jupyter-keras-tf1.12.3-py3-cuda9/Dockerfile) | [![](https://images.microbadger.com/badges/image/wqael/notebooks:jupyter-keras-tf1.12.3-py3-cuda9.svg)](https://microbadger.com/images/wqael/notebooks:jupyter-keras-tf1.12.3-py3-cuda9) |
7173
| `jupyter-keras-tf1.4.1-py3-cuda8` | Nvidia Driver >= 375.xx | [Dockerfile](docker/jupyter-keras-tf1.4.1-py3-cuda8/Dockerfile) | [![](https://images.microbadger.com/badges/image/wqael/notebooks:jupyter-keras-tf1.4.1-py3-cuda8.svg)](https://microbadger.com/images/wqael/notebooks:jupyter-keras-tf1.4.1-py3-cuda8) |
7274

deprecated/deprecated.md

+5
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,11 @@
77

88
| Tag (OS-based python) | Comment | Dockerfile | Info |
99
| --------------------- | ------- | ---------- | ---- |
10+
| `tf2.0.0` | CPU-only | [Dockerfile](tf2.0.0/Dockerfile) | [![](https://images.microbadger.com/badges/image/wqael/notebooks:tf2.0.0.svg)](https://microbadger.com/images/wqael/notebooks:tf2.0.0) |
1011
| `tf2` | CPU. Jupyter. TF 2.0 beta1. | [Dockerfile](tf2/Dockerfile) | [![](https://images.microbadger.com/badges/image/wqael/notebooks:tf2.svg) ![](https://images.microbadger.com/badges/commit/wqael/notebooks:tf2.svg)](https://microbadger.com/images/wqael/notebooks:tf2) |
1112
| `tf2-gpu` | CUDA 9. Jupyter. TF 2.0 beta1. | [Dockerfile](tf2-gpu/Dockerfile) | [![](https://images.microbadger.com/badges/image/wqael/notebooks:tf2-gpu.svg) ![](https://images.microbadger.com/badges/commit/wqael/notebooks:tf2-gpu.svg)](https://microbadger.com/images/wqael/notebooks:tf2-gpu) |
13+
| `jupyter-keras-tf1.14.0-py3` | CPU-only | [Dockerfile](jupyter-keras-tf1.14.0-py3/Dockerfile) | [![](https://images.microbadger.com/badges/image/wqael/notebooks:jupyter-keras-tf1.14.0-py3.svg)](https://microbadger.com/images/wqael/notebooks:jupyter-keras-tf1.14.0-py3) |
14+
| `jupyter-keras-tf1.14.0-py3-cuda10` | Nvidia Driver >= 410.xx | [Dockerfile](jupyter-keras-tf1.14.0-py3-cuda10/Dockerfile) | [![](https://images.microbadger.com/badges/image/wqael/notebooks:jupyter-keras-tf1.14.0-py3-cuda10.svg)](https://microbadger.com/images/wqael/notebooks:jupyter-keras-tf1.14.0-py3-cuda10) |
1215
| `jupyter-keras-tf1.13.1-py3` | CPU-only | [Dockerfile](jupyter-keras-tf1.13.1-py3/Dockerfile) | [![](https://images.microbadger.com/badges/image/wqael/notebooks:jupyter-keras-tf1.13.1-py3.svg) ![](https://images.microbadger.com/badges/commit/wqael/notebooks:jupyter-keras-tf1.13.1-py3.svg)](https://microbadger.com/images/wqael/notebooks:jupyter-keras-tf1.13.1-py3) |
1316
| `jupyter-keras-tf1.13.1-py3-cuda10` | Nvidia Driver >= 410.xx | [Dockerfile](jupyter-keras-tf1.13.1-py3-cuda10/Dockerfile) | [![](https://images.microbadger.com/badges/image/wqael/notebooks:jupyter-keras-tf1.13.1-py3-cuda10.svg) ![](https://images.microbadger.com/badges/commit/wqael/notebooks:jupyter-keras-tf1.13.1-py3-cuda10.svg)](https://microbadger.com/images/wqael/notebooks:jupyter-keras-tf1.13.1-py3-cuda10) |
1417
| `jupyter-keras-tf1.12.0-py3` | CPU-only | [Dockerfile](jupyter-keras-tf1.12.0-py3/Dockerfile) | [![](https://images.microbadger.com/badges/image/wqael/notebooks:jupyter-keras-tf1.12.0-py3.svg) ![](https://images.microbadger.com/badges/commit/wqael/notebooks:jupyter-keras-tf1.12.0-py3.svg)](https://microbadger.com/images/wqael/notebooks:jupyter-keras-tf1.12.0-py3) |
@@ -28,6 +31,8 @@
2831

2932
| Tag (OS-based python) | Comment | Dockerfile | Info |
3033
| --------------------- | ------- | ---------- | ---- |
34+
| `jupyter-pytorch1.3-py3` | CPU-only | [Dockerfile](jupyter-pytorch1.3-py3/Dockerfile) | [![](https://images.microbadger.com/badges/image/wqael/notebooks:jupyter-pytorch1.3-py3.svg)](https://microbadger.com/images/wqael/notebooks:jupyter-pytorch1.3-py3) |
35+
| `jupyter-pytorch1.3-py3-cuda92` | Nvidia Driver >= 396.37 | [Dockerfile](jupyter-pytorch1.3-py3-cuda92/Dockerfile) | [![](https://images.microbadger.com/badges/image/wqael/notebooks:jupyter-pytorch1.3-py3-cuda92.svg)](https://microbadger.com/images/wqael/notebooks:jupyter-pytorch1.3-py3-cuda92) |
3136
| `jupyter-pytorch1.2-py3` | CPU-only | [Dockerfile](jupyter-pytorch1.2-py3/Dockerfile) | [![](https://images.microbadger.com/badges/image/wqael/notebooks:jupyter-pytorch1.2-py3.svg) ![](https://images.microbadger.com/badges/commit/wqael/notebooks:jupyter-pytorch1.2-py3.svg)](https://microbadger.com/images/wqael/notebooks:jupyter-pytorch1.2-py3) |
3237
| `jupyter-pytorch1.2-py3-cuda10` | Nvidia Driver >= 410.xx | [Dockerfile](jupyter-pytorch1.2-py3-cuda10/Dockerfile) | [![](https://images.microbadger.com/badges/image/wqael/notebooks:jupyter-pytorch1.2-py3-cuda10.svg) ![](https://images.microbadger.com/badges/commit/wqael/notebooks:jupyter-pytorch1.2-py3-cuda10.svg)](https://microbadger.com/images/wqael/notebooks:jupyter-pytorch1.2-py3-cuda10) |
3338
| `jupyter-pytorch1.1-py3` | CPU-only | [Dockerfile](jupyter-pytorch1.1-py3/Dockerfile) | [![](https://images.microbadger.com/badges/image/wqael/notebooks:jupyter-pytorch1.1-py3.svg) ![](https://images.microbadger.com/badges/commit/wqael/notebooks:jupyter-pytorch1.1-py3.svg)](https://microbadger.com/images/wqael/notebooks:jupyter-pytorch1.1-py3) |
File renamed without changes.
File renamed without changes.
File renamed without changes.

docker/latest-gpu/Dockerfile

+12-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM wqael/mldock:latest-gpu
22

3-
LABEL description="Jupyter / PyTorch 1.2 / Keras / tensorflow/tensorflow:1.14.0-gpu-py3 (Python 3.6.8 / Ubuntu 16.04.5 LTS)" \
3+
LABEL description="PyTorch 1.4 / Keras 2.3.1 / TensorFlow 1.15.0 / Python 3.5 / Nvidia CUDA 10.1 / Ubuntu 16.04" \
44
maintainer="https://github.com/rlan/notebooks"
55

66

@@ -16,14 +16,23 @@ LABEL org.label-schema.build-date=$BUILD_DATE \
1616

1717
ARG PYTHON=python3
1818
ARG PIP=pip3
19+
# Skips tzdata configuration
20+
ARG DEBIAN_FRONTEND=noninteractive
1921

20-
RUN ${PIP} --no-cache-dir install -q -U \
22+
RUN apt-get -qq update \
23+
&& apt-get -qq install -y --no-install-recommends \
24+
python3-pandas \
25+
&& apt-get -qq clean \
26+
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
27+
28+
RUN ${PIP} --no-cache-dir install -q --upgrade \
2129
jupyterlab \
2230
matplotlib \
2331
opencv-python-headless \
2432
pillow \
2533
scikit-learn \
26-
scikit-image
34+
scikit-image \
35+
seaborn
2736

2837
# Set up our notebook config.
2938
COPY jupyter_notebook_config.py /root/.jupyter/

docker/latest/Dockerfile

+12-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM wqael/mldock:latest
22

3-
LABEL description="Jupyter / PyTorch 1.2 / Keras / tensorflow/tensorflow:1.14.0-py3 (Python 3.6.8 / Ubuntu 16.04.5 LTS)" \
3+
LABEL description="PyTorch 1.4 / Keras 2.3.1 / tensorflow/tensorflow:1.15.0-py3 (Python 3.6.8 / Ubuntu 16.04.5 LTS)" \
44
maintainer="https://github.com/rlan/notebooks"
55

66

@@ -16,14 +16,23 @@ LABEL org.label-schema.build-date=$BUILD_DATE \
1616

1717
ARG PYTHON=python3
1818
ARG PIP=pip3
19+
# Skips tzdata configuration
20+
ARG DEBIAN_FRONTEND=noninteractive
1921

20-
RUN ${PIP} --no-cache-dir install -q -U \
22+
RUN apt-get -qq update \
23+
&& apt-get -qq install -y --no-install-recommends \
24+
python3-pandas \
25+
&& apt-get -qq clean \
26+
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
27+
28+
RUN ${PIP} --no-cache-dir install -q --upgrade \
2129
jupyterlab \
2230
matplotlib \
2331
opencv-python-headless \
2432
pillow \
2533
scikit-learn \
26-
scikit-image
34+
scikit-image \
35+
seaborn
2736

2837
# Set up our notebook config.
2938
COPY jupyter_notebook_config.py /root/.jupyter/

docker/pytorch1.4-cuda101/Dockerfile

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
FROM wqael/mldock:pytorch1.4-cuda101
2+
3+
LABEL description="Jupyter / PyTorch 1.4 / Python 3.5 / nvidia/cuda:10.1-cudnn7-runtime-ubuntu16.04" \
4+
maintainer="https://github.com/rlan/notebooks"
5+
6+
7+
# Build-time metadata as defined at http://label-schema.org
8+
ARG BUILD_DATE
9+
ARG VCS_REF
10+
ARG VERSION
11+
LABEL org.label-schema.build-date=$BUILD_DATE \
12+
org.label-schema.vcs-ref=$VCS_REF \
13+
org.label-schema.vcs-url="https://github.com/rlan/notebooks" \
14+
org.label-schema.version=$VERSION \
15+
org.label-schema.schema-version="1.0"
16+
17+
ARG PYTHON=python3
18+
ARG PIP=pip3
19+
20+
RUN apt-get -qq update \
21+
&& apt-get -qq install -y --no-install-recommends \
22+
python3-pandas \
23+
&& apt-get -qq clean \
24+
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
25+
26+
RUN ${PIP} --no-cache-dir install -q -U \
27+
jupyterlab \
28+
matplotlib \
29+
opencv-python-headless \
30+
pillow \
31+
scikit-learn \
32+
scikit-image \
33+
seaborn
34+
35+
# Set up our notebook config.
36+
COPY jupyter_notebook_config.py /root/.jupyter/
37+
38+
# Jupyter has issues with being run directly:
39+
# https://github.com/ipython/ipython/issues/7062
40+
# We just add a little wrapper script.
41+
COPY run_jupyter.sh /
42+
43+
# IPython
44+
EXPOSE 8888
45+
46+
WORKDIR /notebooks
47+
48+
CMD ["/run_jupyter.sh", "--allow-root"]

docker/pytorch1.4-cuda101/hooks/build

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash
2+
# $IMAGE_NAME var is injected into the build so the tag is correct.
3+
docker build --build-arg VCS_REF=`git rev-parse --short HEAD` \
4+
--build-arg BUILD_DATE=`date -u +”%Y-%m-%dT%H:%M:%SZ”` \
5+
-t $IMAGE_NAME .
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import os
2+
from IPython.lib import passwd
3+
4+
c = c # pylint:disable=undefined-variable
5+
c.NotebookApp.ip = '0.0.0.0'
6+
c.NotebookApp.port = int(os.getenv('PORT', 8888))
7+
c.NotebookApp.open_browser = False
8+
9+
# sets a password if PASSWORD is set in the environment
10+
if 'PASSWORD' in os.environ:
11+
password = os.environ['PASSWORD']
12+
if password:
13+
c.NotebookApp.password = passwd(password)
14+
else:
15+
c.NotebookApp.password = ''
16+
c.NotebookApp.token = ''
17+
del os.environ['PASSWORD']
18+
+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/bash
2+
jupyter notebook "$@"

docker/pytorch1.4-cuda92/Dockerfile

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
FROM wqael/mldock:pytorch1.4-cuda92
2+
3+
LABEL description="Jupyter / PyTorch 1.4 / Python 3 / nvidia/cuda:9.2-cudnn7-runtime-ubuntu16.04" \
4+
maintainer="https://github.com/rlan/notebooks"
5+
6+
7+
# Build-time metadata as defined at http://label-schema.org
8+
ARG BUILD_DATE
9+
ARG VCS_REF
10+
ARG VERSION
11+
LABEL org.label-schema.build-date=$BUILD_DATE \
12+
org.label-schema.vcs-ref=$VCS_REF \
13+
org.label-schema.vcs-url="https://github.com/rlan/notebooks" \
14+
org.label-schema.version=$VERSION \
15+
org.label-schema.schema-version="1.0"
16+
17+
ARG PYTHON=python3
18+
ARG PIP=pip3
19+
20+
RUN apt-get -qq update \
21+
&& apt-get -qq install -y --no-install-recommends \
22+
python3-pandas \
23+
&& apt-get -qq clean \
24+
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
25+
26+
RUN ${PIP} --no-cache-dir install -q -U \
27+
jupyterlab \
28+
matplotlib \
29+
opencv-python-headless \
30+
pillow \
31+
scikit-learn \
32+
scikit-image \
33+
seaborn
34+
35+
# Set up our notebook config.
36+
COPY jupyter_notebook_config.py /root/.jupyter/
37+
38+
# Jupyter has issues with being run directly:
39+
# https://github.com/ipython/ipython/issues/7062
40+
# We just add a little wrapper script.
41+
COPY run_jupyter.sh /
42+
43+
# IPython
44+
EXPOSE 8888
45+
46+
WORKDIR /notebooks
47+
48+
CMD ["/run_jupyter.sh", "--allow-root"]

docker/pytorch1.4-cuda92/hooks/build

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash
2+
# $IMAGE_NAME var is injected into the build so the tag is correct.
3+
docker build --build-arg VCS_REF=`git rev-parse --short HEAD` \
4+
--build-arg BUILD_DATE=`date -u +”%Y-%m-%dT%H:%M:%SZ”` \
5+
-t $IMAGE_NAME .
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import os
2+
from IPython.lib import passwd
3+
4+
c = c # pylint:disable=undefined-variable
5+
c.NotebookApp.ip = '0.0.0.0'
6+
c.NotebookApp.port = int(os.getenv('PORT', 8888))
7+
c.NotebookApp.open_browser = False
8+
9+
# sets a password if PASSWORD is set in the environment
10+
if 'PASSWORD' in os.environ:
11+
password = os.environ['PASSWORD']
12+
if password:
13+
c.NotebookApp.password = passwd(password)
14+
else:
15+
c.NotebookApp.password = ''
16+
c.NotebookApp.token = ''
17+
del os.environ['PASSWORD']
18+
+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/bash
2+
jupyter notebook "$@"

docker/pytorch1.4/Dockerfile

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
FROM wqael/mldock:pytorch1.4
2+
3+
LABEL description="Jupyter / PyTorch 1.4 / Python 3 / ubuntu16.04" \
4+
maintainer="https://github.com/rlan/notebooks"
5+
6+
7+
# Build-time metadata as defined at http://label-schema.org
8+
ARG BUILD_DATE
9+
ARG VCS_REF
10+
ARG VERSION
11+
LABEL org.label-schema.build-date=$BUILD_DATE \
12+
org.label-schema.vcs-ref=$VCS_REF \
13+
org.label-schema.vcs-url="https://github.com/rlan/notebooks" \
14+
org.label-schema.version=$VERSION \
15+
org.label-schema.schema-version="1.0"
16+
17+
ARG PYTHON=python3
18+
ARG PIP=pip3
19+
20+
RUN apt-get -qq update \
21+
&& apt-get -qq install -y --no-install-recommends \
22+
python3-pandas \
23+
&& apt-get -qq clean \
24+
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
25+
26+
RUN ${PIP} --no-cache-dir install -q -U \
27+
jupyterlab \
28+
matplotlib \
29+
opencv-python-headless \
30+
pillow \
31+
scikit-learn \
32+
scikit-image \
33+
seaborn
34+
35+
# Set up our notebook config.
36+
COPY jupyter_notebook_config.py /root/.jupyter/
37+
38+
# Jupyter has issues with being run directly:
39+
# https://github.com/ipython/ipython/issues/7062
40+
# We just add a little wrapper script.
41+
COPY run_jupyter.sh /
42+
43+
# IPython
44+
EXPOSE 8888
45+
46+
WORKDIR /notebooks
47+
48+
CMD ["/run_jupyter.sh", "--allow-root"]

docker/pytorch1.4/hooks/build

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash
2+
# $IMAGE_NAME var is injected into the build so the tag is correct.
3+
docker build --build-arg VCS_REF=`git rev-parse --short HEAD` \
4+
--build-arg BUILD_DATE=`date -u +”%Y-%m-%dT%H:%M:%SZ”` \
5+
-t $IMAGE_NAME .
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import os
2+
from IPython.lib import passwd
3+
4+
c = c # pylint:disable=undefined-variable
5+
c.NotebookApp.ip = '0.0.0.0'
6+
c.NotebookApp.port = int(os.getenv('PORT', 8888))
7+
c.NotebookApp.open_browser = False
8+
9+
# sets a password if PASSWORD is set in the environment
10+
if 'PASSWORD' in os.environ:
11+
password = os.environ['PASSWORD']
12+
if password:
13+
c.NotebookApp.password = passwd(password)
14+
else:
15+
c.NotebookApp.password = ''
16+
c.NotebookApp.token = ''
17+
del os.environ['PASSWORD']
18+

docker/pytorch1.4/run_jupyter.sh

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/bash
2+
jupyter notebook "$@"

0 commit comments

Comments
 (0)