<<< Depreciated >>>
- Conda Install
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
chmod +x Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh
<answer appropriately>
<recommend to setup conda on /scratch/cluster/<username>. Since miniconda can become really big!>
conda install -y 'python==3.6.*' # Downgrade python version
- Install Cuda / Cudnn
<use conda if possible>
<if not, just download cuda and cudnn and extract it. then, add cuda directory to a path/ld_library_path>
- Install basic required libraries using conda
conda install pkg-config
conda install patchelf
conda install -c menpo osmesa
- Install basic required librarires using pip
pip insatll ipython
pip install pkgconfig
pip install tensorflow-gpu==1.13.1
pip install gym
- Install
mujoco-py
Check whether osmesa
library installed correctly by pkg-config --cflags osmesa
. The return should be -I<your conda include directory>
< Download mujoco200_linux.zip and extract on ~/.mujoco/ also, add mjkey.txt' >
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:<path to your mujoco dir>
wget https://launchpad.net/ubuntu/+archive/primary/+files/libgcrypt11_1.5.3-2ubuntu4.2_amd64.deb
dpkg -x libgcrypt11_1.5.3-2ubuntu4.2_amd64.deb
mv lib/x86_64-linux-gnu/* <your miniconda dir>/lib
git clone [email protected]:hiwonjoon/mujoco-py.git # For a detailed change I made, please see the commit
cd mujoco-py
pip install .
cd ..
rm -rf libgcrypt11_1.5.3-2ubuntu4.2_amd64.deb mujoco-py
Check the installation of mujoco-py by running a test script
import mujoco_py
import os
mj_path, _ = mujoco_py.utils.discover_mujoco()
xml_path = os.path.join(mj_path, 'model', 'humanoid.xml')
model = mujoco_py.load_model_from_path(xml_path)
sim = mujoco_py.MjSim(model)
print(sim.data.qpos)
# [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.]
sim.step()
print(sim.data.qpos)
- Test Gym Headless Rendering
import gym
env = gym.make('Reacher-v2')
env.reset()
env.render('rgb_array').shape
# should be [500,500,3]
Other python dependencies: