Asking mainly for Ubuntu 16.04/18.04. What's the difference between installing CUDA and cuDNN together with tensorflow-gpu in conda (conda install tensorflow-gpu), and installing it all by hand and then using pip? Does it mean CUDA and cuDNN are only available in the environment where conda install tensorflow-gpu was invoked? Also, why do some people use the -c flag when installing it?


Apparently all Cuda and CuDnn libraries are included with packages from Anaconda Cloud according to this guy: https://www.pugetsystems.com/labs/hpc/How-To-Install-CUDA-10-together-with-9-2-on-Ubuntu-18-04-with-support-for-NVIDIA-20XX-Turing-GPUs-1236/

You do NOT need to install CUDA 10 if; You are a developer working with CUDA 9.x or earlier in your code base and there are no compelling new features that you want to risk breaking your application to try. See the release notes. You are working with Python machine learning frameworks AND using Anaconda Python. Most of the frameworks have up-to-date builds available from Anaconda Cloud that include the needed CUDA libraries i.e. you don't have to install anything outside of the package you want. You are using GPU accelerated software packages that only depend on CUDA run-time support from the display driver. That includes most "ready to use" or commercial software. You don't know what CUDA is. In that case then, well, thanks for reading my post. I hope you enjoy it and learn something from it.

Check out this advice: https://towardsdatascience.com/tensorflow-gpu-installation-made-easy-use-conda-instead-of-pip-52e5249374bc

He says just create a conda env like conda create --name tf_gpu tensorflow-gpu where tf_gpu is the env name and tensorflow-gpu is to include cuda and cudnn in that env. Breaking it down into separate commands, it looks like:

conda create --name tf_gpu
activate tf_gpu
conda install tensorflow-gpu

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.