forked from ageron/handson-ml
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
53 lines (39 loc) · 1.39 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
FROM andrewosh/binder-base
USER root
RUN apt-get update -y &&\
apt-get install --fix-missing -y \
cmake\
libjpeg-dev\
libav-tools\
libboost-all-dev\
libsdl2-dev\
python3-dev\
python3-opengl\
python3-pip\
swig\
xorg-dev\
xvfb\
zlib1g-dev &&\
apt-get clean &&\
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*tmp
USER main
ADD requirements.txt /home/main/
RUN /usr/bin/pip3 install --upgrade --user pip wheel
ENV PATH /home/main/.local/bin:$PATH
# Install scientific packages
RUN pip3 install --upgrade --user -r requirements.txt
# Install OpenAI gym
RUN pip3 install --upgrade --user 'gym[all]'
# Install Jupyter extensions
RUN pip3 install --user --upgrade https://github.com/ipython-contrib/jupyter_contrib_nbextensions/tarball/master
RUN rm -rf /home/main/.cache
# Jupyter extensions
RUN jupyter contrib nbextension install --user
RUN jupyter nbextension enable toc2/main
RUN /home/main/anaconda2/bin/jupyter kernelspec remove -f python3
RUN /usr/bin/python3 -m ipykernel install --user
ADD .binder_start /home/main/
RUN mkdir -p $HOME/.jupyter
RUN echo "c.NotebookApp.token = ''" >> $HOME/.jupyter/jupyter_notebook_config.py
RUN echo "c.NotebookApp.password=''" >> $HOME/.jupyter/jupyter_notebook_config.py
RUN echo "c.NotebookApp.password_required=False" >> $HOME/.jupyter/jupyter_notebook_config.py