add download script

This commit is contained in:
ricwo 2022-11-09 10:11:10 +01:00
parent cc1099b46c
commit 7f77589138
2 changed files with 10 additions and 2 deletions

View file

@ -18,8 +18,8 @@ WORKDIR /app
RUN pip install .
# install whisper models
RUN python3 -c 'import whisper\nfrom pathlib import Path\n\n[\n whisper._download(\n whisper._MODELS[m], str(Path("~/.cache/whisper").expanduser()), False\n )\n for m in ["tiny", "base", "small", "medium", "large"]\n]'
COPY download_whisper_models.py .
RUN python3 download_whisper_models.py
# open bash
CMD ["/bin/bash"]

View file

@ -0,0 +1,8 @@
from pathlib import Path
import whisper
download_path = str(Path("~/.cache/whisper").expanduser())
for m in ["tiny", "base", "small", "medium", "large"]:
whisper._download(whisper._MODELS[m], download_path, False)