This commit is contained in:
2026-02-24 17:31:26 +01:00
parent d6e7ccd64d
commit 3058446b7d

View File

@ -11,12 +11,15 @@ services:
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf - ./nginx/default.conf:/etc/nginx/conf.d/default.conf
networks: networks:
- studio-net - studio-net
# On attend que l'interface ET l'audio soient en état "Healthy"
depends_on: depends_on:
- open-webui open-webui:
- audio-api # Ajouté ici : Nginx attend que l'audio soit prêt condition: service_healthy
audio-api:
condition: service_started
restart: always restart: always
# --- L'INTERFACE --- # --- L'INTERFACE (Open WebUI) ---
open-webui: open-webui:
image: ghcr.io/open-webui/open-webui:main image: ghcr.io/open-webui/open-webui:main
container_name: open-webui container_name: open-webui
@ -27,9 +30,14 @@ services:
- webui_data:/app/backend/data - webui_data:/app/backend/data
networks: networks:
- studio-net - studio-net
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
interval: 30s
timeout: 10s
retries: 3
restart: always restart: always
# --- LE CERVEAU --- # --- LE CERVEAU (Ollama) ---
ollama: ollama:
image: ollama/ollama:latest image: ollama/ollama:latest
container_name: ollama container_name: ollama
@ -48,17 +56,20 @@ services:
# --- LE SERVICE AUDIO --- # --- LE SERVICE AUDIO ---
audio-api: audio-api:
image: nvcr.io/nvidia/pytorch:23.10-py3 # On utilise une image robuste image: nvcr.io/nvidia/pytorch:23.10-py3
container_name: audio-api container_name: audio-api
working_dir: /app working_dir: /app
# On monte le dossier local pour que le script server.py soit trouvé environment:
- NVIDIA_VISIBLE_DEVICES=all
volumes: volumes:
- ./services/audio-api:/app - ./services/audio-api:/app
- ./models:/app/models - ./models:/app/models
- ./outputs:/app/outputs - ./outputs:/app/outputs
# L'astuce : On installe Gradio AVANT de lancer le script # Correction de la commande pour s'assurer que les dossiers existent
command: > command: >
sh -c "pip install --no-cache-dir gradio faster-whisper && python3 server.py" sh -c "mkdir -p models outputs &&
pip install --no-cache-dir gradio faster-whisper &&
python3 server.py"
ports: ports:
- "7860:7860" - "7860:7860"
deploy: deploy: