清华镜像源安装cuda12.1
时间: 2023-10-19 12:09:27 浏览: 257
您可以按照以下步骤在清华镜像源上安装CUDA 12.1:
1. 添加清华镜像源到apt源列表中:
```
sudo echo "deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse" >> /etc/apt/sources.list
sudo echo "deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse" >> /etc/apt/sources.list
sudo echo "deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse" >> /etc/apt/sources.list
sudo echo "deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse" >> /etc/apt/sources.list
```
2. 添加清华镜像源的GPG key:
```
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3B4FE6ACC0B21F32
```
3. 更新apt源列表:
```
sudo apt-get update
```
4. 安装CUDA 12.1:
```
sudo apt-get install cuda-12-1
```
5. 验证CUDA是否安装成功:
```
nvcc -V
```
阅读全文