Skip to content

Instantly share code, notes, and snippets.

@machinaut
Created October 26, 2018 00:08
Show Gist options
  • Save machinaut/b5a7c6719a30e9fbfd95c13d5e963b61 to your computer and use it in GitHub Desktop.
Save machinaut/b5a7c6719a30e9fbfd95c13d5e963b61 to your computer and use it in GitHub Desktop.
Demonstrating installing mujoco-py and gym[mujoco] on ubuntu 18.04
FROM ubuntu:18.04
# Install python and utils
RUN apt-get update && apt-get install -y python3-pip curl unzip \
libosmesa-dev libglew-dev patchelf libglfw3-dev
# Download mujoco
RUN curl https://www.roboti.us/download/mjpro150_linux.zip --output /tmp/mujoco.zip && \
mkdir -p /root/.mujoco && \
unzip /tmp/mujoco.zip -d /root/.mujoco && \
rm -f /tmp/mujoco.zip
# Set library load path
ENV LD_LIBRARY_PATH $LD_LIBRARY_PATH:/root/.mujoco/mjpro150/bin
# Copy the mujoco license key
COPY mjkey.txt /root/.mujoco/mjkey.txt
# Install gym with mujoco
RUN pip3 install gym[mujoco]
# Test the python packages
RUN python3 -c "import gym; gym.make('Humanoid-v2')"
@Hsgngr
Copy link

Hsgngr commented May 24, 2020

Hi, how can I run this file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment