-
-
Save stephenlauck/92e29628edeebf4ff3332a86b31802c2 to your computer and use it in GitHub Desktop.
https://github.com/oddmario/NVIDIA-Ubuntu-Driver-Guide?tab=readme-ov-file | |
# Ubuntu 22.04.5 | |
Linux spellcaster-Oryx-Pro 6.8.0-60-generic #63~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue Apr 22 19:00:15 UTC 2 x86_64 x86_64 x86_64 GNU/Linux | |
https://documentation.ubuntu.com/server/how-to/graphics/install-nvidia-drivers/index.html | |
https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&Distribution=Ubuntu&target_version=22.04&target_type=deb_local | |
# validation | |
sudo journalctl -fu ollama | |
nvidia-smi -q -d utilization -l |
deps:
gh code jq
get recommended driver
ubuntu-drivers list --gpgpu --recommended
check installed driver
cat /proc/driver/nvidia/version
install recommended driver
sudo apt install -y $(ubuntu-drivers list --gpgpu --recommended)
install recommended driver
sudo apt install -y $(ubuntu-drivers list --gpgpu --recommended)
see installed version is matching recommened
test "$(nvidia-smi --query-gpu=driver_version --format=csv,noheader)" = "$(apt-cache policy $(ubuntu-drivers list --gpgpu --recommended | awk '{print $1}') | grep 'Installed:' | awk '{print $2}' | cut -d '-' -f1)"; echo $?
clear all installed nvidia drivers
sudo apt remove -y --purge nvidia* && sudo apt autoremove -y
check for cuda using torch
python -c "import torch; print(torch.cuda.is_available())"
check for cuda
/usr/local/cuda/bin/nvcc --version
install nvidia drivers
install cuda
https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&Distribution=Ubuntu&target_version=22.04&target_type=deb_local
Linux Oryx-Pro 6.8.0-60-generic #63~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue Apr 22 19:00:15 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
01:00.0 VGA compatible controller: NVIDIA Corporation GA103M [GeForce RTX 3080 Ti Mobile] (rev a1)
NVIDIA-SMI 570.133.07 Driver Version: 570.133.07 CUDA Version: 12.8
show driver version
nvidia-smi --query-gpu=driver_version --format=csv,noheader