From 5bbb134aca390e415b93d8440f22207e44b9e4f8 Mon Sep 17 00:00:00 2001 From: Grail Finder Date: Sun, 7 Dec 2025 11:53:10 +0300 Subject: Enha: docker-compose to not depend on locally downloaded models --- batteries/docker-compose.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'batteries') diff --git a/batteries/docker-compose.yml b/batteries/docker-compose.yml index 50f207f..7cf401b 100644 --- a/batteries/docker-compose.yml +++ b/batteries/docker-compose.yml @@ -6,10 +6,17 @@ services: ports: - "8081:8081" volumes: - - ./whisper.cpp/models:/app/models + - whisper_models:/app/models working_dir: /app entrypoint: "" - command: ["./build/bin/whisper-server", "-m", "/app/models/ggml-large-v3-turbo.bin", "-t", "4", "-p", "1", "--port", "8081", "--host", "0.0.0.0"] + command: > + sh -c " + if [ ! -f /app/models/ggml-large-v3-turbo.bin ]; then + echo 'Downloading ggml-large-v3-turbo model...' + ./download-ggml-model.sh large-v3-turbo /app/models + fi && + ./build/bin/whisper-server -m /app/models/ggml-large-v3-turbo.bin -t 4 -p 1 --port 8081 --host 0.0.0.0 + " environment: - WHISPER_LOG_LEVEL=3 # Restart policy in case the service fails @@ -40,3 +47,5 @@ volumes: driver: local audio: driver: local + whisper_models: + driver: local -- cgit v1.2.3