ollama-cuda missing shared library libcudart.so.12

Description:

When running ollama (CUDA variant) it fails to load models due missing shared library libcudart.so.12.

Additional info:

  • package version: ollama-cuda 0.3.9-3
  • output log:
time=2024-09-13T16:56:22.955+02:00 level=INFO source=sched.go:450 msg="loaded runners" count=1
time=2024-09-13T16:56:22.955+02:00 level=INFO source=server.go:591 msg="waiting for llama runner to start responding"
time=2024-09-13T16:56:22.955+02:00 level=INFO source=server.go:625 msg="waiting for server to become available" status="llm server error"
/tmp/ollama683601101/runners/cuda_v12/ollama_llama_server: error while loading shared libraries: libcudart.so.12: cannot open shared object file: No such file or directory
time=2024-09-13T16:56:23.206+02:00 level=ERROR source=sched.go:456 msg="error loading llama server" error="llama runner process has terminated: exit status 127"

Steps to reproduce:

  1. sudo pacman -R cuda ollama-cuda
  2. sudo pacman -S ollama-cuda
  3. ollama serve (in a separate terminal)
  4. ollama run llama3.1

Proposed solution:

Add cuda as runtime dependency to ollama-cuda package. At least after installing it, ollama works correctly.

Edited by Pau RE