Skip to content

Commit fb4babe

Browse files
authored
Detect the correct nvidia lib path for modern ubuntu systems (#646)
To enable GPU extensions, previously either /usr/local/nvidia/lib64 (for dockers) or /usr/lib/nvidia-\d\d\d needed to exist, but in most of the modern debian and ubuntu systems, the nvidia libraries are actually installed under the path /usr/lib/nvidia. The commit corrects the path to nvidia library path so that GPU extensions can be installed without any hacky workarounds.
1 parent ab86d33 commit fb4babe

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

mujoco_py/builder.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ def get_nvidia_lib_dir():
3131
docker_path = '/usr/local/nvidia/lib64'
3232
if exists(docker_path):
3333
return docker_path
34+
35+
nvidia_path = '/usr/lib/nvidia'
36+
if exists(nvidia_path):
37+
return nvidia_path
38+
3439
paths = glob.glob('/usr/lib/nvidia-[0-9][0-9][0-9]')
3540
paths = sorted(paths)
3641
if len(paths) == 0:

0 commit comments

Comments
 (0)