最近在运行通义千问模型的的时候,报错,提示使用Ubuntu22.04默认的cuda11.5不支持,之前是使用apt安装的,版本比较老。
CUDA官网下载:https://developer.nvidia.com/downloads
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-ubuntu2204.pin
sudo mv cuda-ubuntu2204.pin /etc/apt/preferences.d/cuda-repository-pin-600
wget https://developer.download.nvidia.com/compute/cuda/12.3.0/local_installers/cuda-repo-ubuntu2204-12-3-local_12.3.0-545.23.06-1_amd64.deb
sudo dpkg -i cuda-repo-ubuntu2204-12-3-local_12.3.0-545.23.06-1_amd64.deb
#复制本地源
sudo cp /var/cuda-repo-ubuntu2204-12-3-local/cuda-*-keyring.gpg /usr/share/keyrings/
# 更新源
sudo apt-get update
sudo apt-get -y install cuda-toolkit-12-3