1、下载cuda,https://developer.nvidia.com/cuda-90-download-archive?target_os=Linux&target_arch=x86_64&target_distro=Ubuntu&target_version=1604&target_type=runfilelocal。下载.run文件
2、下载cudnn,https://developer.nvidia.com/rdp/cudnn-archive。
参看:https://blog.csdn.net/qq_33200967/article/details/80689543
查看版本
cuda:cat /usr/local/cuda/version.txt
cudnn:cat /usr/local/cuda/include/cudnn.h | grep CUDNN_MAJOR -A 2