简介
先安装好Nvdia 驱动
在安装cuda
安装方式
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-ubuntu1804.pin
sudo mv cuda-ubuntu1804.pin /etc/apt/preferences.d/cuda-repository-pin-600
wget http://developer.download.nvidia.com/compute/cuda/11.0.1/local_installers/cuda-repo-ubuntu1804-11-0-local_11.0.1-450.36.06-1_amd64.deb
sudo dpkg -i cuda-repo-ubuntu1804-11-0-local_11.0.1-450.36.06-1_amd64.deb
sudo apt-key add /var/cuda-repo-ubuntu1804-11-0-local/7fa2af80.pub
sudo apt-get update
sudo apt-get -y install cuda
校验是否成功安装
3.测试CUDA的Samples例子
cd /usr/local/cuda-[你自己安装的版本]/samples/1_Utilities/deviceQuery
sudo make
./deviceQuery
如果显示的是关于GPU的信息,则说明安装成功了。