Last active
February 3, 2022 09:34
-
-
Save jkbjh/c83e5bf6d708f590f77ccdd6b2ef0a40 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
set -x | |
# 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 | |
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 | |
echo "Do you want to add a library preload to $HOME/.bashrc?" | |
select yn in "Yes" "No"; do | |
case $yn in | |
Yes ) echo "export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:$MJ_DIR/mujoco210/bin" >> $HOME/.bashrc; break;; | |
No ) exit;; | |
esac | |
done | |
echo "Do you want to add 'export MUJOCO_PY_FORCE_CPU=Yes' $HOME/.bashrc, to prevent mujoco from trying to use cuda?" | |
select yn in "Yes" "No"; do | |
case $yn in | |
Yes ) echo "export MUJOCO_PY_FORCE_CPU=Yes" >> $HOME/.bashrc; break;; | |
No ) exit;; | |
esac | |
done | |
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