Skip to content

usm cu122

Install NVIDIA driver 535, CUDA 12.2, and the Vulkan loader on Ubuntu.

usm cu122

What it does

  • Adds the NVIDIA CUDA apt repo for CUDA 12.2.
  • Installs nvidia-driver-535 and cuda-12-2 (and dependencies).
  • Installs libvulkan1 + vulkan-tools so GPU compositing / Vulkan workloads have what they need.
  • Adds the standard /usr/local/cuda-12.2/bin PATH and /usr/local/cuda-12.2/lib64 LD_LIBRARY_PATH hints (in the alias block, if you've run inject-alias).

After running

You almost always need to reboot for the new kernel module to load:

sudo reboot
nvidia-smi   # should report driver 535 + CUDA 12.2

Caveats

  • Ubuntu only.
  • Targets CUDA 12.2 specifically — if you need a different version, copy and adapt the script (or open a PR for a parametrized version).
  • Will conflict with a pre-installed driver from ubuntu-drivers autoinstall; remove the old nvidia-driver-* first if you hit a dependency error.

Source

scripts/cu122.sh.