ubuntu has cuda pre installed but nvcc --version doesn't work code example
Example: nvcc not working after installing cuda
export PATH=/usr/local/cuda-10.2/bin${PATH:+:${PATH}}$
export LD_LIBRARY_PATH=/usr/local/cuda-10.2/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}