danijar / dreamerv2

Mastering Atari with Discrete World Models
https://danijar.com/dreamerv2
MIT License
898 stars 195 forks source link

Fix Docker build settings for January 20, 2023 #54

Open ricrowl opened 1 year ago

ricrowl commented 1 year ago

Why

In 2023/01/20, I tried to run dreamerv2 by Docker, however, some errors occurred when building the docker image.

The error details are as follows:

  1. GPG error in running apt-get update
    W: GPG error: https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64  InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A4B469963BF863CC
    E: The repository 'https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64  InRelease' is no longer signed.
  2. pip dependency error in installing Python packages.
    ERROR: Could not find a version that satisfies the requirement ale-py~=0.8.0; extra == "atari" (from gym[atari]) (from versions: 0.6.0.dev20200207, 0.7rc0, 0.7rc1, 0.7rc2, 0.7rc3, 0.7rc4, 0.7, 0.7.1)
    ERROR: No matching distribution found for ale-py~=0.8.0; extra == "atari" (from gym[atari])
  3. unzip error in extracting Atari ROMS
    unzip:  cannot find or open ROMS.zip, ROMS.zip.zip or ROMS.zip.ZIP.

Then, I fixed these errors.

And we can use MuJoCo for free since October 18, 2021, so I update some settings to run dreamerv2 without own MUJOCO_KEY.

What

  1. Update the CUDA Linux GPG Repository Key
  2. Create requirements.txt and pip install from it
  3. Update unzip configure for Atari ROMS
  4. Update MuJoCo key settings and Train on DM Control on README

And I confirmed that the code works fine by running follows:

docker build -t dreamerv2 .
docker run -it --rm --gpus all -v ~/logdir:/logdir dreamerv2 \
  python3 dreamerv2/train.py --logdir /logdir/atari_pong/dreamerv2/1 \
    --configs atari --task atari_pong
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