Nvidia GPU in docker doesn't work #492

Closed
opened 2025-11-11 14:22:56 -06:00 by GiteaMirror · 9 comments
Owner

Originally created by @jynrock on GitHub (Mar 17, 2024).

Hi,
I tried to activate the gpu by adding these lines (as here https://github.com/open-webui/open-webui/discussions/1017 ) to the docker stack:
deploy :
resources :
reservations :
devices :
- driver : nvidia
count : 1
capabilities : [gpu]

But when I deploy the stack, I get this error:

failed to deploy a stack : ollama Pulling ollama Pulled Container ollama Recreate Container ollama Recreated Container open-webui Recreate Container open-webui Recreated Container ollama Starting Error response from daemon : could not select device driver "nvidia" with capabilities : gpu

Ubuntu 22.04
Docker 25.0.4
RTX 3080
Driver Version: 535.161.07
CUDA Version: 12.2

Originally created by @jynrock on GitHub (Mar 17, 2024). Hi, I tried to activate the gpu by adding these lines (as here https://github.com/open-webui/open-webui/discussions/1017 ) to the docker stack: deploy : resources : reservations : devices : - driver : nvidia count : 1 capabilities : [gpu] But when I deploy the stack, I get this error: failed to deploy a stack : ollama Pulling ollama Pulled Container ollama Recreate Container ollama Recreated Container open-webui Recreate Container open-webui Recreated Container ollama Starting Error response from daemon : could not select device driver "nvidia" with capabilities : [[gpu]] Ubuntu 22.04 Docker 25.0.4 RTX 3080 Driver Version: 535.161.07 CUDA Version: 12.2
Author
Owner

@cjhmdm commented on GitHub (Mar 17, 2024):

Are you using Docker Desktop? If so, it doesn't have gpu support in linux. I had to remove Docker Desktop completely in order to get this working.

@cjhmdm commented on GitHub (Mar 17, 2024): Are you using Docker Desktop? If so, it doesn't have gpu support in linux. I had to remove Docker Desktop completely in order to get this working.
Author
Owner

@jynrock commented on GitHub (Mar 17, 2024):

If I quit Docker Desktop, all my containers stop too

@jynrock commented on GitHub (Mar 17, 2024): If I quit Docker Desktop, all my containers stop too
Author
Owner

@justinh-rahb commented on GitHub (Mar 17, 2024):

If I quit Docker Desktop, all my containers stop too

That is expected behaviour.

@justinh-rahb commented on GitHub (Mar 17, 2024): > If I quit Docker Desktop, all my containers stop too That is expected behaviour.
Author
Owner

@jynrock commented on GitHub (Mar 17, 2024):

Ok, but how the containers start without docker desktop ?

@jynrock commented on GitHub (Mar 17, 2024): Ok, but how the containers start without docker desktop ?
Author
Owner

@cjhmdm commented on GitHub (Mar 17, 2024):

Ok, but how the containers start without docker desktop ?

command line

@cjhmdm commented on GitHub (Mar 17, 2024): > Ok, but how the containers start without docker desktop ? command line
Author
Owner

@jynrock commented on GitHub (Mar 17, 2024):

Without docker desktop launch I can't access to portainer, openwebui doesn't work, and the command "docker ps -a" show no container.

@jynrock commented on GitHub (Mar 17, 2024): Without docker desktop launch I can't access to portainer, openwebui doesn't work, and the command "docker ps -a" show no container.
Author
Owner

@justinh-rahb commented on GitHub (Mar 17, 2024):

Jynrock, uninstall Docker Desktop, and install Docker this way instead:

https://docs.docker.com/engine/install/ubuntu/

@justinh-rahb commented on GitHub (Mar 17, 2024): Jynrock, uninstall Docker Desktop, and install Docker this way instead: https://docs.docker.com/engine/install/ubuntu/
Author
Owner

@jynrock commented on GitHub (Mar 17, 2024):

Thank you very much
Finally everything work

@jynrock commented on GitHub (Mar 17, 2024): Thank you very much Finally everything work
Author
Owner

@DavidOrakpo commented on GitHub (Jan 15, 2025):

I deleted docker desktop. I tried running open web ui docker install command for gpus. But I get the error "Cannot connect to the Docker daemon"

Thank you very much Finally everything work

@DavidOrakpo commented on GitHub (Jan 15, 2025): I deleted docker desktop. I tried running open web ui docker install command for gpus. But I get the error "Cannot connect to the Docker daemon" > Thank you very much Finally everything work
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#492