Files
crm.clientright.ru/whisper_api/Dockerfile
Fedor 01c4fe80b5 chore: snapshot current working tree changes
Save all currently accumulated repository changes as a backup snapshot for Gitea so no local work is lost.
2026-03-26 14:19:01 +03:00

21 lines
698 B
Docker

# Whisper API — faster-whisper + FastAPI
FROM python:3.11-slim
RUN apt-get update && apt-get install -y --no-install-recommends ffmpeg curl \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY app/ ./app/
EXPOSE 8310
HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \
CMD curl -f http://localhost:8310/health || exit 1
# Долгий keep-alive, чтобы прокси не резали соединение во время транскрипции (минуты)
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8310", "--timeout-keep-alive", "1200"]