# Applications not using GPU inside docker container

**URL:** <https://forums.developer.nvidia.com/t/applications-not-using-gpu-inside-docker-container/285911>\
**Category:** Docker and NVIDIA Docker\
**Created:** [March 13, 2024, 10:06am UTC](https://forums.developer.nvidia.com/t/applications-not-using-gpu-inside-docker-container/285911 "2024-03-13T10:06:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mooshie00](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@mooshie00](https://forums.developer.nvidia.com/u/mooshie00)\
**Post date:** [March 13, 2024, 10:06am UTC](https://forums.developer.nvidia.com/t/applications-not-using-gpu-inside-docker-container/285911/1 "2024-03-13T10:06:25Z")

</div>

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](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/1.10.0/install-guide.html) to the letter but still failed to make progress.

My setup:

```auto
Ubuntu on the host: 20.04.6 LTS
Nvidia driver version: 525.147.05
Cuda version: 12.0
kernel version: 5.15.0-97-generic
nvidia-container-toolskit version: 1.15.0-rc.3
docker version: 24.0.4
nvidia-docker2 version: 2.14.0-1

```

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:

```auto
Tue Mar 12 15:10:54 2024       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 525.147.05 Driver Version: 525.147.05 CUDA Version: 12.0 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 NVIDIA RTX A300... Off | 00000000:01:00.0 Off | N/A |
| N/A 53C P8 13W / 80W | 552MiB / 6144MiB | 17% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
+-----------------------------------------------------------------------------+

```

However, when I install glmark2 and run it it **does not** utilize the GPU at all. Moreover, after installing `nvidia-settings` and `nvidia-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

---

<div class="post-metadata">

**Author:** ![henryse](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/henryse/32/318311_2.png) [@henryse](https://forums.developer.nvidia.com/u/henryse)\
**Post date:** [May 2, 2024, 12:29am UTC](https://forums.developer.nvidia.com/t/applications-not-using-gpu-inside-docker-container/285911/2 "2024-05-02T00:29:00Z")

</div>

I’m having similar problem with Docker:

I get the following at the terminal:

```auto
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 550.54.15 Driver Version: 550.54.15 CUDA Version: 12.4 |
|-----------------------------------------+------------------------+----------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+========================+======================|
| 0 NVIDIA GeForce RTX 4060 On | 00000000:01:00.0 Off | N/A |
| 0% 42C P8 N/A / 115W | 1MiB / 8188MiB | 0% Default |
| | | N/A |
+-----------------------------------------+------------------------+----------------------+
| 1 NVIDIA GeForce GTX 1080 On | 00000000:81:00.0 Off | N/A |
| 24% 42C P8 8W / 180W | 1MiB / 8192MiB | 0% Default |
| | | N/A |
+-----------------------------------------+------------------------+----------------------+
                                                                                         
+-----------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=========================================================================================|
| No running processes found |
+-----------------------------------------------------------------------------------------+

```

This is what I get when I run nvidia-smi in docker:

```auto
docker run --rm -ti --runtime=nvidia -e NVIDIA_VISIBLE_DEVICES=all ubuntu nvidia-smi -L
Failed to initialize NVML: Unknown Error

```

---

<div class="post-metadata">

**Author:** ![shanecodesspaghetti](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@shanecodesspaghetti](https://forums.developer.nvidia.com/u/shanecodesspaghetti)\
**Post date:** [July 18, 2025, 7:40am UTC](https://forums.developer.nvidia.com/t/applications-not-using-gpu-inside-docker-container/285911/3 "2025-07-18T07:40:48Z")

</div>

Longshot but did you every get this working?
