If you want to use GPU in Docker Desktop, the documentation can help
You don’t have to install anythin in the WSL 2 distribution. You don’t configure Docker Desktop to run its en gine in a specific WSL2 distribution, you just configure it to enable the client in that WSL2 distribution so the Desktop distribution will be like a remote machine. You wouldn’t try to install cuda on your workstation when containers ar running on a remote machine.
thanks for your response
why in docker info command i see this response:
Operating System: Docker Desktop
is it correct? it shouldn’t be ubuntu?
i was using ollama + openwebui inside docker compose
for openwebui i used gpu version + gpu configs
but for ollama i didn’t use any gpu config
so when i run both of them only cpu was used and no gpu was involved
so i though it was because of wrong drivers so i installed nvidia things inside wsl2
and nothing changed
No, Docker Desktop is the correct one, as that is the OS of the daemon, not the client and Docker DEsktop has its own WSL2 distribution not based on Ubuntu, but Linux Kit.
thanks for your response
i edit my docker compose file and now my ollama + openwebui is better than before
(the speed of response is increased)
but still when i check from task manager of windows, still cpu has load and gpu has no load
how i can be sure that gpu is using by docker?
i must add -benchmark to my setup and check? or there is other way too?
I rarely use Windows so I’m not sure how the resources can be seen. I know that the Task manager doesn’t always show the expected values and the 'Resource Monitor" can be used then. If the application actually uses the GPU and not the CPU and the --gpus all flag is added the GPU should be used. If it doesn’t happen, and you think it is a bug, you can report it on GitHub