A software update removed docker. Now I am unable to run docker with gpu

A few weeks ago, I did a software update. When I logged back in, docker was not there anymore and all my docker images and containers were gone.

I re-installed docker with `snap`, but it seems that the installed docker does not support `–gpu=all`or anything else requiring access to the GPU. Here is an example of the problem. The following command from the ollama playbook: Open WebUI with Ollama | DGX Spark . Running the same command without the `–gpu=all`works but won´t have GPU access:

$ docker run -d -p 8080:8080 --gpus=all
-v open-webui:/app/backend/data
-v open-webui-ollama:/root/.ollama
–name open-webui ``ghcr.io/open-webui/open-webui:ollama
docker: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error running prestart hook #0: exit status 1, stdout: , stderr: Auto-detected mode as ‘legacy’
nvidia-container-cli: initialization error: load library failed: libnvidia-ml.so.1: cannot open shared object file: no such file or directory: unknown

What is the proper way to get the Nvidia version of docker to run. I tried
sudo nvidia-ctk runtime configure --runtime=docker
sudo systemctl restart docker
However I got an error for the second command: `Failed to restart docker.service: Unit docker.service not found.

@michel.lesoinne remove the snap! After run sudo apt install docker-ce. It will pull all the dependencies. Here’s a list of Docker packages on DGX Spark:

docker-buildx-plugin/unknown,now 0.29.1-1~ubuntu.24.04~noble arm64 [installed]
docker-ce-cli/unknown,now 5:28.5.1-1~ubuntu.24.04~noble arm64 [installed,automatic]
docker-ce/unknown,now 5:28.5.1-1~ubuntu.24.04~noble arm64 [installed,automatic]
docker-compose-plugin/unknown,now 2.40.0-1~ubuntu.24.04~noble arm64 [installed]
nv-docker-gpus/unknown,now 25.08-1 all [installed]
nv-docker-options/unknown,now 25.05-1 all [installed,automatic]

Thanks. It did fix the problem. A simple test with GPU now works.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.