make the model be pre-loaded into the image

This commit is contained in:
Tomasz Frątczak 2024-02-14 22:33:37 +01:00
parent 6eb24e74eb
commit 96e0615267
2 changed files with 6 additions and 1 deletions

View File

@ -5,6 +5,8 @@ COPY notescriber /app/notescriber
COPY notescriber.py /app/notescriber.py COPY notescriber.py /app/notescriber.py
COPY requirements.txt /app/requirements.txt COPY requirements.txt /app/requirements.txt
COPY .config.yaml /app/.config.yaml COPY .config.yaml /app/.config.yaml
COPY load_model.py /app/load_model.py
WORKDIR /app WORKDIR /app
RUN pip install -r requirements.txt RUN pip install -r requirements.txt
RUN /app/load_model.py

3
load_model.py Executable file
View File

@ -0,0 +1,3 @@
#!/usr/bin/env python
import whisper
model = whisper.load_model("base")