Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Install mujoco, mujoco_py, mujoco_py_derivs
#!/usr/bin/env bash
# Assume:
# - mjkey.txt is in directory $MJKEYDIR
# Install MuJoCo
mkdir -p $HOME/.mujoco
wget https://www.roboti.us/download/mujoco200_linux.zip
unzip mujoco200_linux.zip -d $HOME/.mujoco
mv $HOME/.mujoco/mujoco200_linux $HOME/.mujoco/mujoco200
cp $MJKEYDIR/mjkey.txt ~/.mujoco
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/.mujoco/mujoco200/bin
# Install mujoco-py
sudo apt-get update
sudo apt-get install -y patchelf python3 python3-dev build-essential libssl-dev libffi-dev libxml2-dev libxslt1-dev zlib1g-dev libglew1.5 libglew-dev python3-pip libgl1-mesa-dev libgl1-mesa-glx libosmesa6-dev python3-numpy python3-scipy python3-dbg gdb
pip install mujoco-py gym
# Test in python
# import gym
# env = gym.make('FetchPush-v1')
# env.reset()
# for _ in range(1000):
# env.step(env.action_space.sample()) # take a random action
# Install mujoco_py_deriv
git clone https://github.com/wecacuee/mujoco_py_deriv
pushd mujoco_py_deriv
pip install -e .
popd
# Test
python tests/test_mujoco_py_deriv.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment