Skip to content

Download and caching faster whisper model only at runtime #7

@larsblumberg

Description

@larsblumberg

Hi Miguel and Jesus,

great lectures and repo!!!

I looked at this:

# Pre-download the Faster Whisper model during build
# This uses huggingface-cli which is included in the base image
RUN echo "Downloading model: ${FASTER_WHISPER_MODEL}" && \
    huggingface-cli download ${FASTER_WHISPER_MODEL} --local-dir-use-symlinks False && \
    echo "✓ Model downloaded successfully!"

in

huggingface-cli download ${FASTER_WHISPER_MODEL} --local-dir-use-symlinks False && \

and thought that this downloaded model would get lost if the container is rebuilt.

Should we add a build-time caching instruction here (via RUN ----mount=type=cache,target=....) or alternatively download the model when the container first starts via an ENTRYPOINT ["entrypoint.sh"] script in the container, mapping the download directory to a local volume via docker-compose.yaml at run-time?

I'm happy to provide a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions