[GH-ISSUE #10014] Podman on Ubuntu can't find gpus #68623

Closed
opened 2026-05-04 14:38:30 -05:00 by GiteaMirror · 6 comments
Owner

Originally created by @thezachdrake on GitHub (Mar 27, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/10014

What is the issue?

When I run with podman on ubuntu it cannot find my gpus.

Relevant log output

nvidia-ctk cdi list

INFO[0000] Found 3 CDI devices                          
nvidia.com/gpu=0
nvidia.com/gpu=GPU-0de6d016-e195-8065-ed7d-8527f69bc2a2
nvidia.com/gpu=all


----------------------------------------------------------------
podman run -it -e NVIDIA_VISIBLE_DEVICES=all --device nvidia.com/gpu=all ollama/ollama

Couldn't find '/root/.ollama/id_ed25519'. Generating new private key.
Your new public key is: 

ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBDuyHDev/cny2FiG1bUtT7CroPIRxQkvpdXJfZDfHpx

2025/03/27 13:54:22 routes.go:1230: INFO server config env="map[CUDA_VISIBLE_DEVICES: GPU_DEVICE_ORDINAL: HIP_VISIBLE_DEVICES: HSA_OVERRIDE_GFX_VERSION: HTTPS_PROXY: HTTP_PROXY: NO_PROXY: OLLAMA_CONTEXT_LENGTH:2048 OLLAMA_DEBUG:false OLLAMA_FLASH_ATTENTION:false OLLAMA_GPU_OVERHEAD:0 OLLAMA_HOST:http://0.0.0.0:11434 OLLAMA_INTEL_GPU:false OLLAMA_KEEP_ALIVE:5m0s OLLAMA_KV_CACHE_TYPE: OLLAMA_LLM_LIBRARY: OLLAMA_LOAD_TIMEOUT:5m0s OLLAMA_MAX_LOADED_MODELS:0 OLLAMA_MAX_QUEUE:512 OLLAMA_MODELS:/root/.ollama/models OLLAMA_MULTIUSER_CACHE:false OLLAMA_NEW_ENGINE:false OLLAMA_NOHISTORY:false OLLAMA_NOPRUNE:false OLLAMA_NUM_PARALLEL:0 OLLAMA_ORIGINS:[http://localhost https://localhost http://localhost:* https://localhost:* http://127.0.0.1 https://127.0.0.1 http://127.0.0.1:* https://127.0.0.1:* http://0.0.0.0 https://0.0.0.0 http://0.0.0.0:* https://0.0.0.0:* app://* file://* tauri://* vscode-webview://* vscode-file://*] OLLAMA_SCHED_SPREAD:false ROCR_VISIBLE_DEVICES: http_proxy: https_proxy: no_proxy:]"
time=2025-03-27T13:54:22.051Z level=INFO source=images.go:432 msg="total blobs: 0"
time=2025-03-27T13:54:22.051Z level=INFO source=images.go:439 msg="total unused blobs removed: 0"
time=2025-03-27T13:54:22.051Z level=INFO source=routes.go:1297 msg="Listening on [::]:11434 (version 0.6.2)"
time=2025-03-27T13:54:22.052Z level=INFO source=gpu.go:217 msg="looking for compatible GPUs"
time=2025-03-27T13:54:22.059Z level=WARN source=gpu.go:605 msg="unknown error initializing cuda driver library /usr/lib/x86_64-linux-gnu/libcuda.so.550.120: cuda driver library init failure: 999. see https://github.com/ollama/ollama/blob/main/docs/troubleshooting.md for more information"
time=2025-03-27T13:54:22.064Z level=INFO source=gpu.go:377 msg="no compatible GPUs were discovered"
time=2025-03-27T13:54:22.064Z level=INFO source=types.go:130 msg="inference compute" id=0 library=cpu variant="" compute="" driver=0.0 name="" total="31.0 GiB" available="20.8 GiB"

OS

Linux

GPU

Nvidia

CPU

Intel

Ollama version

No response

Originally created by @thezachdrake on GitHub (Mar 27, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/10014 ### What is the issue? When I run with podman on ubuntu it cannot find my gpus. ### Relevant log output ```shell nvidia-ctk cdi list INFO[0000] Found 3 CDI devices nvidia.com/gpu=0 nvidia.com/gpu=GPU-0de6d016-e195-8065-ed7d-8527f69bc2a2 nvidia.com/gpu=all ---------------------------------------------------------------- podman run -it -e NVIDIA_VISIBLE_DEVICES=all --device nvidia.com/gpu=all ollama/ollama Couldn't find '/root/.ollama/id_ed25519'. Generating new private key. Your new public key is: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBDuyHDev/cny2FiG1bUtT7CroPIRxQkvpdXJfZDfHpx 2025/03/27 13:54:22 routes.go:1230: INFO server config env="map[CUDA_VISIBLE_DEVICES: GPU_DEVICE_ORDINAL: HIP_VISIBLE_DEVICES: HSA_OVERRIDE_GFX_VERSION: HTTPS_PROXY: HTTP_PROXY: NO_PROXY: OLLAMA_CONTEXT_LENGTH:2048 OLLAMA_DEBUG:false OLLAMA_FLASH_ATTENTION:false OLLAMA_GPU_OVERHEAD:0 OLLAMA_HOST:http://0.0.0.0:11434 OLLAMA_INTEL_GPU:false OLLAMA_KEEP_ALIVE:5m0s OLLAMA_KV_CACHE_TYPE: OLLAMA_LLM_LIBRARY: OLLAMA_LOAD_TIMEOUT:5m0s OLLAMA_MAX_LOADED_MODELS:0 OLLAMA_MAX_QUEUE:512 OLLAMA_MODELS:/root/.ollama/models OLLAMA_MULTIUSER_CACHE:false OLLAMA_NEW_ENGINE:false OLLAMA_NOHISTORY:false OLLAMA_NOPRUNE:false OLLAMA_NUM_PARALLEL:0 OLLAMA_ORIGINS:[http://localhost https://localhost http://localhost:* https://localhost:* http://127.0.0.1 https://127.0.0.1 http://127.0.0.1:* https://127.0.0.1:* http://0.0.0.0 https://0.0.0.0 http://0.0.0.0:* https://0.0.0.0:* app://* file://* tauri://* vscode-webview://* vscode-file://*] OLLAMA_SCHED_SPREAD:false ROCR_VISIBLE_DEVICES: http_proxy: https_proxy: no_proxy:]" time=2025-03-27T13:54:22.051Z level=INFO source=images.go:432 msg="total blobs: 0" time=2025-03-27T13:54:22.051Z level=INFO source=images.go:439 msg="total unused blobs removed: 0" time=2025-03-27T13:54:22.051Z level=INFO source=routes.go:1297 msg="Listening on [::]:11434 (version 0.6.2)" time=2025-03-27T13:54:22.052Z level=INFO source=gpu.go:217 msg="looking for compatible GPUs" time=2025-03-27T13:54:22.059Z level=WARN source=gpu.go:605 msg="unknown error initializing cuda driver library /usr/lib/x86_64-linux-gnu/libcuda.so.550.120: cuda driver library init failure: 999. see https://github.com/ollama/ollama/blob/main/docs/troubleshooting.md for more information" time=2025-03-27T13:54:22.064Z level=INFO source=gpu.go:377 msg="no compatible GPUs were discovered" time=2025-03-27T13:54:22.064Z level=INFO source=types.go:130 msg="inference compute" id=0 library=cpu variant="" compute="" driver=0.0 name="" total="31.0 GiB" available="20.8 GiB" ``` ### OS Linux ### GPU Nvidia ### CPU Intel ### Ollama version _No response_
GiteaMirror added the bugneeds more info labels 2026-05-04 14:38:31 -05:00
Author
Owner

@rick-github commented on GitHub (Mar 27, 2025):

What does the following output:

podman run --rm --device nvidia.com/gpu=all --security-opt=label=disable ubuntu nvidia-smi -L
<!-- gh-comment-id:2758394863 --> @rick-github commented on GitHub (Mar 27, 2025): What does the following output: ``` podman run --rm --device nvidia.com/gpu=all --security-opt=label=disable ubuntu nvidia-smi -L ```
Author
Owner

@thezachdrake commented on GitHub (Mar 27, 2025):

podman run --rm --device nvidia.com/gpu=all --security-opt=label=disable ubuntu nvidia-smi -L
Resolved "ubuntu" as an alias (/etc/containers/registries.conf.d/shortnames.conf)
Trying to pull docker.io/library/ubuntu:latest...
Getting image source signatures
Copying blob 5a7813e071bf done   | 
Copying config a04dc4851c done   | 
Writing manifest to image destination
GPU 0: NVIDIA RTX A1000 Laptop GPU (UUID: GPU-0de6d016-e195-8065-ed7d-8527f69bc2a2)
<!-- gh-comment-id:2758584223 --> @thezachdrake commented on GitHub (Mar 27, 2025): ``` podman run --rm --device nvidia.com/gpu=all --security-opt=label=disable ubuntu nvidia-smi -L Resolved "ubuntu" as an alias (/etc/containers/registries.conf.d/shortnames.conf) Trying to pull docker.io/library/ubuntu:latest... Getting image source signatures Copying blob 5a7813e071bf done | Copying config a04dc4851c done | Writing manifest to image destination GPU 0: NVIDIA RTX A1000 Laptop GPU (UUID: GPU-0de6d016-e195-8065-ed7d-8527f69bc2a2) ```
Author
Owner

@thezachdrake commented on GitHub (Mar 27, 2025):

When I run ollama as a service and not in a container it does run on the GPU and its fast. Its only when I run it in the container that it runs on CPU and is slow

<!-- gh-comment-id:2758586937 --> @thezachdrake commented on GitHub (Mar 27, 2025): When I run ollama as a service and not in a container it does run on the GPU and its fast. Its only when I run it in the container that it runs on CPU and is slow
Author
Owner

@rick-github commented on GitHub (Mar 27, 2025):

OK, so the device is available. What if you run nvidia-smi -L inside the ollama container?

<!-- gh-comment-id:2758624049 --> @rick-github commented on GitHub (Mar 27, 2025): OK, so the device is available. What if you run `nvidia-smi -L` inside the ollama container?
Author
Owner

@thezachdrake commented on GitHub (Mar 27, 2025):

podman run --rm --gpus nvidia.com/all ollama/ollama nvidia-smi -L
Error: unknown command "nvidia-smi" for "ollama"

is this what you mean?

<!-- gh-comment-id:2758769823 --> @thezachdrake commented on GitHub (Mar 27, 2025): ``` podman run --rm --gpus nvidia.com/all ollama/ollama nvidia-smi -L Error: unknown command "nvidia-smi" for "ollama" ``` is this what you mean?
Author
Owner

@rick-github commented on GitHub (Mar 27, 2025):

I don't use podman, my guess would be:

podman run --rm --gpus nvidia.com/all --entrypoint bash ollama/ollama -c 'nvidia-smi -L'

<!-- gh-comment-id:2758903374 --> @rick-github commented on GitHub (Mar 27, 2025): I don't use podman, my guess would be: ``` podman run --rm --gpus nvidia.com/all --entrypoint bash ollama/ollama -c 'nvidia-smi -L' ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#68623