Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not load library libcudnn_cnn_infer.so.8 #4

Open
rayryeng opened this issue Nov 28, 2024 · 0 comments
Open

Could not load library libcudnn_cnn_infer.so.8 #4

rayryeng opened this issue Nov 28, 2024 · 0 comments

Comments

@rayryeng
Copy link

rayryeng commented Nov 28, 2024

Right after the model checkpoint is loaded, the following error occurs:

Error: Could not load library libcudnn_cnn_infer.so.8

Resolution

This happens because cuDNN 8.0 does not exist after setting up the environment, most likely due to the older version of PyTorch being used (2.0.0) and it only supporting CUDA 11.8. To resolve this, you need to do the following. These instructions are for Ubuntu 22.04, both WSL2 and native.

  1. Download cuDNN from the NVIDIA archives: https://developer.nvidia.com/rdp/cudnn-archive. Choose version 8.9.7 for whatever OS you're using. For example, I am using WSL2 with Ubuntu 22.04, so I downloaded this file: cudnn-local-repo-ubuntu2204-8.9.7.29_1.0-1_amd64.deb
  2. Extract the package and install it: sudo dpkg -i cudnn-local-repo-ubuntu2204-8.9.7.29_1.0-1_amd64.deb
  3. You will need to install the GPG key after it's installed. It will tell you this after you install the package: sudo cp /var/cudnn-local-repo-ubuntu2204-8.9.7.29/cudnn-local-8AE81B24-keyring.gpg /usr/share/keyrings/
  4. Install cuDNN 8: sudo apt-get install --reinstall libcudnn8 libcudnn8-dev libcudnn8-samples
  5. Check that cuDNN 8 has been installed: ls /usr/lib/x86_64-linux-gnu/libcudnn* | grep libcudnn_cnn_infer.so.8
  6. Update your LD_LIBRARY_PATH so that it points to /usr/lib/x86_64-linux-gnu: export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/x86_64-linux-gnu/

Now if you run the script in /scripts/run.sh, it should work. If desired, I can also update the README to specify these instructions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant