Following instructions here
curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \
&& curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list | \
sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \
sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list
sudo apt-get update && sudo apt-get install -y nvidia-container-toolkit
sudo nvidia-ctk runtime configure --runtime=docker
sudo systemctl restart docker
- First download the tar file of cuDNN from the Nvidia website here or the archive here
- Copy the .tar file to the scratchpad directory in the host machine
- Run install cudnn library script present in the scratchpad inside the docker container's terminal
- The script basically moves the tar file to /usr/local and unzips it like so
sudo mv cudnn* /usr/local cd /usr/local tar -xzvf cudnn* sudo ldconfig