You install Ollama on a fresh Linux box, run a model, and watch your CPU pin to 100 percent while the GPU sits idle. The instinct is to go install the full CUDA toolkit, and that is usually the move that keeps Ollama stuck on the processor. On Linux, Ollama ships its own CUDA libraries internally and only needs a recent NVIDIA driver underneath it.

Quick Answer

For GPU inference on Linux, Ollama needs NVIDIA driver 535 or newer, and nothing else from NVIDIA. It bundles the CUDA runtime it depends on, so a separately installed CUDA toolkit adds no benefit and can cause version conflicts that push inference back onto the CPU. Install the driver, confirm nvidia-smi works, then reinstall Ollama if it was set up before the driver.

Why a separate CUDA toolkit causes the problem

Ollama bundles the exact CUDA libraries it was built against. When you install a standalone CUDA toolkit, you introduce a second set of CUDA libraries on the system, and library path conflicts can leave Ollama unable to load the GPU backend cleanly. Rather than crash, it falls back to CPU and keeps running, which is why the failure looks silent. People then assume the GPU is broken and pile on more CUDA packages, making the path collisions worse.

The driver is a different thing entirely. The NVIDIA kernel driver is what lets any CUDA software talk to the card at all, and Ollama needs version 535 or later for current GPUs. That single driver is the only NVIDIA component you must install yourself.

The AI PC range at Evetech brings together GPU-first configurations purpose-built for local AI inference workloads.

The clean fix

Start by confirming the driver is loaded. Run nvidia-smi: if it prints your card, its memory, and a driver version of 535 or higher, the driver layer is healthy. If the version is older, update it through your distribution's driver tooling and reboot.

Next, remove any standalone CUDA toolkit you added while troubleshooting. On Debian and Ubuntu systems that means purging the cuda packages so only the driver remains. You do not need nvcc or the developer toolkit for Ollama to run.

Finally, reinstall Ollama. If Ollama was installed before the driver was working, it never registered that a GPU exists, and a reinstall lets it detect the card on a clean system. Set OLLAMA_DEBUG=1 and restart the server, then check the startup log: a healthy boot reports an inference compute line naming the CUDA library and your GPU. If you see that line, the model is running on the card.

Verifying it actually offloaded

A driver that loads is not proof the model is on the GPU. Run a model and watch nvidia-smi in a second terminal; you should see VRAM fill and GPU utilisation climb while a prompt generates. If VRAM stays near zero, the model may be larger than your card's memory and Ollama is splitting layers to system RAM, which is slower but still partly accelerated. Picking a model that fits your VRAM keeps everything on the card. The PC best sellers at Evetech reveal which hardware local-AI builders in SA are currently pairing with inference workloads.

Frequently Asked Questions

Do I ever need the CUDA toolkit for Ollama on Linux?

No, not for running Ollama itself. The toolkit is for compiling your own CUDA code. Ollama carries the CUDA runtime it needs, so the driver alone is enough for inference.

Why does Ollama run on CPU even though nvidia-smi works?

Usually a conflicting standalone CUDA install, or Ollama was installed before the driver was set up. Purge the extra CUDA packages and reinstall Ollama so it detects the card on a clean system.

What driver version does Ollama need?

NVIDIA driver 535 or newer on Linux. Older drivers can leave the GPU backend unavailable, sending inference to the CPU. Check the version at the top of nvidia-smi output.

How do I confirm the model is on the GPU?

Run a prompt and watch nvidia-smi: VRAM usage and GPU utilisation should rise. You can also set OLLAMA_DEBUG=1 and look for an inference compute log line naming the CUDA library.

If your current rig keeps falling back to CPU because the card is too small for the models you want to run, it may be time to build around the GPU instead. Explore the AI PC range at Evetech (https://www.evetech.co.za/PC-Components/ai-pcs-445) and spec a machine that keeps local inference where it belongs.