Jetson SDK Manager
Jetson SDK Manager 0.9.14 기준으로 JetPack4.2.2가 설치 되고 Hardware Configuration에서 Host Machine을 선택하면 Host machine에 CUDA가 설치 되었음을 알 수 있다.

위 그림 기준으로 CUDA10.0이 설치되어 있음. ubuntu18.04 기준으로 Software & Updates 창의 Additional Drivers 탭에서 최신 nividia driver를 잡아 줄 수 있다. 선택 후 리부팅 필요

리부팅 후 "nvidia-smi” 명령으로 확인 해 보면

위 그림 처럼 driver version과 CUDA버전을 확인 할 수 있는데 이 경우 nvcc -V 명령이 안먹는 경우가 있다. 이 경우는 PATH가 빠진 것으로 /usr/local/폴더에 cuda가 있는지 확인 해 보자. 나의 경우는 SDK Manager를 통해 CUDA 10.0을 설치 했으므로 /usr/local/cuda-10.0 폴더가 존재 한다. /usr/local/cuda-10.0/bin 폴더에 nvcc명령도 있는 것을 확인 할 수 있다. 즉 .bashrc에 PATH환경 설정을 해주면 된다.
export PATH=/usr/local/cuda-10.0/bin:/usr/local/cuda-10.0/NsightCompute-2019.1${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-10.0/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
여기서 또 한가지 이상한 점은 nvidia-smi CUDA version은 10.1인데 nvcc -V로 확인하면 10.0이다. (당연히 SDKManager로 10.0이 설치 되었으므로) 근데 왜 nvidia-smi는 10.1로 표시하는 것인가? 관련해서 구글링 해 본 결과 아래의 내용이 참고 할 만 하다.
CUDA has two main APIs: runtime API and driver API. There are versions for both (eg 8.0, 9.0, etc.).The necessary support for the driver API (such as libcuda.so on linux) is installed by the GPU driver installer.The support required for the runtime API (linux libcudart.so, nvcc, etc.) is installed by the CUDA toolkit installer (GPU driver installer may also be bundled).In any case, especially when installing GPU drivers separately from CUDA installation (ie CUDA toolkit), the driver API version (installed) may not always match the version of the runtime API (installed) not.The nvidia-smi tool is installed by the GPU driver installer. Normally, it is not installed by the CUDA toolkit installer, but the GPU driver is displayed.Recently (on Linux, driver versions between 410.48 and 410.73), NVIDIA forces decided to add a report of the CUDA driver API version installed by the driver to the nvidia-smi output.This has nothing to do with the installed CUDA runtime version.Nvcc, the CUDA compiler driver tool installed with the CUDA toolkit, always reports the CUDA runtime version built to recognize it. It doesn't know what driver version is installed or even if a GPU driver is installed.Therefore, by design, these two numbers do not necessarily match. Because it reflects two different things.
요약 하자면 GPU driver와 CUDA를 따로 설치 하는 경우 서로 reporting하는 버전이 다를 수 있다는 것이고, 실제로 설치된 CUDA버전은 nvcc -V로 확인 한게 맞다는 것이다. 그리고 꼭 같을 필요도 없다고 하니 넘어 가도 될 듯.
잘 설치 되었는지 확인해 보기 위해서 예제를 돌려 보는 것이 좋은데, /usr/local/cuda/samples에 샘플 파일 들은 read only형태로 설치 되므로 혹시 수정 해 보거나 할 거면 자신의 홈 디렉토리로 copy하는 것이 좋다. 이 경우
~$ cuda-install-samples-10.1.sh ./ 로 copy해서 make 명령으로 컴파일 해보자.
컴파일 후 NVIDIA_CUDA-10.0_Samples/bin/x86_64/linux/release$ 디렉토리의 “deviceQuery”명령을 실행 시켜 보면 detected device정보 및 cuda driver version/runtime version을 확인 할 수 있다.
deviceQuery 나 bandwidthTest를 실행 시켜서 Result=PASS로 나오는 것이 중요.