0

I need to train a model in TensorFlow-gpu==2.3.0 which needs the CUDA version to be 10.1. But when I type 'nvidia-smi' it shows CUDA version to be 10.0.

I created a conda environment using, "conda create -n tf2-gpu tensorflow-gpu cudatoolkit=10.1" after initiating training, it throws an error as tensorflow.python.framework.errors_impl.InternalError: cudaGetDevice() failed. Status: CUDA driver version is insufficient for CUDA runtime version

How can I train using tensorflow-gpu in conda environment with another version of CUDA? And, I still need CUDA 10.0 to be there, as it helps my other training setup.

talonmies
  • 70,661
  • 34
  • 192
  • 269
explr_1298
  • 43
  • 10
  • If you are on Windows, see [this post](https://stackoverflow.com/a/65709577/10157759). CUDA should be installed automatically during the installation of `tensorflow-gpu` without explicit specification. Meanwhile, I don't think you can keep both CUDA 10.0 and CUDA 10.1 in the same environment. You may need to install CUDA 10.0 related packages in a separate environment. – GZ0 Jan 29 '21 at 02:59
  • Thank you @GZ0. I'm using ubuntu 18.04. And I want to use different CUDA in different environments. I just wanted to know if I can use CUDA 10 in one Anaconda env and CUDA 10.1 in another anaconda env. When I Install tensorflow-gpu using conda, It installs supporting cudatoolkit. But, it happens to not use it while training. – explr_1298 Jan 29 '21 at 06:10

1 Answers1

0

Yes, you can create two virtual environments in Anaconda with different tensorflow version. But CUDA and CuDNN will be installing compatible to that specified tensorflow-gpu.

You can find tensorflow-gpu build configuration details here to check supporting CUDA and cuDNN version.

Please check this similar issue link to create virtual environment in anaconda and to install specific tensorflow-gpu.