cudnn.h is a C header file. You should not need this with python.
I will see if Lambda stack can add it in the future.
Currently Lambda Stack builds and compiles pytorch and tensorflow with CUDA and cudnn runtime libraries.
If you use Anaconda/miniconda that does install it with Anaconda.
Otherwise to get the C header files for cudnn you would need to install the CUDNN package from NVIDIA
which does require registering at NVIDIA. (Yes a bit of a pain).
Get cuDNN: https://developer.nvidia.com/rdp/cudnn-archive
- Pick the version that you would like depending on what version you have installed
Local Installer for Ubuntu20.04 x86_64 (Deb)
or
Local Installer for Linux x86_64 (Tar)
- This one you can install anywhere
tar -xf cudnn-linux-x86_64-8.3.3.40_cuda11.5-archive.tar.xz
It will extract in a local directory with :
cudnn-linux-x86_64-8.3.3.40_cuda11.5-archive/
NVIDIA installs in a the package in /usr/includ and libs in /usr/lib/…
It looks like they changed the format from previously so I just ran through it again.
-
Download the file from the web.
-
Install this version:
$ sudo dpkg -i cudnn-local-repo-ubuntu2004-8.3.3.40_1.0-1_amd64.deb
[sudo] password for mark:
Selecting previously unselected package cudnn-local-repo-ubuntu2004-8.3.3.40.
(Reading database … 463170 files and directories currently installed.)
Preparing to unpack cudnn-local-repo-ubuntu2004-8.3.3.40_1.0-1_amd64.deb …
Unpacking cudnn-local-repo-ubuntu2004-8.3.3.40 (1.0-1) …
Setting up cudnn-local-repo-ubuntu2004-8.3.3.40 (1.0-1) …
The public CUDA GPG key does not appear to be installed.
To install the key, run this command:
sudo apt-key add /var/cudnn-local-repo-ubuntu2004-8.3.3.40/7fa2af80.pub
-
Follow the instruction and install this local repo for this cudnn:
$ sudo apt-key add /var/cudnn-local-repo-ubuntu2004-8.3.3.40/7fa2af80.pub
OK
$ sudo apt-get update
$ sudo apt install libcudnn8 libcudnn8-dev