From 96e06152671558dd877563cb55781ee11a54470d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Fr=C4=85tczak?= Date: Wed, 14 Feb 2024 22:33:37 +0100 Subject: [PATCH] make the model be pre-loaded into the image --- dockerfile | 4 +++- load_model.py | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100755 load_model.py diff --git a/dockerfile b/dockerfile index 7a29207..378f9fe 100644 --- a/dockerfile +++ b/dockerfile @@ -5,6 +5,8 @@ COPY notescriber /app/notescriber COPY notescriber.py /app/notescriber.py COPY requirements.txt /app/requirements.txt COPY .config.yaml /app/.config.yaml +COPY load_model.py /app/load_model.py WORKDIR /app -RUN pip install -r requirements.txt \ No newline at end of file +RUN pip install -r requirements.txt +RUN /app/load_model.py \ No newline at end of file diff --git a/load_model.py b/load_model.py new file mode 100755 index 0000000..274aac4 --- /dev/null +++ b/load_model.py @@ -0,0 +1,3 @@ +#!/usr/bin/env python +import whisper +model = whisper.load_model("base") \ No newline at end of file