1.win10系统
1.1. CUDA和CuDNN
检查自己的显卡支持哪个版本的cuda:
控制面板—>搜索NVIDIA—(系统信息)图片1—>组件里找到支持的cuda版本(图片2)
图片1图片2
CUDA下载地址:https://developer.nvidia.com/cuda-toolkit-archive
找到对应的cudu版本下载如图3
图片3
CuDNN下载地址:https://developer.nvidia.com/rdp/cudnn-download
找到对应的CuDNN下载,并
2. ubuntu22.04系统
- 安装cuda
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-ubuntu2204.pin
sudo mv cuda-ubuntu2204.pin /etc/apt/preferences.d/cuda-repository-pin-600
wget https://developer.download.nvidia.com/compute/cuda/11.8.0/local_installers/cuda-repo-ubuntu2204-11-8-local_11.8.0-520.61.05-1_amd64.deb
sudo dpkg -i cuda-repo-ubuntu2204-11-8-local_11.8.0-520.61.05-1_amd64.deb
sudo cp /var/cuda-repo-ubuntu2204-11-8-local/cuda-*-keyring.gpg /usr/share/keyrings/
sudo apt-get update
sudo apt-get -y install cuda
- 安装cudnn
sudo cp include/cudnn.h /usr/local/cuda/include
sudo cp lib/libcudnn* /usr/local/cuda/lib64
sudo chmod a+r /usr/local/cuda/include/cudnn.h
sudo chmod a+r /usr/local/cuda/lib64/libcudnn*
参考:Windows 安装 CUDA/cuDNN
参考:ubuntu22.04版本安装CUDA及cuDNN
3.tensorrt
参考:[ubuntu]-ubuntu20.04简单两步安装cuda11.0 + tensorrt7.2.1,自动配置cudnn