forked from kmader/dlstudio-binder
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
65 lines (52 loc) · 1.8 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
62
63
64
65
FROM kaixhin/digits:latest
# TensorBoard
EXPOSE 6006
# Create basic user
ENV NB_USER jovyan
ENV NB_UID 1000
ENV HOME /home/${NB_USER}
RUN adduser --disabled-password \
--gecos "Default user" \
--uid ${NB_UID} \
${NB_USER}
USER root
# install python3 and jupyter
RUN apt-get update && apt-get install -y --no-install-recommends software-properties-common curl graphviz
RUN add-apt-repository ppa:deadsnakes/ppa && \
apt-get update && apt-get install -y --no-install-recommends \
python3.6 && \
rm -rf /var/lib/apt/lists/*
RUN curl https://bootstrap.pypa.io/get-pip.py | python3.6
RUN pip3 install --upgrade setuptools pip
RUN pip3 install jupyter notebook
RUN pip3 install https://github.com/betatim/nbserverproxy/archive/master.zip
ENV HOME /root
# Copy repo into ${HOME}, make user own $HOME
COPY . ${HOME}
WORKDIR ${HOME}
RUN jupyter serverextension enable --py nbserverproxy
RUN pip3 install -e.
RUN jupyter serverextension enable --py nbdlstudioproxy
RUN jupyter nbextension install --py nbdlstudioproxy
RUN jupyter nbextension enable --py nbdlstudioproxy
RUN mv ${HOME}/4q.ico ${HOME}/digits/digits/static/images/nvidia.ico
# move the layout with fixed links
RUN mv ${HOME}/layout.html ${HOME}/digits/digits/templates/layout.html
WORKDIR ${HOME}/digits
RUN python setup.py install
# install two plugins
WORKDIR ${HOME}/digits_plugins/sunnybrook/
RUN python setup.py install
WORKDIR ${HOME}/digits_plugins/imageGradients/
RUN python setup.py install
WORKDIR ${HOME}
# get some test data to play with
RUN python -m digits.download_data cifar10 ~/cifar10
RUN chown -R ${NB_USER} ${HOME}
WORKDIR ${HOME}
USER ${NB_USER}
ENV DIGITS_JOBS_DIR=${HOME}/jobs
ENV DIGITS_LOGFILE_FILENAME=${HOME}/digits.log
ENV PYTHONPATH=/usr/local/python
ENTRYPOINT [""]
CMD ["jupyter", "notebook", "--ip", "0.0.0.0"]