mirror of
https://github.com/bellingcat/whisperbox-transcribe.git
synced 2026-06-12 05:28:34 +03:00
feat: allow multiple models to be installed in docker container
This commit is contained in:
@@ -5,7 +5,7 @@ x-app-variables: &app-variables
|
||||
DATABASE_URI: sqlite:///./whisperbox.sqlite
|
||||
ENVIRONMENT: development
|
||||
BROKER_URL: redis://redis:6379/0
|
||||
WHISPER_MODEL: small
|
||||
WHISPER_MODELS: small
|
||||
|
||||
services:
|
||||
redis:
|
||||
@@ -41,7 +41,7 @@ services:
|
||||
context: ../../
|
||||
dockerfile: docker/dev/worker.Dockerfile
|
||||
args:
|
||||
WHISPER_MODEL: small
|
||||
WHISPER_MODELS: small
|
||||
container_name: whisperbox_worker_dev
|
||||
volumes:
|
||||
- ../../:/code
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
FROM python:3.10
|
||||
|
||||
ARG WHISPER_MODEL
|
||||
ARG WHISPER_MODELS
|
||||
|
||||
WORKDIR /code
|
||||
|
||||
@@ -13,7 +13,7 @@ COPY --from=mwader/static-ffmpeg:5.1.2 /ffprobe /usr/local/bin/
|
||||
COPY pyproject.toml .
|
||||
RUN pip install --no-cache-dir --user .[worker,worker_dev]
|
||||
|
||||
COPY scripts/download_model.py .
|
||||
RUN chmod +x download_model.py && python download_model.py ${WHISPER_MODEL}
|
||||
COPY scripts/download_models.py .
|
||||
RUN python download_models.py ${WHISPER_MODELS}
|
||||
|
||||
ENTRYPOINT ["watchmedo", "auto-restart", "-d" , "app/worker", "-p", "*.py", "--recursive", "celery", "--", "--app=app.worker.main.celery", "worker", "--loglevel=info", "--concurrency=1"]
|
||||
CMD watchmedo auto-restart -d app/worker -p *.py --recursive celery -- --app=app.worker.main.celery worker --loglevel=info --concurrency=1
|
||||
|
||||
Reference in New Issue
Block a user