In conda the latest version of conda is:
cudnn 7.3.1 cuda10.0_0 anaconda
But i need 7.4.2 for tensorflow-gpu.1.13 How install cuDNN==7.4.2 in conda?
There is a workaround for this problem. install conda-toolkit using conda enviroment and download the latest matching CuDNN version from Nvidia CuDNN page for installed cuda-toolkit. Use tar and unzip the packages and copy the CuDNN files to your anaconda environment.
Upgrading cuDNN. Navigate to the directory containing cuDNN and delete the old cuDNN bin , lib , and header files. Remove the path to the directory containing cuDNN from the $(PATH) environment variable. Reinstall a newer cuDNN version by following the steps in Installing on Windows.
STEP 2) Download and setup CUDNN. Go to https://developer.nvidia.com/cudnn to download the latest version of CUDNN for the latest CUDA toolkit version OR go to https://developer.nvidia.com/rdp/cudnn-archive to download a previous version of CUDNN that is compatible with your CUDA toolkit.
You need to uninstall cudnn: conda uninstall cudnn.
Uninstall any tensorflow dependencies: "conda uninstall tensorflow"
Install tensorflow using pip: "pip install tensorflow"
Install CuDNN and Cuda ToolKit following the instructions in here: https://www.tensorflow.org/install/gpu#linux_setup
Use PyCharm or Spyder to run Scripts using tensorflow
You can install with conda-forge
conda install -c conda-forge cudnn
https://anaconda.org/conda-forge/cudnn
It is more up to date than anaconda channel - for example as of today, latest version of cudnn on anaconda is still 7.6.5, but on conda-forge v8.2.0.53. Same applies to cudatoolkit package.
The best use is to install both cuda-toolkit and CuDNN using conda environment for the best compatibility. But in some cases people might need the latest version. Moreover sometimes cuda packages are updated in different schedules such as the time being this answer is provided, conda provides cudatoolkit-11.0 but cant provide CuDNN-8.0 at the same time. which happened in my case. There is a workaround for this problem.
install conda-toolkit using conda enviroment and download the latest matching CuDNN version from Nvidia CuDNN page for installed cuda-toolkit. Use tar and unzip the packages and copy the CuDNN files to your anaconda environment.
sudo cp cuda/include/cudnn*.h /anaconda3/envs/<your environment here>/include
sudo cp cuda/lib64/libcudnn* /anaconda3/envs/<your environment here>/lib
sudo chmod a+r /usr/local/cuda/include/cudnn*.h /anaconda3/envs/<your environment here>/lib/libcudnn*
In the given snipped "cuda" path represent the unzipped CuDNN folder. This workaround is tested with tensorflow-2.4 & cudatoolkit-11.0 & CuDNN 8.0.4
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With