Open kmr1wz opened 6 months ago
@kmr1wz same issue. Have you found the solution? https://github.com/NVIDIA/nvidia-container-toolkit/issues/426
Unfortunately no fix yet - will post here if I figure anything out. Would appreciate anyone else having any advice too.
Note that the graphics or display libraries are only injected if NVIDIA_DRIVER_CAPABILIES
include display
and / or graphics
. Could you try run the container with -e NVIDIA_DRIVER_CAPABILITIES=all
?
@elezar Wow, that was literally it. Now glmark2 is using the driver from within the container. Thanks so much man!
For reference, full command I'm running (with success):
docker run -it --rm --privileged -e DISPLAY=$DISPLAY -e NVIDIA_DRIVER_CAPABILITIES=all --runtime=nvidia --gpus all -v /tmp/.X11-unix:/tmp/.X11-unix nvidia/cuda:11.6.2-base-ubuntu20.04 bash
Hi everyone, I've been trying to make my GPU be utilized when using any graphical application from inside of the docker container, but with no success so far. Posting this as an issue since I've followed the instructions here to the letter but still failed to make progress.
My setup:
I've been trying to run the container as follows:
docker run -it --rm --privileged -e DISPLAY=$DISPLAY --runtime=nvidia --gpus all -v /tmp/.X11-unix:/tmp/.X11-unix nvidia/cuda:11.6.2-base-ubuntu20.04 bash
after which, when I run nvidia-smi I do get the expected output:
However, when I install glmark2 and run it it does not utilize the GPU at all. Moreover, after installing
nvidia-settings
andnvidia-prime
I do not see an option to switch nvidia prime to performace mode in the nvidia settings (I should not that after switching that on my host the GPU started being utilized).Anyone has any ideas on what is going on and what I might be doing wrong? I'd appreciate any help, running out of ideas here.
Thanks in advance, Michal