Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify README.md to include instructions ensuring GPU compilation on linux #581

Open
avandekleut opened this issue Oct 15, 2020 · 1 comment

Comments

@avandekleut
Copy link

I realized mujoco_py wasn't using the GPU for rendering. I had to do the following to ensure that it was rendering:

First, ensure that a folder matching the glob '/usr/lib/nvidia-[0-9][0-9][0-9]' exists. If it doesn't, then just fake one:

sudo mkdir /usr/lib/nvidia-000

Make sure that this is part of your LD_LIBRARY_PATH by adding this to your .bashrc file:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/nvidia-000

Next, make sure that libGLEW.so is visible by adding this to your .bashrc file:

export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libGLEW.so

Then reload the .bashrc file:

source ~/.bashrc

Finally, uninstall and reinstall mujoco_py

pip uninstall mujoco_py
pip install --no-cache-dir mujoco_py

Check whether it was install with GPU support:

import mujoco_py
mujoco_py.cymj
<module 'cymj' from '<path_to_mujoco_py>/mujoco_py/generated/cymj_2.0.2.13_37_linuxgpuextensionbuilder_37.so'>

ensure that it says cymj_2.0.2.13_37_linuxgpuextensionbuilder_37.so and not cpu.

@buoyancy99
Copy link

A PR has been created here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants