sudo apt update
sudo apt upgrade
sudo apt install ubuntu-drivers-common
sudo apt install nvidia-driver-535
sudo reboot now
nvidia-smi
sudo apt install gcc
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb
sudo dpkg -i cuda-keyring_1.1-1_all.deb
sudo apt-get update
sudo apt-get -y install cuda
sudo reboot now
nano ~/.bashrc (ctrl +x then y)
export PATH=/usr/local/cuda/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-12.2/lib64\
${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
source . ~/.bashrc
nvcc -V
ubuntu20.04极简安装cuda和nvdia驱动
最新推荐文章于 2024-08-22 14:22:37 发布
本文介绍了在Ubuntu系统中通过命令行安装NVIDIA驱动(如nvidia-driver-535)和CUDA工具包,以及配置环境变量的过程,包括添加cuda-keyring和修改.bashrc文件。
摘要由CSDN通过智能技术生成