Skip to content
This repository has been archived by the owner on Feb 15, 2025. It is now read-only.

Commit

Permalink
fix(whisper): Including missing cuda dependencies required for GPU ru…
Browse files Browse the repository at this point in the history
…ntimes

* Adds preprocessor_config.json to the copy step of the ctranslate2 conversion so that v3 whisper models have their feature dimensions read in properly. Without this there is a runtime error that occurs.
weight of size [1280, 128, 3], expected input[1, 80, 3000] to have 128 channels, but got 80 channels instead
* Adds openai-whisper as a dependency to fix a runtime error when running the backend via GPU
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
  • Loading branch information
CollectiveUnicorn authored Jul 31, 2024
1 parent 5320890 commit 2aba4af
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/whisper/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ RUN python -m pip wheel "packages/whisper[dev]" -w packages/whisper/build --find
# download and covnert OpenAI's whisper base
ARG MODEL_NAME=openai/whisper-base
RUN pip install ctranslate2 transformers[torch] --no-index --find-links=packages/whisper/build/
RUN ct2-transformers-converter --model ${MODEL_NAME} --output_dir .model --copy_files tokenizer.json --quantization float32
RUN ct2-transformers-converter --model ${MODEL_NAME} --output_dir .model --copy_files tokenizer.json special_tokens_map.json preprocessor_config.json normalizer.json tokenizer_config.json vocab.json --quantization float32
RUN pip uninstall -y ctranslate2 transformers[torch]

RUN pip install packages/whisper/build/lfai_whisper*.whl --no-index --find-links=packages/whisper/build/
Expand Down
1 change: 1 addition & 0 deletions packages/whisper/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ version = "0.9.2"
dependencies = [
"faster-whisper == 1.0.3",
"leapfrogai-sdk",
"openai-whisper == 20231117",
]
requires-python = "~=3.11"
readme = "README.md"
Expand Down

0 comments on commit 2aba4af

Please sign in to comment.