nvcc –version ===> 10.1
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Sun_Jul_28_19:07:16_PDT_2019
Cuda compilation tools, release 10.1, V10.1.243
nvidia-smi ===> 12.2
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 535.183.01 Driver Version: 535.183.01 CUDA Version: 12.2 |
|-----------------------------------------+----------------------+----------------------+
而项目依赖为
torch==1.10.2+cu111
这个时候,需要怎么装呢
参考:https://blog.csdn.net/qq_49183286/article/details/136921594
ls -l /usr/local
找到合适版本的cuda,然后 加入到环境变量,【cuda不是用来安装的,而是用来指向的】
vim ~/.bashrc
export PATH=/usr/local/cuda-11.1/bin:$PATH
然后安装pytorch对应版本的运行时即可。
打赏作者