1
0
md/install-nvidia-smi.md

58 lines
1.0 KiB
Markdown
Raw Normal View History

2025-10-13 17:22:20 +08:00
```shell
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64/cuda-ubuntu2404.pin
```
```shell
sudo mv cuda-ubuntu2404.pin /etc/apt/preferences.d/cuda-repository-pin-600
```
```shell
wget https://developer.download.nvidia.com/compute/cuda/12.5.1/local_installers/cuda-repo-ubuntu2404-12-5-local_12.5.1-555.42.06-1_amd64.deb
```
```shell
sudo dpkg -i cuda-repo-ubuntu2404-12-5-local_12.5.1-555.42.06-1_amd64.deb
```
```shell
sudo cp /var/cuda-repo-ubuntu2404-12-5-local/cuda-*-keyring.gpg /usr/share/keyrings/
```
```shell
sudo apt-get update
```
```shell
sudo apt-get -y install cuda-toolkit-12-5
```
重启
```shell
nano ~/.bashrc
```
```shell
# NVIDIA CUDA Toolkit Environment Variables
export PATH=/usr/local/cuda-12.5/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-12.5/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
```
```shell
source ~/.bashrc
```
```shell
nvidia-smi
```
```shell
nvcc -V
2025-10-13 17:39:28 +08:00
```
下载 gpt-oss-20b 模型
```shell
https://www.modelscope.cn/models/openai-mirror/gpt-oss-20b
```