feat: Create Effi-STT - custom STT solution for OpenWebUI
- FastAPI server with OpenAI-compatible API - Integration with faster-whisper (large-v3) - Full Docker support with docker-compose - Support for multiple languages (FR/EN/Auto) - Clean, maintainable codebase (~100 lines) - Health endpoint and error handling - Volume caching for models
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
FROM python:3.11-slim
|
||||
|
||||
# Installation des dépendances système
|
||||
RUN apt-get update && apt-get install -y \
|
||||
ffmpeg \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Création du répertoire de travail
|
||||
WORKDIR /app
|
||||
|
||||
# Copie des dépendances Python
|
||||
COPY requirements.txt .
|
||||
|
||||
# Installation des packages Python
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# Copie du code
|
||||
COPY main.py .
|
||||
|
||||
# Variables d'environnement
|
||||
ENV MODEL_SIZE=large-v3
|
||||
ENV DEVICE=cpu
|
||||
ENV COMPUTE_TYPE=int8
|
||||
ENV LANGUAGE=fr
|
||||
ENV CPU_THREADS=4
|
||||
ENV PORT=8200
|
||||
ENV HOST=0.0.0.0
|
||||
|
||||
# Port exposé
|
||||
EXPOSE 8200
|
||||
|
||||
# Healthcheck
|
||||
HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \
|
||||
CMD python -c "import requests; requests.get('http://localhost:8200/health')" || exit 1
|
||||
|
||||
# Commande de démarrage
|
||||
CMD ["python", "main.py"]
|
||||
Reference in New Issue
Block a user