Files
Gymnasium/py.Dockerfile
pzhokhov 639264c545 Drop python2 support (#1819)
* drop python 2 support

* remove python 2.7 logic from Dockerfile

* Revert "remove python 2.7 logic from Dockerfile"

This reverts commit 43ceabfa8d70ca083661ab3d0d03f2a1adbef5ff.

* remove python 2.7 logic from Dockerfile

* use python 3.7.3 (3.7.6 segfaults with mujoco for some reason?

* include cmake into system level packages

* add swig to system packages

* python3.8 build still segfaults on mujoco tests, disabling for now

* add python 3.8 and 3.9 to the build

* python 3.9.1 -> 3.9.0

* oops i did not realize python 3.9 is still in alpha
2020-02-25 14:11:55 +01:00

26 lines
834 B
Docker

# A Dockerfile that sets up a full Gym install with test dependencies
ARG PYTHON_VER
FROM python:$PYTHON_VER
RUN apt-get -y update && apt-get install -y unzip libglu1-mesa-dev libgl1-mesa-dev libosmesa6-dev xvfb patchelf ffmpeg
RUN \
# Download mujoco
mkdir /root/.mujoco && \
cd /root/.mujoco && \
curl -O https://www.roboti.us/download/mjpro150_linux.zip && \
unzip mjpro150_linux.zip
ARG MUJOCO_KEY
ARG PYTHON_VER
ENV MUJOCO_KEY=$MUJOCO_KEY
ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/root/.mujoco/mjpro150/bin
RUN echo $MUJOCO_KEY | base64 --decode > /root/.mujoco/mjkey.txt
RUN pip install pytest pytest-forked lz4
COPY . /usr/local/gym/
WORKDIR /usr/local/gym/
RUN [ "$PYTHON_VER" != "3.8.1" ] && pip install .[all] || pip install .
ENTRYPOINT ["/usr/local/gym/bin/docker_entrypoint"]
CMD ["pytest","--forked"]