Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Docker build settings for January 20, 2023 #54

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 15 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
FROM tensorflow/tensorflow:2.4.2-gpu
FROM tensorflow/tensorflow:2.6.0-gpu

# Update the CUDA Linux GPG Repository Key
RUN apt-key del 7fa2af80
RUN apt-get install -y wget && \
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-keyring_1.0-1_all.deb && \
dpkg -i cuda-keyring_1.0-1_all.deb && \
rm /etc/apt/sources.list.d/cuda.list && \
apt-get update

# System packages.
RUN apt-get update && apt-get install -y \
Expand All @@ -17,25 +25,19 @@ RUN mkdir -p /root/.mujoco && \
rm mujoco.zip

# Python packages.
RUN pip3 install --no-cache-dir \
'gym[atari]' \
atari_py \
crafter \
dm_control \
ruamel.yaml \
tensorflow_probability==0.12.2
COPY requirements.txt ./
RUN pip3 install --upgrade pip && \
pip3 install -r requirements.txt --no-cache-dir && \
rm requirements.txt

# Atari ROMS.
RUN wget -L -nv http://www.atarimania.com/roms/Roms.rar && \
unrar x Roms.rar && \
unzip ROMS.zip && \
python3 -m atari_py.import_roms ROMS && \
rm -rf Roms.rar ROMS.zip ROMS
rm -rf "Roms.rar" "ROMS" "HC ROMS"

# MuJoCo key.
ARG MUJOCO_KEY=""
RUN echo "$MUJOCO_KEY" > /root/.mujoco/mjkey.txt
RUN cat /root/.mujoco/mjkey.txt
RUN wget -P /root/.mujoco https://www.roboti.us/file/mjkey.txt

# DreamerV2.
ENV TF_XLA_FLAGS --tf_xla_auto_jit=2
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ requires you to have Docker with GPU access set up.
Check your setup:

```sh
docker run -it --rm --gpus all tensorflow/tensorflow:2.4.2-gpu nvidia-smi
docker run -it --rm --gpus all tensorflow/tensorflow:2.6.0-gpu nvidia-smi
```

Train on Atari:
Expand All @@ -147,7 +147,7 @@ docker run -it --rm --gpus all -v ~/logdir:/logdir dreamerv2 \
Train on DM Control:

```sh
docker build -t dreamerv2 . --build-arg MUJOCO_KEY="$(cat ~/.mujoco/mjkey.txt)"
docker build -t dreamerv2 .
docker run -it --rm --gpus all -v ~/logdir:/logdir dreamerv2 \
python3 dreamerv2/train.py --logdir /logdir/dmc_walker_walk/dreamerv2/1 \
--configs dmc_vision --task dmc_walker_walk
Expand Down
77 changes: 77 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
absl-py==0.13.0
asn1crypto==0.24.0
astunparse==1.6.3
atari-py==0.2.9
cached-property==1.5.2
cachetools==4.2.2
certifi==2021.5.30
charset-normalizer==2.0.4
clang==5.0
cloudpickle==1.3.0
crafter==1.8.0
cryptography==2.1.4
dataclasses==0.8
decorator==5.1.1
dm-control==0.0.364896371
dm-env==1.5
dm-tree==0.1.7
flatbuffers==1.12
future==0.18.2
gast==0.4.0
glfw==2.5.5
google-auth==1.34.0
google-auth-oauthlib==0.4.5
google-pasta==0.2.0
grpcio==1.39.0
gym==0.17.0
h5py==3.1.0
idna==2.6
imageio==2.15.0
importlib-metadata==4.6.3
importlib-resources==5.4.0
keras==2.6.0
Keras-Preprocessing==1.1.2
keyring==10.6.0
keyrings.alt==3.0
labmaze==1.0.5
llvmlite==0.36.0
lxml==4.9.2
Markdown==3.3.4
numba==0.53.1
numpy==1.19.5
oauthlib==3.1.1
opencv-python==4.5.3.56
opensimplex==0.3
opt-einsum==3.3.0
Pillow==8.4.0
protobuf==3.17.3
pyasn1==0.4.8
pyasn1-modules==0.2.8
pycrypto==2.6.1
pyglet==1.5.0
pygobject==3.26.1
PyOpenGL==3.1.6
pyparsing==3.0.9
python-apt==1.6.5+ubuntu0.6
pyxdg==0.25
requests==2.26.0
requests-oauthlib==1.3.0
rsa==4.7.2
ruamel.yaml==0.17.21
ruamel.yaml.clib==0.2.7
scipy==1.5.4
SecretStorage==2.3.1
six==1.15.0
tensorboard==2.6.0
tensorboard-data-server==0.6.1
tensorboard-plugin-wit==1.8.0
tensorflow==2.6.0
tensorflow-estimator==2.6.0
tensorflow-probability==0.12.2
termcolor==1.1.0
tqdm==4.64.1
typing-extensions==3.7.4.3
urllib3==1.26.6
Werkzeug==2.0.1
wrapt==1.12.1
zipp==3.5.0