Jetson Nano install issue with CUDA

I recently installed JetPack 4.6 on a NVIDIA Jetson Nano 2GB and have tried to use the MATLAB GPU coder to compile C and C++ code on the Jetson board. However, when connecting to the Jetson, MATLAB does not read a CUDA version at all.
After further investigation, in /usr/local/ there are folders for cuda, cuda-10 and cuda-10.2. However, when I use the command “nvcc --version” to check what version is installed it returns “bash: nvcc: command not found” as well the “nvidia-smi” command yields the same result.

When the command “cat /usr/local/cuda/version.txt” is entered, “CUDA Version 10.2.300” is returned.

I’m not sure what the discrepancy in these results is due to. Please let me know what you think.

Hi @jaredmz, I’m not familiar with MATLAB GPU Coder, so you may want to contact MATLAB support for assistance related to that product.

You may want to add these lines to your user’s ~/.bashrc file (and restart your terminal)

export PATH=/usr/local/cuda/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}

You should then be able to run nvcc --version from anywhere in the terminal.

nvidia-smi is not supported on Jetson, so you won’t be able to run it even after fixing the PATH as mentioned above.