Enha: docker-compose to not depend on locally downloaded models

This commit is contained in:
Grail Finder
2025-12-07 11:53:10 +03:00
parent 5582739e3c
commit 5bbb134aca
3 changed files with 22 additions and 2 deletions

View File

@@ -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