From cb7896a103eddebc9bcd312cefa72a411e884772 Mon Sep 17 00:00:00 2001 From: Pluto Date: Thu, 28 May 2026 10:52:39 -0500 Subject: [PATCH] feat: Dockerfiles for pipeline, api, and cron containers Co-Authored-By: Claude Sonnet 4.6 --- api/Dockerfile | 10 ++++++++++ cron/Dockerfile | 17 +++++++++++++++++ pipeline/Dockerfile | 20 ++++++++++++++++++++ 3 files changed, 47 insertions(+) create mode 100644 api/Dockerfile create mode 100644 cron/Dockerfile create mode 100644 pipeline/Dockerfile diff --git a/api/Dockerfile b/api/Dockerfile new file mode 100644 index 0000000..4e70a74 --- /dev/null +++ b/api/Dockerfile @@ -0,0 +1,10 @@ +FROM python:3.12-slim + +WORKDIR /app +COPY pyproject.toml . +RUN pip install --no-cache-dir fastapi uvicorn[standard] pydantic-settings httpx livekit-api + +COPY app/ app/ + +ENV PYTHONUNBUFFERED=1 +CMD ["uvicorn", "app.api.main:app_factory", "--factory", "--host", "0.0.0.0", "--port", "8310"] diff --git a/cron/Dockerfile b/cron/Dockerfile new file mode 100644 index 0000000..6fd899d --- /dev/null +++ b/cron/Dockerfile @@ -0,0 +1,17 @@ +FROM python:3.12-slim + +RUN apt-get update && apt-get install -y --no-install-recommends \ + libsndfile1 && rm -rf /var/lib/apt/lists/* + +WORKDIR /app +COPY pyproject.toml . +RUN pip install --no-cache-dir torch --index-url https://download.pytorch.org/whl/cpu && \ + pip install --no-cache-dir resemblyzer scipy numpy httpx pydantic-settings + +COPY app/ app/ + +# Pre-download resemblyzer model +RUN python -c "from resemblyzer import VoiceEncoder; VoiceEncoder()" + +ENV PYTHONUNBUFFERED=1 +CMD ["python", "-m", "app.cron.main"] diff --git a/pipeline/Dockerfile b/pipeline/Dockerfile new file mode 100644 index 0000000..961aa62 --- /dev/null +++ b/pipeline/Dockerfile @@ -0,0 +1,20 @@ +FROM python:3.12-slim + +RUN apt-get update && apt-get install -y --no-install-recommends \ + ffmpeg libsndfile1 && rm -rf /var/lib/apt/lists/* + +WORKDIR /app + +COPY pyproject.toml . +RUN pip install --no-cache-dir torch --index-url https://download.pytorch.org/whl/cpu && \ + pip install --no-cache-dir resemblyzer silero-vad scipy numpy && \ + pip install --no-cache-dir fastapi uvicorn[standard] pydantic-settings httpx websockets livekit-api + +COPY app/ app/ + +# Pre-download VAD and resemblyzer models into the image +RUN python -c "import torch; torch.hub.load('snakers4/silero-vad', 'silero_vad', trust_repo=True)" && \ + python -c "from resemblyzer import VoiceEncoder; VoiceEncoder()" + +ENV PYTHONUNBUFFERED=1 +CMD ["python", "-m", "uvicorn", "app.pipeline.main:app", "--host", "0.0.0.0", "--port", "8300"]