- Follow the instruction to install NVIDIA CUDA here: https://www.tensorflow.org/install/gpu#ubuntu_1804_cuda_101
- Install the following packages in Ubuntu
- Create a conda environment and install the packages from Anaconda and pip
apt-get install -y libgl1-mesa-dev libgl1-mesa-glx libglew-dev libosmesa6-dev libglfw3 wget bzip2 git patchelf ffmpeg mesa-utils
conda env create -f environment.yml
pip install -r requirements.txt
- Download Mujoco 200 from https://www.roboti.us/index.html
- Unzip the downloaded mjpro200 directory into ~/.mujoco/mjpro200
- Place your license key (the mjkey.txt file from your email) at ~/.mujoco/mjkey.txt.
- Run the following code to install mujoco-py
git clone https://github.com/openai/mujoco-py
cd mujoco-py
pip install .
- Append the following lines to .bashrc
export MUJOCO_HOME=$HOME/.mujoco/mjpro200
export LD_LIBRARY_PATH=$MUJOCO_HOME/bin:$LD_LIBRARY_PATH
Due to the bug in mujoco-py when running with NVIDIA GPU, the workaround is to prepend the following before running a python command if you want to render the training. Note: if you re-install NVIDIA driver during the installation process above, reboot before running this.
LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libGLEW.so:/usr/lib/x86_64-linux-gnu/libGL.so python fetchreach.py --render