Save all currently accumulated repository changes as a backup snapshot for Gitea so no local work is lost.
21 lines
698 B
Docker
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"]
|