mirror of
https://github.com/ArthurDanjou/handson-ml3.git
synced 2026-01-24 08:50:26 +01:00
Update Dockerfile to TensorFlow 0.11.0
This commit is contained in:
59
Dockerfile
59
Dockerfile
@@ -4,36 +4,55 @@ USER root
|
||||
|
||||
RUN apt-get update -y &&\
|
||||
apt-get install --fix-missing -y \
|
||||
python-numpy\
|
||||
python-dev\
|
||||
cmake\
|
||||
zlib1g-dev\
|
||||
libjpeg-dev\
|
||||
xvfb\
|
||||
libav-tools\
|
||||
xorg-dev\
|
||||
python-opengl\
|
||||
libboost-all-dev\
|
||||
libsdl2-dev\
|
||||
swig &&\
|
||||
python-dev\
|
||||
python-opengl\
|
||||
python-pip\
|
||||
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
|
||||
|
||||
# Python 2
|
||||
RUN conda install -c jjhelmus tensorflow=0.10.0
|
||||
RUN conda install -c conda-forge jupyter_contrib_nbextensions
|
||||
RUN conda install -c https://conda.anaconda.org/kne pybox2d
|
||||
RUN /usr/bin/pip2 install --upgrade --user pip wheel
|
||||
RUN /usr/bin/pip3 install --upgrade --user pip wheel
|
||||
|
||||
ENV PATH /home/main/.local/bin:$PATH
|
||||
|
||||
# Install scientific packages
|
||||
RUN pip2 install --upgrade --user matplotlib numexpr numpy pandas Pillow protobuf psutil scipy scikit-learn sympy jupyter
|
||||
RUN pip3 install --upgrade --user matplotlib numexpr numpy pandas Pillow protobuf psutil scipy scikit-learn sympy jupyter
|
||||
|
||||
# Install TensorFlow
|
||||
RUN pip2 install --user --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.11.0-cp27-none-linux_x86_64.whl
|
||||
RUN pip3 install --user --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.11.0-cp34-cp34m-linux_x86_64.whl
|
||||
|
||||
# Install OpenAI gym
|
||||
RUN pip2 install --user --upgrade gym
|
||||
RUN pip3 install --user --upgrade gym
|
||||
RUN pip2 install --user --upgrade 'gym[all]'
|
||||
RUN pip3 install --user --upgrade 'gym[all]'
|
||||
|
||||
# Install Jupyter extensions
|
||||
RUN pip3 install --user --upgrade https://github.com/ipython-contrib/jupyter_contrib_nbextensions/tarball/master
|
||||
|
||||
# Jupyter extensions
|
||||
#RUN conda install -c conda-forge jupyter_contrib_nbextensions
|
||||
RUN jupyter contrib nbextension install --user
|
||||
RUN jupyter nbextension enable toc2/main
|
||||
RUN pip install --upgrade gym
|
||||
RUN pip install --upgrade 'gym[atari]'
|
||||
RUN pip install --upgrade 'gym[box2d]'
|
||||
|
||||
# Python 3
|
||||
RUN conda install -n python3 -c jjhelmus tensorflow=0.10.0
|
||||
RUN conda install -n python3 -c https://conda.anaconda.org/kne pybox2d
|
||||
RUN /bin/bash -c "source activate python3 && pip install --upgrade gym"
|
||||
RUN /bin/bash -c "source activate python3 && pip install --upgrade 'gym[atari]'"
|
||||
RUN /bin/bash -c "source activate python3 && pip install --upgrade 'gym[box2d]'"
|
||||
RUN /home/main/anaconda2/bin/jupyter kernelspec remove -f python3
|
||||
RUN /usr/bin/python2 -m ipykernel install --user
|
||||
RUN /usr/bin/python3 -m ipykernel install --user
|
||||
|
||||
ADD .binder_start /home/main/
|
||||
|
||||
Reference in New Issue
Block a user