Add application file
Browse files- Dockerfile +63 -0
Dockerfile
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# 1. Test setup:
|
| 2 |
+
# docker run -it --rm --gpus all nvidia/cuda:11.4.2-cudnn8-runtime-ubuntu20.04 nvidia-smi
|
| 3 |
+
#
|
| 4 |
+
# If the above does not work, try adding the --privileged flag
|
| 5 |
+
# and changing the command to `sh -c 'ldconfig -v && nvidia-smi'`.
|
| 6 |
+
#
|
| 7 |
+
# 2. Start training:
|
| 8 |
+
# docker build -f dreamerv3/Dockerfile -t img . && \
|
| 9 |
+
# docker run -it --rm --gpus all -v ~/logdir:/logdir img \
|
| 10 |
+
# sh scripts/xvfb_run.sh python3 dreamerv3/train.py \
|
| 11 |
+
# --logdir "/logdir/$(date +%Y%m%d-%H%M%S)" \
|
| 12 |
+
# --configs dmc_vision --task dmc_walker_walk
|
| 13 |
+
#
|
| 14 |
+
# 3. See results:
|
| 15 |
+
# tensorboard --logdir ~/logdir
|
| 16 |
+
|
| 17 |
+
# System
|
| 18 |
+
FROM nvidia/cuda:11.4.2-cudnn8-devel-ubuntu20.04
|
| 19 |
+
ARG DEBIAN_FRONTEND=noninteractive
|
| 20 |
+
ENV TZ=America/San_Francisco
|
| 21 |
+
ENV PYTHONUNBUFFERED 1
|
| 22 |
+
ENV PIP_DISABLE_PIP_VERSION_CHECK 1
|
| 23 |
+
ENV PIP_NO_CACHE_DIR 1
|
| 24 |
+
RUN apt-get update && apt-get install -y \
|
| 25 |
+
ffmpeg git python3-pip vim libglew-dev \
|
| 26 |
+
x11-xserver-utils xvfb \
|
| 27 |
+
&& apt-get clean
|
| 28 |
+
RUN pip3 install --upgrade pip
|
| 29 |
+
|
| 30 |
+
# Envs
|
| 31 |
+
ENV MUJOCO_GL egl
|
| 32 |
+
ENV DMLAB_DATASET_PATH /dmlab_data
|
| 33 |
+
COPY scripts scripts
|
| 34 |
+
RUN sh scripts/install-dmlab.sh
|
| 35 |
+
RUN sh scripts/install-atari.sh
|
| 36 |
+
RUN sh scripts/install-minecraft.sh
|
| 37 |
+
ENV NUMBA_CACHE_DIR=/tmp
|
| 38 |
+
RUN pip3 install crafter
|
| 39 |
+
RUN pip3 install dm_control
|
| 40 |
+
RUN pip3 install robodesk
|
| 41 |
+
RUN pip3 install bsuite
|
| 42 |
+
|
| 43 |
+
# Agent
|
| 44 |
+
RUN pip3 install jax[cuda11_cudnn82] -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html
|
| 45 |
+
RUN pip3 install jaxlib
|
| 46 |
+
RUN pip3 install tensorflow_probability
|
| 47 |
+
RUN pip3 install optax
|
| 48 |
+
RUN pip3 install tensorflow-cpu
|
| 49 |
+
ENV XLA_PYTHON_CLIENT_MEM_FRACTION 0.8
|
| 50 |
+
|
| 51 |
+
# Google Cloud DNS cache (optional)
|
| 52 |
+
ENV GCS_RESOLVE_REFRESH_SECS=60
|
| 53 |
+
ENV GCS_REQUEST_CONNECTION_TIMEOUT_SECS=300
|
| 54 |
+
ENV GCS_METADATA_REQUEST_TIMEOUT_SECS=300
|
| 55 |
+
ENV GCS_READ_REQUEST_TIMEOUT_SECS=300
|
| 56 |
+
ENV GCS_WRITE_REQUEST_TIMEOUT_SECS=600
|
| 57 |
+
|
| 58 |
+
# Embodied
|
| 59 |
+
RUN pip3 install numpy cloudpickle ruamel.yaml rich zmq msgpack
|
| 60 |
+
COPY . /embodied
|
| 61 |
+
RUN chown -R 1000:root /embodied && chmod -R 775 /embodied
|
| 62 |
+
|
| 63 |
+
WORKDIR embodied
|