Skip to content

Instantly share code, notes, and snippets.

@jkbjh
Last active October 27, 2023 11:45
Show Gist options
  • Save jkbjh/f547d34aa69be71b54fcb423bcce136e to your computer and use it in GitHub Desktop.
Save jkbjh/f547d34aa69be71b54fcb423bcce136e to your computer and use it in GitHub Desktop.
load-mujoco-210.sh
#!/bin/bash
set -e
# you can directly run this with: bash <(curl -Ls "https://gist.githubusercontent.com/jkbjh/c83e5bf6d708f590f77ccdd6b2ef0a40/raw/mujoco-210-user-install.sh?$(date +%s)")
# (the date query parameter is to to prevent caching when downloading through curl.)
export START_DIR=$(pwd)
export MJ_DIR=$HOME/.mujoco
# Check if the file exists
if [ -e "$MJ_DIR/mujoco210/bin/compile" ]; then
echo "mujoco already there, not downloading."
else
echo "downloading mujoco."
mkdir -p $MJ_DIR
pushd $MJ_DIR
curl -LJ 'https://github.com/deepmind/mujoco/releases/download/2.1.0/mujoco210-linux-x86_64.tar.gz' -o $MJ_DIR/mujoco210_linux.tgz
tar -C $MJ_DIR/ -xvf $MJ_DIR/mujoco210_linux.tgz
popd
fi
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$MJ_DIR/mujoco210/bin
export MUJOCO_PY_FORCE_CPU=Yes
echo With this version of mujoco you might want to install:
echo dm-control: git+git://github.com/deepmind/dm_control@644d9e0047f68b35a6f8b79e5e8493e2910563af
echo mujoco-py: mujoco-py==2.1.2.14
echo d4rl: git+https://github.com/jkbjh/d4rl@fb25ddfbba67196a2e576713720fc1142614cb50
echo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment