This is a guide to install gym on Compute Canada (CC).
Except Mujoco, other environments (including Atari) in gym can be installed easily on CC. So next we show how to set Mujoco on CC, step by step.
- Obtain a license. There is a 30-day free trial on the MuJoCo website or a free license if you are a student. The license key will arrive in an email with your username and password.
- Download
mjpro150
for Linux:wget https://www.roboti.us/download/mjpro150_linux.zip
- Unzip the downloaded zip file into
~/.mujoco/mjpro150
, and place your license key (mjkey.txt
) at~/.mujoco/mjkey.txt
. - Run the script below.
Note that it is not recommended to install Anaconda on CC. Virtualenv is usually a better option. See https://docs.computecanada.ca/wiki/Anaconda/ for details.
# load python module
module load python/3.7
# set an env for gym
mkdir ~/envs
virtualenv --no-download ~/envs/gym
source ~/envs/gym/bin/activate
# update pip
pip install --no-index --upgrade pip
# install torch and others
pip install numpy Cython pandas termcolor matplotlib cffi imageio pycparser lockfile torch torchvision --no-index
# install gym
pip install gym[all]