the-crypt-keeper / tldw

Too Long, Didn't Watch: End-to-End Rolling Summarizer of Long Videos
229 stars 33 forks source link

Cuda 12 Feature Request - Could not load library libcudnn_ops_infer.so.8 #24

Closed sms-astanley closed 2 weeks ago

sms-astanley commented 3 months ago

There's an issue with faster-whisper. Posting here for visibility and to see if there might be a better workaround.

Could not load library libcudnn_ops_infer.so.8. Error: libcudnn_ops_infer.so.8: cannot open shared object file: No such file or directory

I was able to work around the issue by following:

https://github.com/SYSTRAN/faster-whisper/issues/516

rmusser01 commented 3 months ago

Thanks for sharing your solution. As an fyi, lines 128-130 in summarize.py call this out.

#   1. Something about cuda nn library missing, even though cuda is installed...
#       https://github.com/tensorflow/tensorflow/issues/54784 - Basically, installing zlib made it go away. idk.
#       Or https://github.com/SYSTRAN/faster-whisper/issues/85

From the thread, for ubuntu:

For me installing the cuDNN 8 libraries using sudo apt install libcudnn8 on Ubuntu 22.04 fixed the issue!

Alternatively include the in your PATH the path to torch:

export LD_LIBRARY_PATH=`python3 -c 'import os; import nvidia.cublas.lib; import nvidia.cudnn.lib; import torch; print(os.path.dirname(nvidia.cublas.lib.__file__) + ":" + os.path.dirname(nvidia.cudnn.lib.__file__) + ":" + os.path.dirname(torch.__file__) +"/lib")'`

For Windows: In order of attempts:

  1. https://github.com/SYSTRAN/faster-whisper/issues/85
  2. Install specific cuda version: pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu124 --force-reinstall --no-cache
  3. Download/copy the already installed DLLs: https://forums.developer.nvidia.com/t/could-not-load-library-cudnn-cnn-infer64-8-dll-error-code-193/218437/16 or https://github.com/Purfview/whisper-standalone-win/releases/tag/libs and drag/drop the DLLs to the tldw folder.
  4. Just install outside of a venv.