How do I install the NVIDIA driver and CUDA on my GPU server?

1 min read|Updated Dec 5, 2026

Short answer

On Ubuntu, install the driver with ubuntu-drivers, restart, and check the card with nvidia-smi. Ollama and PyTorch bring their own CUDA libraries, so most people never install the CUDA toolkit.

You have root on the server, so the driver installs like on any Linux machine. On Ubuntu:

bash
sudo apt update
sudo apt install -y ubuntu-drivers-common
sudo ubuntu-drivers install
sudo reboot

After the restart, check that the card is there:

bash
nvidia-smi

It shows the card's name, its memory and the driver version. The CUDA version in the top right is the newest CUDA the driver supports, not something you have to install.

  1. 01

    Ollama, PyTorch, vLLM

    They ship their own CUDA libraries. The driver is all they need.

  2. 02

    Compiling CUDA code yourself

    Install the toolkit with sudo apt install -y nvidia-cuda-toolkit, or the newest one from NVIDIA's CUDA download page.

  3. 03

    Docker containers that use the GPU

    Install the NVIDIA Container Toolkit, then start containers with --gpus all.

nvidia-smi says no devices were found? Restart once more after the install. If it still finds nothing, message support and we check the card from our side.

Did this solve it?

The full guide

How to Self-Host an LLM on a GPU Server (Ollama + Open WebUI)

3 min read

Related questions

Still stuck? Message support