From 2ebb89f1131ec0cdca1074228265e6a0aebe0334 Mon Sep 17 00:00:00 2001 From: nicoboy Date: Tue, 24 Feb 2026 17:52:46 +0100 Subject: [PATCH] erreurs --- services/audio-api/Dockerfile | 34 +++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/services/audio-api/Dockerfile b/services/audio-api/Dockerfile index 3532bab..e9c1d02 100644 --- a/services/audio-api/Dockerfile +++ b/services/audio-api/Dockerfile @@ -1,28 +1,40 @@ -# Utilisation d'une image légère avec support GPU +# Utilisation d'une image stable avec support GPU FROM nvidia/cuda:12.1.1-cudnn8-runtime-ubuntu22.04 # Configuration environnement ENV DEBIAN_FRONTEND=noninteractive WORKDIR /app -# Installation des dépendances système (Audio + Python) +# Installation des dépendances système (Audio + Python 3.11) RUN apt-get update && apt-get install -y \ - python3.11 python3-pip ffmpeg libsndfile1 git \ + python3.11 \ + python3-pip \ + ffmpeg \ + libsndfile1 \ + git \ && rm -rf /var/lib/apt/lists/* -# 1. Installer d'abord PyTorch depuis la source NVIDIA/CUDA -RUN pip3 install --no-cache-dir \ +# Mise à jour de pip pour éviter les avertissements +RUN python3.11 -m pip install --upgrade pip + +# 1. Installer PyTorch avec le lien direct CUDA 12.1 +# On utilise "python3.11 -m pip" pour garantir que Gradio sera trouvé par Python 3.11 +RUN python3.11 -m pip install --no-cache-dir \ torch torchvision torchaudio \ --index-url https://download.pytorch.org/whl/cu121 -# 2. Installer le reste depuis le dépôt Python standard (PyPI) -RUN pip3 install --no-cache-dir \ - fastapi uvicorn gradio faster-whisper +# 2. Installer le reste des dépendances +RUN python3.11 -m pip install --no-cache-dir \ + fastapi \ + uvicorn \ + gradio \ + faster-whisper -# Copie du code serveur +# Copie du code serveur (sera écrasé par le volume en dev, mais utile pour le build) COPY server.py . -# Exposition du port pour la communication interne +# Exposition du port Gradio EXPOSE 7860 -CMD ["python3.11", "server.py"] +# Lancement explicite avec Python 3.11 +CMD ["python3.11", "server.py"] \ No newline at end of file