diff --git a/Dockerfile b/Dockerfile index 87539fb..b035221 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,59 +2,34 @@ FROM andrewosh/binder-base USER root -# Extra packages needs for OpenAI gym RUN apt-get update -y &&\ apt-get install --fix-missing -y \ - cmake\ - libav-tools\ - libboost-all-dev\ - libjpeg-dev\ - libsdl2-dev\ - python-dev\ python-numpy\ - python-opengl\ - python-pip\ - python3-dev\ - python3-numpy\ - python3-opengl\ - python3-pip\ - swig\ - xorg-dev\ + python-dev\ + cmake\ + zlib1g-dev\ + libjpeg-dev\ xvfb\ - zlib1g-dev &&\ + libav-tools\ + xorg-dev\ + python-opengl\ + libboost-all-dev\ + libsdl2-dev\ + swig &&\ apt-get clean &&\ rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*tmp USER main -# Add nbextensions to Jupyter and activate the Table of Contents +# Python 2 +RUN conda install -c jjhelmus tensorflow=0.10.0 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]' -# Use upgraded pip -RUN /usr/bin/pip 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 pip install --upgrade --user matplotlib numexpr numpy pandas Pillow protobuf psutil scipy scikit-learn sympy -RUN pip3 install --upgrade --user matplotlib numexpr numpy pandas Pillow protobuf psutil scipy scikit-learn sympy - -# Install TensorFlow -RUN pip install --upgrade --user https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.11.0rc0-cp27-none-linux_x86_64.whl -RUN pip3 install --upgrade --user https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.11.0rc0-cp34-cp34m-linux_x86_64.whl - -# Install OpenAI gym -RUN pip install --upgrade --user gym -RUN pip3 install --upgrade --user gym -RUN pip install --upgrade --user "gym[atari]" -RUN pip3 install --upgrade --user "gym[atari]" - -# Replace the default script to start Jupyter with xvfb-run so that OpenAI gym -# can render some of the environments (eg. CartPole-v0) without crashing when -# it tries to access the display on a headless server. -ADD start-notebook.sh /home/main/ - -RUN ipython2 kernel install --user -RUN ipython3 kernel install --user +# Python 3 +RUN conda install -n python3 -c jjhelmus tensorflow=0.10.0 +RUN /bin/bash -c "source activate python3 && pip install --upgrade gym" +RUN /bin/bash -c "source activate python3 && pip install --upgrade 'gym[atari]'"