Skip to content

Instantly share code, notes, and snippets.

@takeru
Created August 23, 2019 14:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save takeru/55b686b459bfa60f83c4ad75bc5d51d6 to your computer and use it in GitHub Desktop.
Save takeru/55b686b459bfa60f83c4ad75bc5d51d6 to your computer and use it in GitHub Desktop.
TensorFlow 1.13.1-gpu-py3-jupyter + OpenAI Gym Environments for Donkey Car + Simulator on Mac
# git clone https://github.com/tensorflow/tensorflow.git
# cd tensorflow/tensorflow/tools/dockerfiles
# docker build -f dockerfiles/gpu-jupyter.Dockerfile -t tf:1.13.1-gpu-py3-jupyter . --build-arg USE_PYTHON_3_NOT_2=True --build-arg TF_PACKAGE_VERSION=1.13.1
FROM tf:1.13.1-gpu-py3-jupyter
RUN apt install -y git lv nano tree wget
RUN git clone https://github.com/autorope/donkeycar.git
RUN cd /tf/donkeycar && \
git checkout master && \
pip install -e .[tf_gpu] && \
pip install -e .[dev]
RUN cd /tf/donkeycar && \
git clone https://github.com/tawnkramer/gym-donkeycar && \
pip install -e gym-donkeycar
WORKDIR /tf
# COPY DonkeySimLinux-September2018.zip /tf/donkeycar/
# RUN unzip /tf/donkeycar/DonkeySimLinux-September2018.zip
RUN donkey createcar --path mysim
RUN echo $'\n\
DONKEY_GYM = True\n\
DONKEY_SIM_PATH = "xxx /tf/DonkeySimLinux/donkey_sim.x86_64"\n\
DONKEY_GYM_ENV_NAME = "donkey-generated-track-v0" # ("donkey-generated-track-v0"|"donkey-generated-roads-v0"|"donkey-warehouse-v0"|"donkey-avc-sparkfun-v0")\n\
DONKEY_SIM_HEADLESS = "1"\n\
' >> mysim/myconfig.py
# (host) docker build . -t tf-1.13.1-gpu-py3-jupyter-donkey
# (host) docker run --gpus all --publish 8888:8888 --publish 8887:8887 --publish 9090:9090 -v /home/takeru/proj/tf/work:/tf/work --name donkey tf-1.13.1-gpu-py3-jupyter-donkey
# (host) docker exec -it donkey bash
# (container) cd mysim && python manage.py drive
# (mac) ssh -N -vv DOCKER_HOST -L 9090:127.0.0.1:9090
# (mac) /Applications/donkey_sim.app/Contents/MacOS/donkey_sim --port 9090
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment