Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions scripts/transcribe_worklist.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,20 @@ def main() -> int:
wav_dir = args.work_dir / "wav"
wav_dir.mkdir(exist_ok=True)

# ctranslate2 dlopens cuDNN by soname; pip-installed nvidia wheels are not
# on the loader path, so preload them (RTLD_GLOBAL) or the whisper encoder
# aborts with "Unable to load libcudnn_cnn.so.9".
import ctypes
import site

for sp in site.getsitepackages():
for pattern in ("nvidia/cublas/lib/libcublas*.so*", "nvidia/cudnn/lib/libcudnn*.so.9"):
for lib in sorted(Path(sp).glob(pattern)):
try:
ctypes.CDLL(str(lib), mode=ctypes.RTLD_GLOBAL)
except OSError:
pass

# Heavy import deferred so dry runs work without GPU deps loaded.
from journal_utilities.transcribe.transcribe import TranscriptionService

Expand Down