added Docker instruction

This commit is contained in:
NM512 2023-10-02 07:37:08 +09:00
parent 1002d8b115
commit 0eec12bd1c
4 changed files with 16 additions and 10 deletions

View File

@ -6,10 +6,10 @@
# #
# 2. Start training: # 2. Start training:
# docker build -f Dockerfile -t img . && \ # docker build -f Dockerfile -t img . && \
# docker run -it --rm --gpus all -v $PWD:/workspace img \ # docker run -it --rm --gpus all -v $PWD:/workspace -u $(id -u):$(id -g) img \
# sh xvfb_run.sh python3 dreamer.py \ # sh xvfb_run.sh python3 dreamer.py \
# --logdir "./logdir/dmc_walker_walk" \ # --configs dmc_vision --task dmc_walker_walk \
# --configs dmc_vision --task dmc_walker_walk # --logdir "./logdir/dmc_walker_walk"
# #
# 3. See results: # 3. See results:
# tensorboard --logdir ~/logdir # tensorboard --logdir ~/logdir
@ -34,11 +34,11 @@ ENV NUMBA_CACHE_DIR=/tmp
# dmc setup # dmc setup
RUN pip3 install tensorboard RUN pip3 install tensorboard
RUN pip3 install gym==0.19.0 RUN pip3 install gym==0.19.0
RUN pip3 install dm_control RUN pip3 install dm_control==1.0.9
RUN pip3 install moviepy RUN pip3 install moviepy
# crafter setup # crafter setup
RUN pip3 install crafter RUN pip3 install crafter==1.8.0
# atari setup # atari setup
RUN pip3 install atari-py==0.2.9 RUN pip3 install atari-py==0.2.9

View File

@ -3,7 +3,9 @@ Pytorch implementation of [Mastering Diverse Domains through World Models](https
## Instructions ## Instructions
Get dependencies: ### Method 1: Manual
Get dependencies with python 3.9:
``` ```
pip install -r requirements.txt pip install -r requirements.txt
``` ```
@ -15,6 +17,9 @@ Monitor results:
``` ```
tensorboard --logdir ./logdir tensorboard --logdir ./logdir
``` ```
### Method 2: Docker
Please refer to the Dockerfile for the instructions, as they are included within.
## Benchmarks ## Benchmarks
So far, the following benchmarks can be used for testing. So far, the following benchmarks can be used for testing.

View File

@ -58,9 +58,10 @@ class Plan2Explore(nn.Module):
"feat": config.dyn_stoch + config.dyn_deter, "feat": config.dyn_stoch + config.dyn_deter,
}[self._config.disag_target] }[self._config.disag_target]
kw = dict( kw = dict(
inp_dim=feat_size + (config.num_actions inp_dim=feat_size
if config.disag_action_cond + (
else 0), # pytorch version config.num_actions if config.disag_action_cond else 0
), # pytorch version
shape=size, shape=size,
layers=config.disag_layers, layers=config.disag_layers,
units=config.disag_units, units=config.disag_units,

View File

@ -1,7 +1,6 @@
setuptools==60.0.0 setuptools==60.0.0
torch==2.0.0 torch==2.0.0
torchvision==0.15.1 torchvision==0.15.1
tensorboard==2.10.0
pandas==1.2.4 pandas==1.2.4
matplotlib==3.5.0 matplotlib==3.5.0
ruamel.yaml==0.17.4 ruamel.yaml==0.17.4
@ -16,6 +15,7 @@ atari-py==0.2.9
crafter==1.8.0 crafter==1.8.0
opencv-python==4.7.0.72 opencv-python==4.7.0.72
numpy==1.21.0 numpy==1.21.0
tensorboard
# minerl==0.4.4 # minerl==0.4.4
# This was needed for minerl # This was needed for minerl
# conda install -c conda-forge openjdk=8 # conda install -c conda-forge openjdk=8