英伟达历史版本驱动下载链接:
官方高级驱动搜索 | NVIDIA适用于 GeForce、TITAN、NVIDIA RTX、数据中心、GRID 等 NVIDIA 产品的高级驱动搜索。https://www.nvidia.cn/Download/Find.aspx?lang=cn
更全面的历史驱动如下:
Index of /XFree86/Linux-x86_64https://download.nvidia.com/XFree86/Linux-x86_64/安装驱动:
注意:
如果是手动安装.run驱动,需要将之前的nvidia驱动卸载干净且禁用Nouvereau,否则易出现循环登录问题
【ubuntu系统禁用自带Nouveau驱动】CSDN编程社区
快捷建ctrl+alt+F1进入命令行模式
sudo service lightdm stop
sudo sh NVIDIA-Linux-x86_64-470.63.01.run
sudo service lightdm start
CUDA
cuda与驱动版本对照
Release Notes :: CUDA Toolkit documentationThe Release Notes for the CUDA Toolkit.https://docs.nvidia.com/cuda/cuda-toolkit-release-notes/index.html
安装方法:下载.run文件离线安装
快捷建ctrl+alt+F1进入命令行模式
sudo service lightdm stop
sudo sh cuda_8.0.61_375.26_linux.run
sudo service lightdm start
由于驱动已经安卓过了,这里跳过驱动安装,如下
查看cuda版本:可以直接去/usr/local下看到CUDA的安装位置
或
cat /usr/local/cuda/version.txt
如果想用nvcc -V
需添加环境变量,打开~/.bashrc ,添加环境变量export PATH=$PATH:/usr/local/cuda/bin
验证cuda是否安装成功:
实例编译
$ cd ~/NVIDIA_CUDA-10.1_Samples
进入后
$ make
如果报错,查看报错内容,根据提示解决即可。如果没有错误,会一直编译,十几分钟编译完成。
参考如下路径,运行二进制文件。如图所示说明cuda安装成功。
cudnn
官方安装cudnn说明:
Installation Guide :: NVIDIA Deep Learning cuDNN documentation
cudnn与cuda版本对应关系如下:
cuDNN Archive | NVIDIA Developer
【推荐】或这直接从下面的网址获得相应版本的cudnn
Index of /compute/redist/cudnnhttps://developer.download.nvidia.cn/compute/redist/cudnn/
cudnn 安装方法,来自官网
2.3. Installing cuDNN on Linux
The following steps describe how to build a cuDNN dependent program. Choose the installation method that meets your environment needs. For example, the tar file installation applies to all Linux platforms. The debian installation package applies to Ubuntu 14.04 and 16.04.
In the following sections:
your CUDA directory path is referred to as /usr/local/cuda/your cuDNN download path is referred to as
2.3.1. Installing from a Tar File
Navigate to your directory containing the cuDNN Tar file.Unzip the cuDNN package.
$ tar -xzvf cudnn-9.0-linux-x64-v7.tgz
Copy the following files into the CUDA Toolkit directory, and change the file permissions.
$ sudo cp cuda/include/cudnn* /usr/local/cuda/include
$ sudo cp cuda/lib64/libcudnn* /usr/local/cuda/lib64
$ sudo chmod a+r /usr/local/cuda/include/cudnn.h /usr/local/cuda/lib64/libcudnn*
查看cudnn 版本
(base) gujun@gujun-All-Series:~/Downloads$ cat /usr/local/cuda/include/cudnn_version.h | grep CUDNN_MAJOR -A 2
#define CUDNN_MAJOR 8
#define CUDNN_MINOR 0
#define CUDNN_PATCHLEVEL 5
--
#define CUDNN_VERSION (CUDNN_MAJOR * 1000 + CUDNN_MINOR * 100 + CUDNN_PATCHLEVEL)#endif
其他查询命令
nvidia-smi
watch -n 1 nvidia-smi



