记一次vllm在5090上的安装

前言

直接最新的cuda 12.8 + vllm 0.12.0 + pytorch 2.9.0 跑不起来, 报错torch.AcceleratorError: CUDA error: the provided PTX was compiled with an unsupported toolchain.

降级vllm似乎无效, 寻求网上解决办法

阅读更多

Linux编译安装python312

跟着走就完了,简单的

不过网络问题没办法咯

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#安装编译依赖
sudo yum update
yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gcc make

#安装ssl
mkdir ~/tmp && cd ~/tmp
wget https://www.openssl.org/source/openssl-1.1.1w.tar.gz
tar -zxvf openssl-1.1.1w.tar.gz
cd openssl-1.1.1w/
/config --prefix=/usr/local/openssl --openssldir=/usr/local/openssl
make && make install

#安装python
cd ~/tmp
wget https://www.python.org/ftp/python/3.12.10/Python-3.12.10.tar.xz
tar -xf Python-3.12.1.tar.xz
cd Python-3.12.1
./configure --with-openssl=/usr/local/openssl --prefix=/root/project/lee/Python-3.12.10
make
make install

#创建软链接
rm -rf /usr/bin/python3
rm -rf /usr/bin/pip3
sudo ln -s /root/project/lee/Python-3.12.10/bin/python3 /usr/bin/python3
sudo ln -s /root/project/lee/Python-3.12.10/bin/pip3 /usr/bin/pip3

#添加环境变量
echo "export PATH=/usr/bin/python3:/usr/bin/pip3:$PATH" >> ~/.bash_profile
source ~/.bash_profile

#测试
python3 --version