-
Notifications
You must be signed in to change notification settings - Fork 193
/
Dockerfile
49 lines (43 loc) · 1.07 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
FROM tensorflow/tensorflow:2.4.2-gpu
# System packages.
RUN apt-get update && apt-get install -y \
ffmpeg \
libgl1-mesa-dev \
python3-pip \
unrar \
wget \
&& apt-get clean
# MuJoCo.
ENV MUJOCO_GL egl
RUN mkdir -p /root/.mujoco && \
wget -nv https://www.roboti.us/download/mujoco200_linux.zip -O mujoco.zip && \
unzip mujoco.zip -d /root/.mujoco && \
rm mujoco.zip
# Python packages.
RUN pip3 install --no-cache-dir \
'gym[atari]' \
atari_py \
crafter \
dm_control \
ruamel.yaml \
tensorflow_probability==0.12.2
# Atari ROMS.
RUN wget -L -nv http://www.atarimania.com/roms/Roms.rar && \
unrar x Roms.rar && \
unzip ROMS.zip && \
python3 -m atari_py.import_roms ROMS && \
rm -rf Roms.rar ROMS.zip ROMS
# MuJoCo key.
ARG MUJOCO_KEY=""
RUN echo "$MUJOCO_KEY" > /root/.mujoco/mjkey.txt
RUN cat /root/.mujoco/mjkey.txt
# DreamerV2.
ENV TF_XLA_FLAGS --tf_xla_auto_jit=2
COPY . /app
WORKDIR /app
CMD [ \
"python3", "dreamerv2/train.py", \
"--logdir", "/logdir/$(date +%Y%m%d-%H%M%S)", \
"--configs", "defaults", "atari", \
"--task", "atari_pong" \
]