RuntimeError: The NVIDIA driver on your system is too old (found version 11020).

RuntimeError: The NVIDIA driver on your system is too old (found version 11020).  Please update your GPU driver by downloading and installing a new version from the URL: http://www.nvidia.com/Download/index.aspx Alternatively, go to: https://pytorch.org to install a PyTorch version that has been compiled with your version of the CUDA driver.

我在跑大模型的时候,爆了这个错误,说明CUDA与Torch版本不匹配。

那这里有两种方法:

1、更新驱动(步骤比较复杂,简答介绍一下,我用的是第二个方法)

Official Drivers | NVIDIA

在这个网站上查一下自己最新驱动并更新

RuntimeError: The NVIDIA driver on your system is too old (found version 11020)._第1张图片

RuntimeError: The NVIDIA driver on your system is too old (found version 11020)._第2张图片

用wget命令安装新的驱动即可

2、安装合适版本的pytorch(就是降低pytorch的版本,向下兼容)

nvidia-smi

先查看cuda版本

RuntimeError: The NVIDIA driver on your system is too old (found version 11020)._第3张图片

这里显示11.2,在这个网站Previous PyTorch Versions | PyTorch找到合适并下载,没有11.2就选择11.1,因为可以向下兼容。

pip install torch==1.10.1+cu111 torchvision==0.11.2+cu111 torchaudio==0.10.1 -f https://download.pytorch.org/whl/cu111/torch_stable.html

由于我的服务器一直不能用官网的命令下载,切换下载源也不可以,所以我在下面这个网站手动下载

download.pytorch.org/whl/cu111/torch_stable.html

并按照图片文件的顺序安装!!!

pip install XXXX.whl

即可!

你可能感兴趣的:(2024科研,linux)