Solution: Permanently change PATH & LD_LIBRARY_PATH by editing the .bashrc file
Consertar:
- Crie o arquivo .bashrc no diretório ~ / home
$ cd ~/
$ sudo touch .bashrc
- Insira o arquivo:
$ sudo gedit .bashrc
3. Role até o botton e adicione PATHs ao arquivo .bashrc:
#CUDA Environment Setup
export PATH=/usr/local/cuda-10.0/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-10.0/lib64\${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Salvar arquivo.
Reinicie.
Abrir novo terminal:
$ nvcc -V
Resultado:
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2018 NVIDIA Corporation
Built on Sat_Aug_25_21:08:01_CDT_2018
Cuda compilation tools, release 10.0, V10.0.130