我正在运行 docker 镜像nvidia/cuda:11.2.2-base-ubuntu20.04
。当我运行命令时nvidia-smi
,它显示 CUDA 已安装,如下所示:
Fri Apr 30 11:00:48 2021
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 450.36.06 Driver Version: 450.36.06 CUDA Version: 11.2 |
|-------------------------------+----------------------+----------------------+
| 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 Quadro P5000 On | 00000000:00:05.0 Off | Off |
| 26% 38C P8 6W / 180W | 1MiB / 16278MiB | 0% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| No running processes found |
+-----------------------------------------------------------------------------+
但是,命令nvcc -V
或nvcc --version
显示command not found
。此外,如果我尝试cuda-toolkit
通过安装apt-get install cuda-toolkit
,它最终会安装CUDA 10.0
,这会触发版本不匹配。因此,我想知道如何找到 nvcc 或安装正确的 CUDA(我猜是CUDA 11
)