-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
80 lines (74 loc) · 2.21 KB
/
Dockerfile
File metadata and controls
80 lines (74 loc) · 2.21 KB
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 python:3.7.3-slim-stretch
LABEL maintainer="Franco I. Vargas <vargasfrancoivan@gmail.com>" \
name="from Docker to Deep Learning" \
description="Container with almost everything that you may need." \
version="Alpha 1.0"
ENV BUILD_PACKAGES="\
build-essential \
linux-headers-4.9 \
python3-dev \
cmake \
tcl-dev \
xz-utils \
zlib1g-dev \
git \
curl" \
APT_PACKAGES="\
ca-certificates \
openssl \
graphviz \
fonts-noto \
libpng16-16 \
libfreetype6 \
libjpeg62-turbo \
libgomp1" \
PIP_PACKAGES="\
pyyaml \
mkl \
cffi \
h5py \
requests \
pillow \
graphviz \
numpy \
pandas \
scipy \
scikit-learn \
seaborn \
matplotlib \
jupyter \
xgboost \
tensorflow \
keras \
torch \
torchvision \
mxnet-mkl" \
JUPYTER_CONFIG_DIR=/home/.ipython/profile_default/startup \
LANG=C.UTF-8
RUN set -ex; \
apt-get update -y; \
apt-get upgrade -y; \
apt-get install -y ${APT_PACKAGES}; \
apt-get install -y ${BUILD_PACKAGES}; \
pip install -U -v setuptools wheel; \
pip install -U -v ${PIP_PACKAGES}; \
apt-get remove --purge --auto-remove -y ${BUILD_PACKAGES}; \
apt-get clean; \
apt-get autoclean; \
apt-get autoremove; \
rm -rf /tmp/* /var/tmp/*; \
rm -rf /var/lib/apt/lists/*; \
rm -rf /var/cache/apt/archives/*.deb \
/var/cache/apt/archives/partial/*.deb \
/var/cache/apt/*.bin; \
find /usr/lib/python3 -name __pycache__ | xargs rm -rf; \
rm -rf /root/.[acpw]*; \
pip install jupyter && jupyter nbextension enable --py widgetsnbextension; \
mkdir -p ${JUPYTER_CONFIG_DIR}; \
echo "import warnings" | tee ${JUPYTER_CONFIG_DIR}/config.py; \
echo "warnings.filterwarnings('ignore')" | tee -a ${JUPYTER_CONFIG_DIR}/config.py; \
echo "c.NotebookApp.token = u''" | tee -a ${JUPYTER_CONFIG_DIR}/config.py
WORKDIR /home/notebooks
EXPOSE 8888
CMD [ "jupyter", "notebook", "--port=8888", "--no-browser", \
"--allow-root", "--ip=0.0.0.0", "--NotebookApp.token=" ]