SOLVED!
-
updated to ubuntu 24.04 (Im not sure it’s important, I just prefer fresh distros),
-
add these lines in my Dockerfile
ENV NVIDIA_VISIBLE_DEVICES ${NVIDIA_VISIBLE_DEVICES:-all}
ENV NVIDIA_DRIVER_CAPABILITIES ${NVIDIA_DRIVER_CAPABILITIES:+$NVIDIA_DRIVER_C>
- set these env variables in container
__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia
from here: possible explanation