updated requirements
This commit is contained in:
parent
6d08232ad7
commit
4538f366e7
38
Dockerfile
38
Dockerfile
@ -1,28 +1,30 @@
|
|||||||
# 1. Test setup:
|
# 1. Test setup:
|
||||||
# docker run -it --rm --gpus all pytorch/pytorch:2.0.1-cuda11.7-cudnn8-runtime nvidia-smi
|
# docker run -it --rm --gpus all pytorch/pytorch:2.4.1-cuda12.4-cudnn9-runtime nvidia-smi
|
||||||
#
|
#
|
||||||
# If the above does not work, try adding the --privileged flag
|
# If the above does not work, try adding the --privileged flag
|
||||||
# and changing the command to `sh -c 'ldconfig -v && nvidia-smi'`.
|
# and changing the command to `sh -c 'ldconfig -v && nvidia-smi'`.
|
||||||
#
|
#
|
||||||
# 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 -u $(id -u):$(id -g) img \
|
# docker run -it --rm --gpus all -v $PWD:/workspace img \
|
||||||
# sh xvfb_run.sh python3 dreamer.py \
|
# sh xvfb_run.sh python3 dreamer.py \
|
||||||
# --configs dmc_vision --task dmc_walker_walk \
|
# --configs dmc_vision --task dmc_walker_walk \
|
||||||
# --logdir "./logdir/dmc_walker_walk"
|
# --logdir "./logdir/dmc_walker_walk"
|
||||||
#
|
#
|
||||||
# 3. See results:
|
# 3. See results:
|
||||||
# tensorboard --logdir ~/logdir
|
# tensorboard --logdir ~/logdir
|
||||||
|
#
|
||||||
|
# 4. To set up Atari or Minecraft environments, please check the scripts located in "env/setup_scripts".
|
||||||
|
|
||||||
# System
|
# System
|
||||||
FROM pytorch/pytorch:2.0.1-cuda11.7-cudnn8-runtime
|
FROM pytorch/pytorch:2.4.1-cuda12.4-cudnn9-runtime
|
||||||
ARG DEBIAN_FRONTEND=noninteractive
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
ENV TZ=America/San_Francisco
|
ENV TZ=America/San_Francisco
|
||||||
ENV PYTHONUNBUFFERED 1
|
ENV PYTHONUNBUFFERED 1
|
||||||
ENV PIP_DISABLE_PIP_VERSION_CHECK 1
|
ENV PIP_DISABLE_PIP_VERSION_CHECK 1
|
||||||
ENV PIP_NO_CACHE_DIR 1
|
ENV PIP_NO_CACHE_DIR 1
|
||||||
RUN apt-get update && apt-get install -y \
|
RUN apt-get update && apt-get install -y \
|
||||||
vim libglew2.1 libgl1-mesa-glx libosmesa6 \
|
vim libgl1-mesa-glx libosmesa6 \
|
||||||
wget unrar cmake g++ libgl1-mesa-dev \
|
wget unrar cmake g++ libgl1-mesa-dev \
|
||||||
libx11-6 openjdk-8-jdk x11-xserver-utils xvfb \
|
libx11-6 openjdk-8-jdk x11-xserver-utils xvfb \
|
||||||
&& apt-get clean
|
&& apt-get clean
|
||||||
@ -31,28 +33,8 @@ RUN pip3 install --upgrade pip
|
|||||||
# Envs
|
# Envs
|
||||||
ENV NUMBA_CACHE_DIR=/tmp
|
ENV NUMBA_CACHE_DIR=/tmp
|
||||||
|
|
||||||
# dmc setup
|
WORKDIR /workspace
|
||||||
RUN pip3 install tensorboard
|
COPY requirements.txt .
|
||||||
RUN pip3 install gym==0.19.0
|
|
||||||
RUN pip3 install mujoco==2.3.5
|
|
||||||
RUN pip3 install dm_control==1.0.9
|
|
||||||
RUN pip3 install moviepy
|
|
||||||
|
|
||||||
# crafter setup
|
# Install requiremqnts
|
||||||
RUN pip3 install crafter==1.8.0
|
RUN pip3 install -r requirements.txt
|
||||||
|
|
||||||
# atari setup
|
|
||||||
RUN pip3 install atari-py==0.2.9
|
|
||||||
RUN pip3 install opencv-python==4.7.0.72
|
|
||||||
RUN mkdir roms && cd roms
|
|
||||||
RUN wget -L -nv http://www.atarimania.com/roms/Roms.rar
|
|
||||||
RUN unrar x -o+ Roms.rar
|
|
||||||
RUN python3 -m atari_py.import_roms ROMS
|
|
||||||
RUN cd .. && rm -rf roms
|
|
||||||
|
|
||||||
# memorymaze setup
|
|
||||||
RUN pip3 install memory_maze==1.0.3
|
|
||||||
|
|
||||||
# minecraft setup
|
|
||||||
RUN pip3 install minerl==0.4.4
|
|
||||||
RUN pip3 install numpy==1.21.0
|
|
@ -5,7 +5,7 @@ Pytorch implementation of [Mastering Diverse Domains through World Models](https
|
|||||||
|
|
||||||
### Method 1: Manual
|
### Method 1: Manual
|
||||||
|
|
||||||
Get dependencies with python 3.9:
|
Get dependencies with python 3.11:
|
||||||
```
|
```
|
||||||
pip install -r requirements.txt
|
pip install -r requirements.txt
|
||||||
```
|
```
|
||||||
@ -17,6 +17,8 @@ Monitor results:
|
|||||||
```
|
```
|
||||||
tensorboard --logdir ./logdir
|
tensorboard --logdir ./logdir
|
||||||
```
|
```
|
||||||
|
To set up Atari or Minecraft environments, please check the scripts located in [env/setup_scripts](https://github.com/NM512/dreamerv3-torch/tree/main/envs/setup_scripts).
|
||||||
|
|
||||||
### Method 2: Docker
|
### Method 2: Docker
|
||||||
|
|
||||||
Please refer to the Dockerfile for the instructions, as they are included within.
|
Please refer to the Dockerfile for the instructions, as they are included within.
|
||||||
|
10
envs/setup_scripts/atari.sh
Normal file
10
envs/setup_scripts/atari.sh
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Run this script to install Atari
|
||||||
|
pip3 install atari-py==0.2.9
|
||||||
|
pip3 install opencv-python==4.7.0.72
|
||||||
|
mkdir roms && cd roms
|
||||||
|
wget -L -nv http://www.atarimania.com/roms/Roms.rar
|
||||||
|
unrar x -o+ Roms.rar
|
||||||
|
python3 -m atari_py.import_roms ROMS
|
||||||
|
cd .. && rm -rf roms
|
16
envs/setup_scripts/minecraft.sh
Normal file
16
envs/setup_scripts/minecraft.sh
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Install Java 8 before running this script by either of the following methods.
|
||||||
|
|
||||||
|
# 1. Use docker
|
||||||
|
# $ apt-get update
|
||||||
|
# $ apt-get install -y openjdk-8-jdk
|
||||||
|
# 2. Use conda
|
||||||
|
# $ conda install -c conda-forge openjdk=8
|
||||||
|
|
||||||
|
pip3 install https://github.com/NM512/minerl/releases/download/v0.4.4-patched/minerl_mirror-0.4.4-cp311-cp311-linux_x86_64.whl
|
||||||
|
# Downgrade to install old gym
|
||||||
|
pip3 install setuptools==60.0.0
|
||||||
|
pip3 install pip==22.0
|
||||||
|
pip3 install gym==0.19.0
|
||||||
|
pip3 install cloudpickle==2.2.1
|
@ -1,22 +1,14 @@
|
|||||||
setuptools==60.0.0
|
torch==2.4.1
|
||||||
torch==2.0.0
|
|
||||||
torchvision==0.15.1
|
|
||||||
pandas==1.2.4
|
|
||||||
matplotlib==3.5.0
|
matplotlib==3.5.0
|
||||||
ruamel.yaml==0.17.4
|
ruamel.yaml==0.17.4
|
||||||
moviepy==1.0.3
|
moviepy==1.0.3
|
||||||
einops==0.3.0
|
einops==0.3.0
|
||||||
protobuf==3.20.0
|
protobuf==3.20.0
|
||||||
gym==0.19.0
|
gym==0.22.0
|
||||||
mujoco==2.3.5
|
mujoco==2.3.5
|
||||||
dm_control==1.0.9
|
dm_control==1.0.9
|
||||||
scipy==1.8.0
|
|
||||||
memory_maze==1.0.3
|
memory_maze==1.0.3
|
||||||
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.23.5
|
||||||
tensorboard
|
tensorboard==2.17.1
|
||||||
# minerl==0.4.4
|
|
||||||
# This was needed for minerl
|
|
||||||
# conda install -c conda-forge openjdk=8
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user