Feature Request: Ollama Snap with GPU Support for Ubuntu Core 24 #8511

Open
opened 2025-11-12 14:44:22 -06:00 by GiteaMirror · 0 comments
Owner

Originally created by @aswinc-tech on GitHub (Oct 29, 2025).

Summary

Request official support for running Ollama with NVIDIA GPU acceleration on Ubuntu Core 24 systems.

Current Situation

  • Ollama snap is available and works on traditional Ubuntu systems
  • Ubuntu Core 24 uses a different driver model via snap content interfaces
  • Current Ollama snap connects to mesa-2404:gpu-2404 by default
  • NVIDIA GPU access fails with "CUDA driver version is insufficient" errors

Environment

  • OS: Ubuntu Core 24
  • Hardware: NVIDIA H100 NVL GPU (Device ID: 1eb8)
  • Ollama Snap: Installed from stable channel
  • Issue: cudaGetDeviceCount returned 35 (cudaErrorInsufficientDriver)

Installed Snaps

Name                 Version                          Rev    Tracking       Publisher            Notes
console-conf         24.04.1+git45g5f9fae19+g7598200  79     24/stable      canonical✓           -
core                 16-2.61.4-20250626               17247  latest/stable  canonical✓           core
core22               20250923                         2139   latest/stable  canonical✓           base
core24               20251001                         1225   latest/stable  canonical✓           base
cuda-uc              v12.9+build-2025-07-14           2      latest/stable  christiaantheunisse  -
curl                 8.16.0                           2351   latest/stable  aoilinux             -
graphics-test-tools  24.04                            628    24/stable      canonical✓           -
mesa-2404            25.0.7-snap207                   1110   latest/stable  canonical✓           -
nvidia-assemble      3-36-gb8b0680                    62     22/stable      canonical✓           -
nvidia-core22        535.247.01+mesa23.2.1            138    latest/stable  canonical✓           -
nvidia-smi-uc        1.1+build-2025-07-12             2      latest/stable  christiaantheunisse  -
ollama               v0.12.5                          84     latest/stable  mz2                  -
pc                   24-0.1                           196    24/stable      canonical✓           gadget
pc-kernel            6.8.0-86.87                      2881   24/stable      canonical✓           kernel
pciutils             3.3.1-3                          3      latest/stable  woodrow              -
snapd                2.72                             25577  latest/stable  canonical✓           snapd

Snap Connections

content[gpu-2404]         cuda-uc:gpu-2404                        mesa-2404:gpu-2404             -
content[gpu-2404]         graphics-test-tools:gpu-2404            mesa-2404:gpu-2404             -
content[kernel-gpu-2404]  mesa-2404:kernel-gpu-2404               pc-kernel:kernel-gpu-2404      -
content[gpu-2404]         nvidia-smi-uc:gpu-2404                  mesa-2404:gpu-2404             manual
kernel-module-load        nvidia-assemble:modprobe-nvidia         :kernel-module-load            -
network                   ollama:network                          :network                       -
network-bind              ollama:network-bind                     :network-bind                  -
nvidia-drivers-support    nvidia-assemble:nvidia-drivers-support  :nvidia-drivers-support        -
opengl                    nvidia-core22:opengl                    :opengl                        -
opengl                    nvidia-smi-uc:opengl                    :opengl                        -
opengl                    ollama:opengl                           :opengl                        -
$ snap connections ollama
Interface        Plug                    Slot           Notes
home             ollama:home             -              -
network          ollama:network          :network       -
network-bind     ollama:network-bind     :network-bind  -
opengl           ollama:opengl           :opengl        -
removable-media  ollama:removable-media  -              -

Problem

Ubuntu Core 24 requires NVIDIA drivers through either:

  1. nvidia-core24 snap (not currently available/supported)
  2. Kernel snap with embedded NVIDIA drivers (not in standard pc-kernel)
  3. nvidia-assemble snap (requires drivers in kernel snap)

The current Ollama snap configuration assumes host-installed NVIDIA drivers or mesa-2404, which don't provide NVIDIA CUDA drivers on Ubuntu Core.

Requested Solution

Add support for one of these approaches:

Option A: Support nvidia-core24 content interface

plugs:
  gpu-2404:
    interface: content
    target: $SNAP/gpu-2404
    default-provider: nvidia-core24  # or mesa-2404 as fallback

Option B: Bundle NVIDIA drivers within Ollama snap (if licensing permits)

Option C: Document requirements for GPU-enabled kernel snaps on Ubuntu Core

Expected Behavior

sudo snap install ollama
sudo snap connect ollama:gpu-2404 nvidia-core24:gpu-2404
ollama run llama2  # Should utilize GPU acceleration

Actual Behavior

cuda-uc.deviceQuery
# Result: cudaErrorInsufficientDriver - CUDA driver version is insufficient

Additional Context

  • Ubuntu Core uses immutable filesystem with snap-only packages
  • Traditional nvidia-driver packages cannot be installed
  • Other GPU snaps (cuda-uc, nvidia-smi-uc) face the same challenges
  • This affects edge computing and IoT deployments using Ubuntu Core

Benefits

  • Enable AI inference on Ubuntu Core edge devices
  • Support enterprise IoT deployments with GPU acceleration
  • Align with Canonical's Ubuntu Core ecosystem
Originally created by @aswinc-tech on GitHub (Oct 29, 2025). ### Summary Request official support for running Ollama with NVIDIA GPU acceleration on Ubuntu Core 24 systems. ### Current Situation - Ollama snap is available and works on traditional Ubuntu systems - Ubuntu Core 24 uses a different driver model via snap content interfaces - Current Ollama snap connects to `mesa-2404:gpu-2404` by default - NVIDIA GPU access fails with "CUDA driver version is insufficient" errors ### Environment - **OS**: Ubuntu Core 24 - **Hardware**: NVIDIA H100 NVL GPU (Device ID: 1eb8) - **Ollama Snap**: Installed from stable channel - **Issue**: `cudaGetDeviceCount returned 35` (cudaErrorInsufficientDriver) #### Installed Snaps ``` Name Version Rev Tracking Publisher Notes console-conf 24.04.1+git45g5f9fae19+g7598200 79 24/stable canonical✓ - core 16-2.61.4-20250626 17247 latest/stable canonical✓ core core22 20250923 2139 latest/stable canonical✓ base core24 20251001 1225 latest/stable canonical✓ base cuda-uc v12.9+build-2025-07-14 2 latest/stable christiaantheunisse - curl 8.16.0 2351 latest/stable aoilinux - graphics-test-tools 24.04 628 24/stable canonical✓ - mesa-2404 25.0.7-snap207 1110 latest/stable canonical✓ - nvidia-assemble 3-36-gb8b0680 62 22/stable canonical✓ - nvidia-core22 535.247.01+mesa23.2.1 138 latest/stable canonical✓ - nvidia-smi-uc 1.1+build-2025-07-12 2 latest/stable christiaantheunisse - ollama v0.12.5 84 latest/stable mz2 - pc 24-0.1 196 24/stable canonical✓ gadget pc-kernel 6.8.0-86.87 2881 24/stable canonical✓ kernel pciutils 3.3.1-3 3 latest/stable woodrow - snapd 2.72 25577 latest/stable canonical✓ snapd ``` #### Snap Connections ``` content[gpu-2404] cuda-uc:gpu-2404 mesa-2404:gpu-2404 - content[gpu-2404] graphics-test-tools:gpu-2404 mesa-2404:gpu-2404 - content[kernel-gpu-2404] mesa-2404:kernel-gpu-2404 pc-kernel:kernel-gpu-2404 - content[gpu-2404] nvidia-smi-uc:gpu-2404 mesa-2404:gpu-2404 manual kernel-module-load nvidia-assemble:modprobe-nvidia :kernel-module-load - network ollama:network :network - network-bind ollama:network-bind :network-bind - nvidia-drivers-support nvidia-assemble:nvidia-drivers-support :nvidia-drivers-support - opengl nvidia-core22:opengl :opengl - opengl nvidia-smi-uc:opengl :opengl - opengl ollama:opengl :opengl - ``` ``` $ snap connections ollama Interface Plug Slot Notes home ollama:home - - network ollama:network :network - network-bind ollama:network-bind :network-bind - opengl ollama:opengl :opengl - removable-media ollama:removable-media - - ``` ### Problem Ubuntu Core 24 requires NVIDIA drivers through either: 1. `nvidia-core24` snap (not currently available/supported) 2. Kernel snap with embedded NVIDIA drivers (not in standard `pc-kernel`) 3. `nvidia-assemble` snap (requires drivers in kernel snap) The current Ollama snap configuration assumes host-installed NVIDIA drivers or mesa-2404, which don't provide NVIDIA CUDA drivers on Ubuntu Core. ### Requested Solution Add support for one of these approaches: **Option A**: Support `nvidia-core24` content interface ```yaml plugs: gpu-2404: interface: content target: $SNAP/gpu-2404 default-provider: nvidia-core24 # or mesa-2404 as fallback ``` **Option B**: Bundle NVIDIA drivers within Ollama snap (if licensing permits) **Option C**: Document requirements for GPU-enabled kernel snaps on Ubuntu Core ### Expected Behavior ```bash sudo snap install ollama sudo snap connect ollama:gpu-2404 nvidia-core24:gpu-2404 ollama run llama2 # Should utilize GPU acceleration ``` ### Actual Behavior ```bash cuda-uc.deviceQuery # Result: cudaErrorInsufficientDriver - CUDA driver version is insufficient ``` ### Additional Context - Ubuntu Core uses immutable filesystem with snap-only packages - Traditional `nvidia-driver` packages cannot be installed - Other GPU snaps (cuda-uc, nvidia-smi-uc) face the same challenges - This affects edge computing and IoT deployments using Ubuntu Core ### Benefits - Enable AI inference on Ubuntu Core edge devices - Support enterprise IoT deployments with GPU acceleration - Align with Canonical's Ubuntu Core ecosystem
GiteaMirror added the feature request label 2025-11-12 14:44:22 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama-ollama#8511