The GPU is not detected

Hi! I’m trying to use the NVIDIA GPU while using the docker, here is the message:

— GPU acceleration info —
GPUs found:
0000:00:02.0 VGA compatible controller [0300]: Intel Corporation Device [8086:a7a8] (rev 04)
0000:01:00.0 VGA compatible controller [0300]: NVIDIA Corporation Device [10de:28a0] (rev a1)
ls: cannot access ‘/sys/bus/pci/devices/0000:0000:01:00.0/drm’: No such file or directory
ls: cannot access ‘/sys/bus/pci/devices/0000:0000:00:02.0/drm’: No such file or directory
Warning: No GPU found for valid vendors: ‘nvidia intel’
Falling back to CPU-only mode

I mean that I have the same problem, and while keeping the backend running, everything keeps getting slower and slower.

Hello @avalen2022 @jimenade ! Thanks for reporting your issue. What OSs are you working with?

Im using Linux, the distribution is ubuntu 24.04

Hi, here is the OS.

alvaro@alvaro-ASUS-TUF-Gaming-F15-FX506HE-FX506HE:~$ cat /etc/os-release
PRETTY_NAME=“Ubuntu 24.04.1 LTS”
NAME=“Ubuntu”
VERSION_ID=“24.04”
VERSION=“24.04.1 LTS (Noble Numbat)”
VERSION_CODENAME=noble
ID=ubuntu
ID_LIKE=debian

UBUNTU_CODENAME=noble
LOGO=ubuntu-logo

I have a similar problem, but in my case the container does not even detect the nvidia card.

--- GPU acceleration info ---
GPUs found:
	00:02.0 VGA compatible controller [0300]: Intel Corporation Device [8086:7dd5] (rev 08)
GPU selected:
	00:02.0 VGA compatible controller [0300]: Intel Corporation Device [8086:7dd5] (rev 08)
	DRI_VENDOR: intel
	DRI_NAME: card1
-----------------------------

I have Ubuntu 24.04 with the nvidia driver 550.120 and the nvidia-container toolkit version 1.17.2-1.

Inside the container I am able to run nvidia-smi, so the container should have access to the driver, but the introspection is not detecting it.

can you share:

  1. exact docker command used to run the container
  2. result of running “ls -l /sys/class/drm/” locally

can you share:

  1. exact docker command used to run the container
  2. result of running “ls -l /sys/class/drm/” locally

also, as I can see from your screenshot “nvidia-smi” seems to not be available within the docker container, can you check that nvidia-smi is working locally in your PC? otherwise, there might be something wrong with your nvidia drivers installation

can you share:

  1. exact docker command used to run the container
  2. result of running “ls -l /sys/class/drm/” locally
  3. result of running “lspci -nn | grep VGA” locally
  1. I am using the command from the instructions page:
    docker run --rm -it $(nvidia-smi >/dev/null 2>&1 && echo "--gpus all" || echo "") --device /dev/dri -p 6080:6080 -p 1108:1108 -p 7163:7163 jderobot/robotics-backend:latest
ls -l /sys/class/drm
lrwxrwxrwx 1 root root    0 Nov 18 09:29 card0 -> ../../devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card0
lrwxrwxrwx 1 root root    0 Nov 18 09:29 card1 -> ../../devices/pci0000:00/0000:00:02.0/drm/card1
lrwxrwxrwx 1 root root    0 Nov 18 09:29 card1-DP-1 -> ../../devices/pci0000:00/0000:00:02.0/drm/card1/card1-DP-1
lrwxrwxrwx 1 root root    0 Nov 18 09:29 card1-DP-2 -> ../../devices/pci0000:00/0000:00:02.0/drm/card1/card1-DP-2
lrwxrwxrwx 1 root root    0 Nov 18 09:29 card1-DP-3 -> ../../devices/pci0000:00/0000:00:02.0/drm/card1/card1-DP-3
lrwxrwxrwx 1 root root    0 Nov 18 09:29 card1-DP-4 -> ../../devices/pci0000:00/0000:00:02.0/drm/card1/card1-DP-4
lrwxrwxrwx 1 root root    0 Nov 18 09:29 card1-eDP-1 -> ../../devices/pci0000:00/0000:00:02.0/drm/card1/card1-eDP-1
lrwxrwxrwx 1 root root    0 Nov 18 09:29 card1-HDMI-A-1 -> ../../devices/pci0000:00/0000:00:02.0/drm/card1/card1-HDMI-A-1
lrwxrwxrwx 1 root root    0 Nov 18 09:29 renderD128 -> ../../devices/pci0000:00/0000:00:02.0/drm/renderD128
lrwxrwxrwx 1 root root    0 Nov 18 09:29 renderD129 -> ../../devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/renderD129
-r--r--r-- 1 root root 4096 Nov 18 09:30 version
lspci -nn | grep VGA
00:02.0 VGA compatible controller [0300]: Intel Corporation Meteor Lake-P [Intel Graphics] [8086:7dd5] (rev 08)

Regarding 3, in my system the nvidia card appears in the lspci, but not as a VGA adapter:

lspci -nn | grep NVIDIA
01:00.0 3D controller [0302]: NVIDIA Corporation AD107GLM [RTX 500 Ada Generation Laptop GPU] [10de:28ba] (rev a1)

docker run --rm -it $(nvidia-smi >/dev/null 2>&1 && echo "--gpus all" || echo "") --device /dev/dri -p 6080:6080 -p 1108:1108 -p 7163:7163 jderobot/robotics-backend:latest

alvaro@alvaro-ASUS-TUF-Gaming-F15-FX506HE-FX506HE:~$ ls -l /sys/class/drm/
total 0
lrwxrwxrwx 1 root root 0 nov 18 09:04 card0 → …/…/devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card0
lrwxrwxrwx 1 root root 0 nov 18 09:04 card0-DP-2 → …/…/devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card0/card0-DP-2
lrwxrwxrwx 1 root root 0 nov 18 09:04 card0-DP-3 → …/…/devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card0/card0-DP-3
lrwxrwxrwx 1 root root 0 nov 18 09:04 card1 → …/…/devices/pci0000:00/0000:00:02.0/drm/card1
lrwxrwxrwx 1 root root 0 nov 18 09:04 card1-DP-1 → …/…/devices/pci0000:00/0000:00:02.0/drm/card1/card1-DP-1
lrwxrwxrwx 1 root root 0 nov 18 09:04 card1-eDP-1 → …/…/devices/pci0000:00/0000:00:02.0/drm/card1/card1-eDP-1
lrwxrwxrwx 1 root root 0 nov 18 09:04 card1-HDMI-A-1 → …/…/devices/pci0000:00/0000:00:02.0/drm/card1/card1-HDMI-A-1
lrwxrwxrwx 1 root root 0 nov 18 09:04 card1-HDMI-A-2 → …/…/devices/pci0000:00/0000:00:02.0/drm/card1/card1-HDMI-A-2
lrwxrwxrwx 1 root root 0 nov 18 09:04 renderD128 → …/…/devices/pci0000:00/0000:00:02.0/drm/renderD128
lrwxrwxrwx 1 root root 0 nov 18 09:04 renderD129 → …/…/devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/renderD129
-r–r–r-- 1 root root 4096 nov 18 09:04 version
alvaro@alvaro-ASUS-TUF-Gaming-F15-FX506HE-FX506HE:~$

alvaro@alvaro-ASUS-TUF-Gaming-F15-FX506HE-FX506HE:~$ lspci -nn | grep VGA
0000:00:02.0 VGA compatible controller [0300]: Intel Corporation TigerLake-H GT1 [UHD Graphics] [8086:9a68] (rev 01)
0000:01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GA107M [GeForce RTX 3050 Ti Mobile] [10de:25a0] (rev a1)
alvaro@alvaro-ASUS-TUF-Gaming-F15-FX506HE-FX506HE:~$

I’m using also the command from the instructions page:
docker run --rm -it $(nvidia-smi >/dev/null 2>&1 && echo
“–gpus all” || echo “”) --device /dev/dri -p 6080:6080 -p 1108:1108 -p
7163:7163 jderobot/robotics-backend:latest

The result of “ls -l /sys/class/drm/”:
ls -l /sys/class/drm/
total 0
lrwxrwxrwx 1 root root 0 Nov 18 09:19 card0 → …/…/devices/pci0000:00/0000:00:06.0/0000:01:00.0/drm/card0
lrwxrwxrwx 1 root root 0 Nov 18 09:19 card0-HDMI-A-2 → …/…/devices/pci0000:00/0000:00:06.0/0000:01:00.0/drm/card0/card0-HDMI-A-2
lrwxrwxrwx 1 root root 0 Nov 18 10:09 card1 → …/…/devices/pci0000:00/0000:00:02.0/drm/card1
lrwxrwxrwx 1 root root 0 Nov 18 09:19 card1-DP-1 → …/…/devices/pci0000:00/0000:00:02.0/drm/card1/card1-DP-1
lrwxrwxrwx 1 root root 0 Nov 18 09:19 card1-DP-2 → …/…/devices/pci0000:00/0000:00:02.0/drm/card1/card1-DP-2
lrwxrwxrwx 1 root root 0 Nov 18 09:19 card1-eDP-1 → …/…/devices/pci0000:00/0000:00:02.0/drm/card1/card1-eDP-1
lrwxrwxrwx 1 root root 0 Nov 18 09:19 card1-HDMI-A-1 → …/…/devices/pci0000:00/0000:00:02.0/drm/card1/card1-HDMI-A-1
lrwxrwxrwx 1 root root 0 Nov 18 09:19 renderD128 → …/…/devices/pci0000:00/0000:00:02.0/drm/renderD128
lrwxrwxrwx 1 root root 0 Nov 18 09:19 renderD129 → …/…/devices/pci0000:00/0000:00:06.0/0000:01:00.0/drm/renderD129
-r–r–r-- 1 root root 4096 Nov 18 09:19 version

The result of “lspci -nn | grep VGA” and “lspci -nn | grep NVIDIA”:
lspci -nn | grep VGA
0000:00:02.0 VGA compatible controller [0300]: Intel Corporation Raptor Lake-P [UHD Graphics] [8086:a7a8] (rev 04)
0000:01:00.0 VGA compatible controller [0300]: NVIDIA Corporation AD107M [GeForce RTX 4060 Max-Q / Mobile] [10de:28a0] (rev a1)

lspci -nn | grep NVIDIA
0000:01:00.0 VGA compatible controller [0300]: NVIDIA Corporation AD107M [GeForce RTX 4060 Max-Q / Mobile] [10de:28a0] (rev a1)
0000:01:00.1 Audio device [0403]: NVIDIA Corporation Device [10de:22be] (rev a1)

@jimenade @avalen2022 @franmore1 Thanks so much for all your info! I think I have enough data to build a tentative fix. I’ll let you know when it is ready for you to test.

@avalen2022 @jimenade @franmore1

We have published a new RoboticsBackend (4.6.15) with an improved GPU detection. Please download it (available at https://hub.docker.com/r/jderobot/robotics-backend/tags), use Unibotics with it and report here whether or not it speeds up the execution at your machine.

With the new docker it detects the GPU.
Thanks

All perfect. With the new docker detect the GPU, and run perfectly.