Skip to content

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

@avandekleut

Description

@avandekleut

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions