Ubuntu22.04 LTS+NVIDIA 4090+Cuda12.1+cudnn8.8.1

系统环境中:

  • 1.系统驱动安装的是:

NVIDIA-Linux-x86_64-530.30.02.run

  • 2.CUDA安装:cuda_12.1.0_530.30.02_linux.run(无需第1步,直接安装它就带配套驱动)
wget https://developer.download.nvidia.com/compute/cuda/12.1.0/local_installers/cuda_12.1.0_530.30.02_linux.run
sudo sh cuda_12.1.0_530.30.02_linux.run

  • 3.CUDNN安装:cudnn-linux-x86_64-8.8.1.3_cuda12-archive.tar.xz
sudo cp ./include/* /usr/local/cuda-12.1/include
sudo cp ./lib/libcudnn* /usr/local/cuda-12.1/lib64

sudo chmod a+r /usr/local/cuda-12.1/include/cudnn* 
sudo chmod a+r /usr/local/cuda-12.1/lib64/libcudnn*

Anaconda虚拟环境中

# 先创建虚拟环境
conda create --name Dogs python=3.9 
# 安装cudatoolkit-11.8.0+cudnn-8.9.2.26	
conda install -c main cudatoolkit=11.8 cudnn=8.9.2.26
# pytorch安装
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118

你可能感兴趣的:(python,开发语言,深度学习)