-
Notifications
You must be signed in to change notification settings - Fork 812
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
Make compilation for GPU rendering more transparent #512
Comments
I forced |
I have no idea why Instead try something like:
Sourced from here |
@tkelestemur How do you check whether the code uses CPU or GPU when you run it? |
I basically look at the output of |
I changed the line to
|
TL-DR If you can't figure out why your mujoco-py refuses to render headless for GPU this may help.
Describe the bug
mujoco-py relies on an extremely brittle test to determine if a GPU is present during compilation. Note this test is neither necessary - the recommended apt-get method for installing Nvidia drivers doesn't create this directory - nor is it sufficient, since the directory could exist even after the driver is long gone.
Even worse, this isn't documented anywhere and it's entirely unclear during compilation if the mujoco-py stack has successfully found my gpu driver. Often times when the driver is found this error occurs.
To Reproduce
Import mujoco-py on an Ubuntu 18 machine with drivers installed through apt-get. The CPU only version will be compiled, thus causing extremely slow headless rendering.
Expected behavior
GPU compatible headless rendering automatically works on machines with Nvidia drivers, or at the very least some messages warns the user that CPU only version is being built.
Quick hack to resolve
Change this line to
LinuxGPUExtensionBuilder
and refer to #383 if that issue comes up.The text was updated successfully, but these errors were encountered: