Skip to content

Commit

Permalink
Docker that adds user provided atari ROMs to installed atari-py package.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 391113210
Change-Id: I35d9d41f34e2ff8c34d5ab24acc354d307e94a54
  • Loading branch information
tfboyd authored and Copybara-Service committed Aug 16, 2021
1 parent b95f033 commit c59573d
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions tools/docker/ubuntu_1804_atari
@@ -0,0 +1,47 @@
# Docker for running tf-agents with atari and user provided ROMs.
#
# For current details on installing ROMs for atari-py read their instructions:
# https://github.com/openai/atari-py/blob/master/README.md.
#
# As of 12-AUG-2021 the suggestion from OpenAI is to:
# wget http://www.atarimania.com/roms/Roms.rar && unrar x Roms.rar \
# && unzip ROMS.zip && unzip HC\ ROMS.zip
#
# After unzipping, the Pong ROM is located at:
# `HC ROMS/BY ALPHABET/S-Z/Video Olympics - Pong Sports.bin`
#
# Example usage:
# This docker builds on the core tf-agents docker.
#
# Builds a core tf-agents image with the nightly version of TF-Agents and
# Tensorflow.
# docker build --pull -t tf_agents/core \
# --build-arg tf_agents_pip_spec=tf-agents-nightly[reverb] \
# -f ./tools/docker/ubuntu_1804_tf_agents ./tools/docker
#
# Builds a docker that installs user provided ROMs located in
# ./tools/docker/roms into the atari-py package.
# docker build -t tf_agents/atari -f ./tools/docker/ubuntu_1804_atari \
# ./tools/docker
#
#
# Builds a core tf-agnets docker with the latest stable TF-Agents and
# Tensorflow.
# docker build --pull -t tf_agents/core \
# --build-arg tf_agents_pip_spec=tf-agents[reverb] \
# --build-arg tensorflow_pip_spec=tensorflow \
# -f ./tools/docker/ubuntu_1804_tf_agents ./tools/docker
#
# Builds a docker that installs user provided ROMs located in
# ./tools/docker/roms into the atari-py package.
# docker build -t tf_agents/atari -f ./tools/docker/ubuntu_1804_atari \
# ./tools/docker
#
FROM tf_agents/core as tf_agents_core
ARG rom_dir=roms

# Copies ROMs into image.
COPY ${rom_dir} /roms

# Installs the ROMs into the atari python package.
RUN python3 -m atari_py.import_roms /roms

0 comments on commit c59573d

Please sign in to comment.