NVCC not found, however nvdia-smi shows CUDA

I’ve tried to set the PATH variable to include /usr/local/cuda-12.0/bin${PATH:+:${PATH}} as instructed Post-installation Actions. However, there is any cuda directory in /usr/local/

$ nvidia-smi
Fri Mar 10 15:26:16 2023       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 525.85.12    Driver Version: 525.85.12    CUDA Version: 12.0     |
|-------------------------------+----------------------+----------------------+
| 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 ...  Off  | 00000000:08:00.0 Off |                  Off |
|  0%   37C    P8    22W / 450W |      1MiB / 24564MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+

Any directions?

nvidia-smi is installed as part of the driver installation. The “CUDA Version: 12.0” shown indicates the version of Cuda used to compile nvidia-smi and the driver.

Are you sure the Cuda Toolkit installation completed successfully?

I’ve installed cuda and Nvidia driver from runfile.

The results of the installation are in /var/log/cuda-installer.log. Were there any problems?

There was no problem in /var/log/cuda-installer.log and I am not sure why cuda was not correctly installed on /usr/local/. However, I was able to install cuda using Package Manager Installation approach after removing all nvidia and cuda related installations:

apt-get purge nvidia*
apt-get autoremove
apt-get autoclean
rm -rf /usr/local/cuda*