我的环境如下:
- nvidia-smi 显示 cuda 版本是 11.7
- 目前最新vllm 要求的 torch 版本是 2.1.2,该版本要求的 cuda 版本是 11.8,所以不匹配。执行安装会遇到如下错误
RuntimeError: The NVIDIA driver on your system is too old (found version 11070). Please update your GPU driver by downloading and installing a new version from the URL: http://www.nvidia.com/Download/index.a
spx Alternatively, go to: https://pytorch.org to install a PyTorch version that has been compiled with your version of the CUDA driver.
我尝试安装支持 cuda 11.7 的最新版本 torch==2.0.1,运行pip install -e .
安装仍然会遇到上述问题。解决办法是修改 vllm 的安装配置文件:
-
requirements.txt
torch==2.1.2 改成 torch>=2.0.1
xformers == 0.0.23.post1 改成 xformers >= 0.0.022
因此你需要确保 xformers 版本是 0.0.022
-
requirements-build.txt
torch==2.1.2 改成 torch>=2.0.1
-
pyproject.toml
requires = [
"ninja",
"packaging",
"setuptools >= 49.4.0",
"torch == 2.1.2", 改成 "torch>=2.0.1"
"wheel",
]
标签:old,torch,driver,system,version,2.1,2.0,your
From: https://www.cnblogs.com/marsggbo/p/17966269