For
https://github.com/matrixBT/DQN-Atari-Enduro
Dockerfile:
FROM tensorflow/tensorflow:1.12.0-gpu-py3
#https://github.com/yanpanlau/DDPG-Keras-Torcs
WORKDIR /home/frank/rl/DQN-Atari-Enduro
ADD . /home/DQN-Atari-Enduro
RUN apt-get update
RUN apt-get install -y vim xautomation torcs
RUN apt-get install -y libjpeg-dev cmake swig python-pyglet python3-opengl libboost-all-dev \
libsdl2-2.0.0 libsdl2-dev libglu1-mesa libglu1-mesa-dev libgles2-mesa-dev \
freeglut3 xvfb libav-tools
#optional gtags
RUN apt-get install -y exuberant-ctags libncurses-dev
RUN pip install jupyter scipy gym
RUN pip install "gym[atari]"
RUN pip install keras-rl
RUN pip install https://pypi.python.org/packages/68/c3/300c6f92b21886b0fe42c13f3a39a06c6cb90c9fbb1b71da85fe59091a7d/pyglet-1.2.4-py3-none-any.whl#md5=08e6404a678f91b4eee85eb33b028d88
ENV PATH="/usr/games:${PATH}"
CMD ["/bin/bash"]
launch jupyter notebook within docker container:
1.
(~/rl/DQN-Atari-Enduro) viper1 $ docker run --runtime=nvidia -it -e DISPLAY=$DISPLAY -e XAUTHORITY=$XAUTHORITY -v /tmp/.X11-unix:/tmp/.X11-unix -v /home/frank/rl/DQN-Atari-Enduro:/home/DQN-Atari-Enduro -v /var/run/docker.sock:/var/run/docker.sock --workdir /home/DQN-Atari-Enduro -p 8888:8888 tensorflow/tensorflow:DQN-Atari-Enduro /bin/bash
2.
root@9da3183dad9e:/home/DQN-Atari-Enduro# jupyter notebook --ip 0.0.0.0 --no-browser --allow-root --port 8888
3.
open browser in host and paste
http://localhost:8888
4.
then input token from step2
留言
張貼留言