Pointing to Cuda8 in presence of multiple Cuda installed

I have Cuda8, 9,10 in my AWS p2.xlarge gpu. it was pointed to cuda8.0 as shown in the nvcc – version and nvidia-smi.
yesterday i installed cuda11.0 and nvcc --version now showing 11 and nvidia-smi not showing anything. also i did not restarted my aws gpu.

Now i want to downgrade or point to cuda 8 again. what i have to do.

I don’t have experience with AWS environment. A minimum you probably have to adjust the CUDA_PATH and PATH environment variable to point to the correct locations.

thanks for the quick reply.

please confirm i need to following.

vi ~/.bashrc

export CUDA_HOME="/usr/local/cuda-8.0"
export LD_LIBRARY_PATH="/usr/local/cuda-8.0/lib64":$LD_LIBRARY_PATH
export PATH="/usr/local/cuda-8.0/bin:$PATH"

source ~/.bashrc

also how i can uninstall cuda11.

i did not find any uninstall script in /usr/local/cuda-11.0/bin
i am trying to do
sudo ./uninstall_cuda_11.0.pl

Those environment variables look reasonable. I shared all of the limited information I have.

thanks a lot. can i uninstall cuda11.

I have never uninstalled a CUDA version as I don’t have the need. My current system (Windows) has multiple CUDA versions installed, but I have switched between them only very rarely.

ok thanks a lot