agrombaay-voice-api / Dockerfile
CognxSafeTrack
Deploy Agrombaay Voice API with Whisper + Coqui TTS
3257b48
raw
history blame contribute delete
917 Bytes
FROM python:3.11-slim
WORKDIR /app
# Install system dependencies including ffmpeg for pydub and espeak-ng for VITS English
RUN apt-get update && apt-get install -y \
git \
ffmpeg \
espeak-ng \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements and install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir --upgrade pip "setuptools<70.0.0" wheel packaging
RUN pip install --no-cache-dir torch==2.1.2 torchaudio==2.1.2 --index-url https://download.pytorch.org/whl/cpu
RUN pip install --no-cache-dir --no-build-isolation -r requirements.txt --extra-index-url https://download.pytorch.org/whl/cpu
# Téléchargement des modèles déplacé au runtime ou via script externe pour éviter les timeouts de build
# Copier le code
COPY . .
# Exposer le port (Hugging Face utilise 7860)
EXPOSE 7860
# Lancer l'API
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]