如何在 Debian 10 上安装 NVIDIA CUDA (buster)
在本教程中,我们将在 Debian 10 (buster) Linux 上安装 NVIDIA CUDA。我们将从 CUDA 开发人员存储库执行直接网络安装。
在本教程中您将学习:
如何安装CUDA
如何确认CUDA安装
如何在 Debian 10 上安装 NVIDIA CUDA (buster)
Debian 10(buster)上的 NVIDIA CUDA 分步说明
安装 CUDA 开发者密钥:
# apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/debian10/x86_64/7fa2af80.pub
添加 CUDA Debian 10 存储库并启用
contrib
存储库:# add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/debian10/x86_64/ /" # add-apt-repository contrib # apt update
安装CUDA:
# apt-get install cuda
重新启动您的 Debian 10 系统:
# reboot
$ /usr/local/cuda-*/bin/nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2021 NVIDIA Corporation
Built on Wed_Jun__2_19:15:15_PDT_2021
Cuda compilation tools, release 11.4, V11.4.48
Build cuda_11.4.r11.4/compiler.30033411_0
或者执行以下 nvidia-smi
命令以获得更详细的输出:
$ nvidia-smi
Wed Jun 30 14:57:30 2021
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 470.42.01 Driver Version: 470.42.01 CUDA Version: 11.4 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 NVIDIA GeForce ... On | 00000000:01:00.0 Off | N/A |
| 0% 50C P8 31W / 370W | 293MiB / 10014MiB | 0% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| 0 N/A N/A 659 G /usr/lib/xorg/Xorg 129MiB |
| 0 N/A N/A 850 G /usr/bin/kwin_x11 35MiB |
| 0 N/A N/A 854 G /usr/bin/krunner 3MiB |
| 0 N/A N/A 856 G /usr/bin/plasmashell 48MiB |
| 0 N/A N/A 1015 G nvidia-settings 0MiB |
| 0 N/A N/A 1370 G ...bexec/kscreenlocker_greet 70MiB |
+-----------------------------------------------------------------------------+