Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
danijar committed Feb 22, 2025
1 parent 7949c3c commit cd026ac
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 17 deletions.
26 changes: 10 additions & 16 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,28 +1,29 @@
# docker build -f Dockerfile -t img . && \
# docker run -it --rm -v ~/logdir/docker:/logdir img \
# python main.py --logdir /logdir/{timestamp} --configs minecraft debug --task minecraft_diamond_k
# python main.py --logdir /logdir/{timestamp} --configs minecraft debug --task minecraft_diamond

FROM ghcr.io/nvidia/driver:7c5f8932-550.144.03-ubuntu24.04

# System
FROM ghcr.io/nvidia/driver:56b85890-550.90.07-ubuntu22.04
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=America/San_Francisco
ENV PYTHONUNBUFFERED=1
ENV PIP_NO_CACHE_DIR=1
ENV PIP_ROOT_USER_ACTION=ignore
RUN apt-get update && apt-get install -y \
ffmpeg git vim curl software-properties-common grep \
libglew-dev x11-xserver-utils xvfb wget \
&& apt-get clean

# Python
# Python (DMLab needs <=3.11)
ENV PYTHONUNBUFFERED=1
ENV PIP_NO_CACHE_DIR=1
ENV PIP_ROOT_USER_ACTION=ignore
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="/venv/bin:$PATH"
RUN pip install --upgrade pip setuptools
RUN pip install -U pip setuptools

# Envs
RUN wget -O - https://gist.github.com/danijar/ca6ab917188d2e081a8253b3ca5c36d3/raw/install-dmlab.sh | sh
RUN wget -O - https://gist.githubusercontent.com/danijar/ca6ab917188d2e081a8253b3ca5c36d3/raw/install-dmlab.sh | sh
RUN pip install ale_py==0.9.0 autorom[accept-rom-license]==0.6.1
RUN pip install procgen_mirror
RUN pip install crafter
Expand All @@ -31,10 +32,10 @@ RUN pip install memory_maze
ENV MUJOCO_GL=egl
RUN apt-get update && apt-get install -y openjdk-8-jdk && apt-get clean
RUN pip install https://github.com/danijar/minerl/releases/download/v0.4.4-patched/minerl_mirror-0.4.4-cp311-cp311-linux_x86_64.whl
# RUN pip install git+https://github.com/minerllabs/minerl@7f2a2cba6ca6
RUN chown -R 1000:root /venv/lib/python3.11/site-packages/minerl

# Requirements
RUN pip install jax[cuda]==0.5.0
COPY requirements.txt requirements.txt
RUN pip install -r requirements.txt

Expand All @@ -44,11 +45,4 @@ WORKDIR /app
COPY . .
RUN chown -R 1000:root .

# 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

ENTRYPOINT ["sh", "entrypoint.sh"]
2 changes: 1 addition & 1 deletion dreamerv3/configs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ procgen:
run: {steps: 1.1e8, train_ratio: 64}

atari100k:
task: atari_pong
task: atari100k_pong
run: {steps: 1.1e5, envs: 1, train_ratio: 256}

crafter:
Expand Down

0 comments on commit cd026ac

Please sign in to comment.