Installing multiple CUDA Libraries in the same machine

Nvidia CUDA (Source)

Note: Below I will be showing how to configure CUDA 10.0 and CUDA 9.0 in Ubuntu 18.04 but the mentioned method should work for any CUDA version and it should also work for more than 2 CUDA libraries

Note: You can install libraries in any order

$ cd /usr/local
$ sudo rm cuda
# If switching to CUDA 10.0
$ sudo ln -s cuda-10.0 cuda
# If switching to CUDA 9.0
$ sudo ln -s cuda-9.0 cuda
$ source ~/.bashrc
$ nvcc --version

--

--

Machine Learning Engineer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store