[GH-ISSUE #3150] ollama 0.1.29 does not work on kubernetes with amd gpu #63974

Closed
opened 2026-05-03 15:37:45 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @arno4000 on GitHub (Mar 14, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/3150

Originally assigned to: @dhiltgen on GitHub.

I installed the amd rocm k8s device plugin https://github.com/ROCm/k8s-device-plugin on a fresh k3s installation. Then I installed ollama using the following deployment:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: ollama
spec:
  selector:
    matchLabels:
      app: ollama
  template:
    metadata:
      labels:
        app: ollama
    spec:
      containers:
      - name: ollama
        image: ollama/ollama:0.1.29
        command: ["ollama", "serve"]
        resources:
          limits:
            memory: "6Gi"
            cpu: "6000m"
            amd.com/gpu: "1"
        ports:
        - containerPort: 11434
---
apiVersion: v1
kind: Service
metadata:
  name: ollama
spec:
  selector:
    app: ollama
  ports:
  - port: 11434
    targetPort: 11434

ollama says in the logs that it has found an amd gpu, but cannot find the suitable rocm version. Is this an issue of the rocm k8s plugin, or is there something missing in the container image? I am using an RX 7900 XTX as GPU and Endeavour OS as operating system.

ollama logs:

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

ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOHLmaRRPPGH4cO7njJaDeduLcdEa8TFZQIOpVpzUMQ1

time=2024-03-14T19:49:51.293Z level=INFO source=images.go:806 msg="total blobs: 0"
time=2024-03-14T19:49:51.293Z level=INFO source=images.go:813 msg="total unused blobs removed: 0"
time=2024-03-14T19:49:51.293Z level=INFO source=routes.go:1110 msg="Listening on [::]:11434 (version 0.1.29)"
time=2024-03-14T19:49:51.294Z level=INFO source=payload_common.go:112 msg="Extracting dynamic libraries to /tmp/ollama4293249849/runners ..."
time=2024-03-14T19:49:52.703Z level=INFO source=payload_common.go:139 msg="Dynamic LLM libraries [rocm_v60000 cpu_avx cuda_v11 cpu cpu_avx2]"
time=2024-03-14T19:49:52.703Z level=INFO source=gpu.go:77 msg="Detecting GPU type"
time=2024-03-14T19:49:52.703Z level=INFO source=gpu.go:191 msg="Searching for GPU management library libnvidia-ml.so"
time=2024-03-14T19:49:52.703Z level=INFO source=gpu.go:237 msg="Discovered GPU libraries: []"
time=2024-03-14T19:49:52.703Z level=INFO source=cpu_common.go:11 msg="CPU has AVX2"
time=2024-03-14T19:49:52.703Z level=WARN source=amd_linux.go:53 msg="ollama recommends running the https://www.amd.com/en/support/linux-drivers: amdgpu version file missing: /sys/module/amdgpu/version stat /sys/module/amdgpu/version: no such file or directory"
time=2024-03-14T19:49:52.703Z level=INFO source=amd_linux.go:88 msg="detected amdgpu versions [gfx1100]"
time=2024-03-14T19:49:52.703Z level=WARN source=amd_linux.go:350 msg="amdgpu detected, but no compatible rocm library found.  Either install rocm v6, or follow manual install instructions at https://github.com/ollama/ollama/blob/main/docs/linux.md#manual-install"
time=2024-03-14T19:49:52.703Z level=WARN source=amd_linux.go:99 msg="unable to verify rocm library, will use cpu: no suitable rocm found, falling back to CPU"
time=2024-03-14T19:49:52.703Z level=INFO source=routes.go:1133 msg="no GPU detected"
Originally created by @arno4000 on GitHub (Mar 14, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/3150 Originally assigned to: @dhiltgen on GitHub. I installed the amd rocm k8s device plugin https://github.com/ROCm/k8s-device-plugin on a fresh k3s installation. Then I installed ollama using the following deployment: ```yaml apiVersion: apps/v1 kind: Deployment metadata: name: ollama spec: selector: matchLabels: app: ollama template: metadata: labels: app: ollama spec: containers: - name: ollama image: ollama/ollama:0.1.29 command: ["ollama", "serve"] resources: limits: memory: "6Gi" cpu: "6000m" amd.com/gpu: "1" ports: - containerPort: 11434 --- apiVersion: v1 kind: Service metadata: name: ollama spec: selector: app: ollama ports: - port: 11434 targetPort: 11434 ``` ollama says in the logs that it has found an amd gpu, but cannot find the suitable rocm version. Is this an issue of the rocm k8s plugin, or is there something missing in the container image? I am using an RX 7900 XTX as GPU and Endeavour OS as operating system. ollama logs: ``` Couldn't find '/root/.ollama/id_ed25519'. Generating new private key. Your new public key is: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOHLmaRRPPGH4cO7njJaDeduLcdEa8TFZQIOpVpzUMQ1 time=2024-03-14T19:49:51.293Z level=INFO source=images.go:806 msg="total blobs: 0" time=2024-03-14T19:49:51.293Z level=INFO source=images.go:813 msg="total unused blobs removed: 0" time=2024-03-14T19:49:51.293Z level=INFO source=routes.go:1110 msg="Listening on [::]:11434 (version 0.1.29)" time=2024-03-14T19:49:51.294Z level=INFO source=payload_common.go:112 msg="Extracting dynamic libraries to /tmp/ollama4293249849/runners ..." time=2024-03-14T19:49:52.703Z level=INFO source=payload_common.go:139 msg="Dynamic LLM libraries [rocm_v60000 cpu_avx cuda_v11 cpu cpu_avx2]" time=2024-03-14T19:49:52.703Z level=INFO source=gpu.go:77 msg="Detecting GPU type" time=2024-03-14T19:49:52.703Z level=INFO source=gpu.go:191 msg="Searching for GPU management library libnvidia-ml.so" time=2024-03-14T19:49:52.703Z level=INFO source=gpu.go:237 msg="Discovered GPU libraries: []" time=2024-03-14T19:49:52.703Z level=INFO source=cpu_common.go:11 msg="CPU has AVX2" time=2024-03-14T19:49:52.703Z level=WARN source=amd_linux.go:53 msg="ollama recommends running the https://www.amd.com/en/support/linux-drivers: amdgpu version file missing: /sys/module/amdgpu/version stat /sys/module/amdgpu/version: no such file or directory" time=2024-03-14T19:49:52.703Z level=INFO source=amd_linux.go:88 msg="detected amdgpu versions [gfx1100]" time=2024-03-14T19:49:52.703Z level=WARN source=amd_linux.go:350 msg="amdgpu detected, but no compatible rocm library found. Either install rocm v6, or follow manual install instructions at https://github.com/ollama/ollama/blob/main/docs/linux.md#manual-install" time=2024-03-14T19:49:52.703Z level=WARN source=amd_linux.go:99 msg="unable to verify rocm library, will use cpu: no suitable rocm found, falling back to CPU" time=2024-03-14T19:49:52.703Z level=INFO source=routes.go:1133 msg="no GPU detected" ```
Author
Owner

@dhiltgen commented on GitHub (Mar 14, 2024):

The ROCm image is quite large, so we split it out as a separate image.

image: ollama/ollama:0.1.29-rocm

We'll get the docs updated shortly to make this clearer.

https://hub.docker.com/r/ollama/ollama

<!-- gh-comment-id:1998453867 --> @dhiltgen commented on GitHub (Mar 14, 2024): The ROCm image is quite large, so we split it out as a separate image. `image: ollama/ollama:0.1.29-rocm` We'll get the docs updated shortly to make this clearer. https://hub.docker.com/r/ollama/ollama
Author
Owner

@jmorganca commented on GitHub (Mar 15, 2024):

There's also a rocm tag that will always point to the latest one 😊

<!-- gh-comment-id:1998725339 --> @jmorganca commented on GitHub (Mar 15, 2024): There's also a `rocm` tag that will always point to the latest one 😊
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#63974