title: Best solution to have multiple CUDA/cuDNN versions installed on Ubuntu
body: <p>I am using Conda on Ubuntu 16.04. My objective is to associate each Conda environment to a specific version of CUDA / cuDNN. I had a look around and I found this interesting <a href="https://blog.kovalevskyi.com/multiple-version-of-cuda-libraries-on-the-same-machine-b9502d50ae77" rel="nofollow noreferrer">article</a>, which basically suggests to put different CUDA versions into different folders and then use an environment-specific bash script (run when the environment is activated) to properly set the PATH/LD_LIBRARY_PATH variables (which creates the association with the CUDA version).
  This is fine, but when I try to install frameworks such as pytorch using Conda, it forces me to install also the "cudatoolkit" package.
  So, a couple of questions:</p>
  
  <p>1) does downloading cudatoolkit mess up my previous CUDA configurations? which version will be used?</p>
  
  <p>2) if using Conda is possible to install "cudatoolkit" and also "cudnn", why not just using conda for everything? Why even needing to apply the instructions of the above mentioned article?</p>
  
  <p>Thank you.</p>