Skip to content

Commit

Permalink
workaround for cudnn ctranslate2 issue ftb
Browse files Browse the repository at this point in the history
  • Loading branch information
Jiltseb committed Nov 1, 2024
1 parent 206837a commit fefb34c
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion aana/deployments/whisper_deployment.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from collections.abc import AsyncGenerator
from collections.abc import AsyncGenerator # noqa: I001
from enum import Enum
from typing import Any, cast

Expand All @@ -20,6 +20,16 @@
from aana.deployments.base_deployment import BaseDeployment, exception_handler
from aana.exceptions.runtime import InferenceException

# Workaround for CUDNN issue with cTranslate2:
import os
import nvidia.cudnn.lib
from pathlib import Path

cudnn_path = str(Path(nvidia.cudnn.lib.__file__).parent)
os.environ["LD_LIBRARY_PATH"] = (
cudnn_path + "/:" + os.environ.get("LD_LIBRARY_PATH", "")
)


class WhisperComputeType(str, Enum):
"""The data type used by whisper models.
Expand Down

0 comments on commit fefb34c

Please sign in to comment.