Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ FROM ubuntu:16.04
# https://github.com/ContinuumIO/docker-images/blob/master/anaconda/Dockerfile
ENV LANG=C.UTF-8 LC_ALL=C.UTF-8

SHELL ["/bin/bash", "-c"]

RUN apt-get update --fix-missing && apt-get install -y wget bzip2 ca-certificates \
libglib2.0-0 libxext6 libsm6 libxrender1 \
git mercurial subversion
Expand All @@ -15,8 +17,8 @@ RUN echo 'export PATH=/opt/conda/bin:$PATH' > /etc/profile.d/conda.sh && \
rm ~/anaconda.sh

RUN apt-get install -y curl grep sed dpkg && \
TINI_VERSION=`curl https://github.com/krallin/tini/releases/latest | grep -o "/v.*\"" | sed 's:^..\(.*\).$:\1:'` && \
curl -L "https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini_${TINI_VERSION}.deb" > tini.deb && \
TINI_VERSION=`curl https://api.github.com/repos/krallin/tini/releases/latest | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/'` && \
curl -L "https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini_${TINI_VERSION:1}.deb" > tini.deb && \
dpkg -i tini.deb && \
rm tini.deb && \
apt-get clean
Expand All @@ -30,6 +32,9 @@ RUN pip install awscli
# ALE requires zlib
RUN apt-get -y install zlib1g-dev
# MUJOCO requires graphics stuff (Why?)
RUN cp /etc/apt/sources.list /etc/apt/sources.list~ \
&& sed -Ei 's/^# deb-src /deb-src /' /etc/apt/sources.list \
&& apt-get update
RUN apt-get -y build-dep glfw
RUN apt-get -y install libxrandr2 libxinerama-dev libxi6 libxcursor-dev
RUN apt-get install -y vim ack-grep
Expand All @@ -43,6 +48,7 @@ RUN pip install Pillow
WORKDIR /root/sql

ADD environment.yml /root/sql/environment.yml
RUN pip install --upgrade requests
RUN conda env create -f /root/sql/environment.yml \
&& conda env update

Expand Down Expand Up @@ -79,3 +85,8 @@ RUN MUJOCO_ZIP="mjpro$(echo ${MUJOCO_VERSION} | sed -e "s/\.//g")_linux.zip" \
&& cp ${MUJOCO_PATH}/mjpro131/bin/libmujoco131.so ${RLLAB_PATH}/vendor/mujoco/ \
&& cp ${MUJOCO_PATH}/mjpro131/bin/libglfw.so.3 ${RLLAB_PATH}/vendor/mujoco/ \
&& rm ${MUJOCO_PATH}/${MUJOCO_ZIP}

# ========== Package Patches ==========

RUN source activate sql && pip install "numpy>=1.16"
RUN sed -i 's/MemmapingPool/MemmappingPool/g' /root/rllab/rllab/sampler/stateful_pool.py
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ Currently, rendering of simulations is not supported on Docker due to a missing
export MUJOCO_LICENSE_PATH=<path_to_mujoco>/mjkey.txt
```

Please note that you should not use relative paths such as `~/mujoco/mjkey.txt` in the environment variable, as Docker compose does not expand them. You could use `"$HOME/.mujoco/mjkey.txt"` instead.

Once that's done, you can run the Docker container with

```
Expand Down
1 change: 1 addition & 0 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ dependencies:
- theano==0.8.2
- pip:
- gtimer
- protobuf==3.19.6
- gym==0.8
- mujoco_py==0.5.7
- pyprind
Expand Down