-
Notifications
You must be signed in to change notification settings - Fork 240
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
177 changed files
with
10,432 additions
and
6,009 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
*.py[cod] | ||
__pycache__/ | ||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
include requirements.txt | ||
include dreamerv3/requirements.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,63 +1,75 @@ | ||
# 1. Test setup: | ||
# docker run -it --rm --gpus all nvidia/cuda:11.4.2-cudnn8-runtime-ubuntu20.04 nvidia-smi | ||
# Instructions | ||
# | ||
# If the above does not work, try adding the --privileged flag | ||
# and changing the command to `sh -c 'ldconfig -v && nvidia-smi'`. | ||
# 1) Test setup: | ||
# | ||
# 2. Start training: | ||
# docker build -f dreamerv3/Dockerfile -t img . && \ | ||
# docker run -it --rm --gpus all -v ~/logdir:/logdir img \ | ||
# sh scripts/xvfb_run.sh python3 dreamerv3/train.py \ | ||
# --logdir "/logdir/$(date +%Y%m%d-%H%M%S)" \ | ||
# --configs dmc_vision --task dmc_walker_walk | ||
# docker run -it --rm --gpus all --privileged <base image> \ | ||
# sh -c 'ldconfig; nvidia-smi' | ||
# | ||
# 2) Start training: | ||
# | ||
# docker build -f dreamerv3/Dockerfile -t img . && \ | ||
# docker run -it --rm --gpus all -v ~/logdir/docker:/logdir img \ | ||
# sh -c 'ldconfig; sh embodied/scripts/xvfb_run.sh python dreamerv3/main.py \ | ||
# --logdir "/logdir/{timestamp}" --configs atari --task atari_pong' | ||
# | ||
# 3) See results: | ||
# | ||
# tensorboard --logdir ~/logdir/docker | ||
# | ||
# 3. See results: | ||
# tensorboard --logdir ~/logdir | ||
|
||
# System | ||
FROM nvidia/cuda:11.4.2-cudnn8-devel-ubuntu20.04 | ||
ARG DEBIAN_FRONTEND=noninteractive | ||
FROM nvidia/cuda:12.1.1-cudnn8-devel-ubuntu22.04 | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
ENV TZ=America/San_Francisco | ||
ENV PYTHONUNBUFFERED 1 | ||
ENV PIP_DISABLE_PIP_VERSION_CHECK 1 | ||
ENV PIP_NO_CACHE_DIR 1 | ||
ENV PIP_ROOT_USER_ACTION=ignore | ||
RUN apt-get update && apt-get install -y \ | ||
ffmpeg git python3-pip vim libglew-dev \ | ||
x11-xserver-utils xvfb \ | ||
ffmpeg git vim curl software-properties-common \ | ||
libglew-dev x11-xserver-utils xvfb \ | ||
&& apt-get clean | ||
RUN pip3 install --upgrade pip | ||
|
||
# Workdir | ||
RUN mkdir /app | ||
WORKDIR /app | ||
|
||
# Python | ||
RUN add-apt-repository ppa:deadsnakes/ppa | ||
RUN apt-get update && apt-get install -y python3.11-dev python3.11-venv && apt-get clean | ||
RUN python3.11 -m venv ./venv --upgrade-deps | ||
ENV PATH="/app/venv/bin:$PATH" | ||
RUN pip install --upgrade pip setuptools | ||
|
||
# Envs | ||
COPY embodied/scripts/install-minecraft.sh . | ||
RUN sh install-minecraft.sh | ||
COPY embodied/scripts/install-dmlab.sh . | ||
RUN sh install-dmlab.sh | ||
RUN pip install ale_py autorom[accept-rom-license] | ||
RUN pip install procgen_mirror | ||
RUN pip install crafter | ||
RUN pip install dm_control | ||
RUN pip install memory_maze | ||
ENV MUJOCO_GL egl | ||
ENV DMLAB_DATASET_PATH /dmlab_data | ||
COPY scripts scripts | ||
RUN sh scripts/install-dmlab.sh | ||
RUN sh scripts/install-atari.sh | ||
RUN sh scripts/install-minecraft.sh | ||
ENV NUMBA_CACHE_DIR=/tmp | ||
RUN pip3 install crafter | ||
RUN pip3 install dm_control | ||
RUN pip3 install robodesk | ||
RUN pip3 install bsuite | ||
ENV NUMBA_CACHE_DIR /tmp | ||
|
||
# Agent | ||
RUN pip3 install jax[cuda11_cudnn82] -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html | ||
RUN pip3 install jaxlib | ||
RUN pip3 install tensorflow_probability | ||
RUN pip3 install optax | ||
RUN pip3 install tensorflow-cpu | ||
COPY dreamerv3/requirements.txt agent-requirements.txt | ||
RUN pip install -r agent-requirements.txt \ | ||
-f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html | ||
ENV XLA_PYTHON_CLIENT_MEM_FRACTION 0.8 | ||
|
||
# Google Cloud DNS cache (optional) | ||
# Embodied | ||
COPY embodied/requirements.txt embodied-requirements.txt | ||
RUN pip install -r embodied-requirements.txt | ||
|
||
# Source | ||
COPY . . | ||
|
||
# Cloud | ||
ENV GCS_RESOLVE_REFRESH_SECS=60 | ||
ENV GCS_REQUEST_CONNECTION_TIMEOUT_SECS=300 | ||
ENV GCS_METADATA_REQUEST_TIMEOUT_SECS=300 | ||
ENV GCS_READ_REQUEST_TIMEOUT_SECS=300 | ||
ENV GCS_WRITE_REQUEST_TIMEOUT_SECS=600 | ||
|
||
# Embodied | ||
RUN pip3 install numpy cloudpickle ruamel.yaml rich zmq msgpack | ||
COPY . /embodied | ||
RUN chown -R 1000:root /embodied && chmod -R 775 /embodied | ||
|
||
WORKDIR embodied | ||
RUN chown 1000:root . && chmod 775 . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,2 @@ | ||
import sys, pathlib | ||
sys.path.append(str(pathlib.Path(__file__).parent)) | ||
|
||
from .agent import Agent | ||
configs = Agent.configs | ||
from .train import wrap_env | ||
from .main import wrap_env |
Oops, something went wrong.