RUNLOCALAIv38
->Will it run?Best GPUCompareTroubleshootStartLearnPulseModelsHardwareToolsBench
Run check
RUNLOCALAI

Independently operated catalog for local-AI hardware and software. Hand-written verdicts. Source-cited claims. Reproducible commands when we have them.

OP·Eruo Fredoline
DIR
  • Models
  • Hardware
  • Tools
  • Benchmarks
TOOLS
  • Will it run?
  • Compare hardware
  • Cost vs cloud
  • Choose my GPU
  • Prompting kits
  • Quick answers
REF
  • All buyer guides
  • Learn local AI
  • Methodology
  • Glossary
  • Errors KB
  • Trust
EDITOR
  • About
  • Author
  • How we make money
  • Editorial policy
  • Contact
LEGAL
  • Privacy
  • Terms
  • Sitemap
MAIL · MONTHLY DIGEST
Get monthly local AI changes
Monthly recap. No spam.
DISCLOSURE

Some links on this site are affiliate links (Amazon Associates and other first-class retailers). When you buy through them, we earn a small commission at no extra cost to you. Affiliate links do not influence our verdicts — there are cards we rate highly that we don't have affiliate relationships with, and cards that sell well that we refuse to recommend. Read more →

© 2026 runlocalai.coIndependently operated
RUNLOCALAI · v38
  1. >
  2. Home
  3. /Learn
  4. /How-to
  5. /How to verify CUDA setup for AI workloads
HOW-TO · SET

How to verify CUDA setup for AI workloads

intermediate·10 min·By Eruo Fredoline
Target environment
Ubuntu 24.04 · Ollama 0.4.xWindows 11 · Ollama 0.4.xmacOS 15 · Ollama 0.4.x
PREREQUISITES

CUDA drivers installed, NVIDIA GPU present on the system

What this does

Confirms that the CUDA driver and runtime are correctly installed and that a GPU is available for compute workloads. This is the primary gate before running any local AI model that requires GPU acceleration.

Steps

  1. Query the GPU with nvidia-smi. This talks directly to the kernel driver and reports GPU model, memory usage, and driver version.

    nvidia-smi
    

    Expected output: Table listing GPU with name, memory, driver version, and CUDA version.

  2. Check the nvcc compiler version.

    nvcc --version
    

    Expected output: Cuda compilation tools release 12.x with build date.

  3. Run a minimal CUDA compute test.

    python3 -c "import torch; print('CUDA available:', torch.cuda.is_available()); print('Device:', torch.cuda.get_device_name(0))"
    

    Expected output: CUDA available: True followed by GPU name.

  • Record the local run evidence. Save the exact command, runtime or package version, model name if applicable, and observed output so the result can be reproduced later.

Verification

nvidia-smi --query-gpu=name,driver_version,memory.total --format=csv
# Expected: header row followed by GPU name, driver version, total memory

Common failures

  • nvidia-smi: command not found — The NVIDIA driver is not installed or not in PATH. Reinstall the driver package.
  • nvcc: command not found — CUDA Toolkit not in PATH. Source /etc/profile.d/cuda.sh or add /usr/local/cuda/bin to PATH.
  • cudaGetDeviceCount returned 0 — Kernel module not loaded. Run sudo modprobe nvidia.
  • Mismatch between driver and runtime version — Downgrade the Toolkit or upgrade the driver.

Operator checkpoint

Before treating this as solved, write down the local runtime, model or package version, hardware/backend if relevant, and the verification output. This keeps the guide useful as a Will-It-Run style decision instead of a one-off command transcript.

Related guides

  • How to install NVIDIA Container Toolkit for Docker
  • How to configure PyTorch with GPU support
  • Course Ollama Deep Dive
RELATED GUIDES
SET
How to configure PyTorch with GPU support
SET
How to install NVIDIA Container Toolkit for Docker
← All how-to guidesCourses →