Python-CUDA-cuDNN安装

难得放下 / 2023-08-28 / 原文

python安装
http://python.p2hp.com/downloads/windows/index.html

python3.10.6
https://www.python.org/ftp/python/3.10.6/python-3.10.6-amd64.exe


python, tensorflow-gpu, cuda, cudnn版本兼容关系
https://blog.csdn.net/pollotui/article/details/125064281

[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple/

[repository1]
name = qinghua
url = https://pypi.tuna.tsinghua.edu.cn/simple/
trusted-host = pypi.tuna.tsinghua.edu.cn

[repository2]
name = alibaba
url = https://mirrors.aliyun.com/pypi/simple
trusted-host = mirrors.aliyun.com

 

安装显卡驱动
https://www.nvidia.com/Download/index.aspx?lang=en-us
官方匹配到的驱动版本号:536.99-desktop-win10-win11-64bit-international-dch-whql
下载后安装

安装CUDA
在Nvida系统信息中查看驱动版本,在组件页签中查看CUDA兼容版本号 12.2.135
https://developer.nvidia.cn/cuda-toolkit-archive
CUDA12.2下载地址:https://developer.nvidia.cn/cuda-downloads
CUDA11.8下载地址:https://developer.nvidia.cn/cuda-11-8-0-download-archive

安装cudnn(SDK)
https://developer.nvidia.com/rdp/cudnn-archive
下载对应cuda版本12.x的cudnn版本包
将解压的bin, include, lib三个文件夹分别复制到cuda目录中

验证cudnn安装成功
CUDA\v12.2\extras\demo_suite\deviceQuery.exe
CUDA\v12.2\extras\demo_suite\bandwidthTest.exe