
Should return a message saying it successfully opened libcudart > tf.config.list_physical_devices('GPU') I use the following statements for my check. Make sure you have the new environment activated and start a python session in the terminal. Step 3: Check that Tensorflow is working and using GPU. conda activate tf_gpu_envĪs of this writing, this installs Tensorflow-gpu 2.5.0 Installing from conda will either take a very long time as conda tries to resolve conflicts before it errors out, or will forcefully downgrade cudatoolkit and cudnn to older versions. Step 2: Activate the environment and install tensorflow-gpu using pip not conda. I used the conda-forge channel but imagine the anaconda and nvidia channels would work too. conda create -n tf_gpu_env -c conda-forge cudatoolkit cudnn python=3.8Īs of this writing, this will install cudatoolkit 11.2, cudnn 8.2 and python 3.8.10 into this new environment. Step 1: Create a conda environment and install cudatoolkit and cudnn into it. There are probably a number of different ways to do it but here is what worked for me after a lot of trial and error: If you try to force a newer version using tensorflow-gpu=2.4 it will either just install the older incompatible cudatoolkit 10.x/cudnn 7.x libraries or not install them at all. If you use conda install -c anaconda tensorflow-gpu, it will install TF v2.2, cudatoolkit 10.x, and cudnn 7.x by default. It seems the problem is currently there is no conda environment that is correctly packaged with Tensorflow 2.4+, CUDA 11+ and CuDNN 8+, which are required to run on this newer GPU architecture (more info here). I have a Linux Mint 20.1 system (based on Ubuntu 20.04 LTS) with a GeForce RTX 3080 (driver version 460.80) and had a lot of issues trying to run Tensorflow in a conda environment. If that doesn't work, see if what follows will help. It can be installed using: conda install -c esri tensorflow-gpu UPDATE (08/30/21): The Esri conda channel has a tensorflow-gpu package that seems to work correctly out of the box.
