feat: Dockerfiles for pipeline, api, and cron containers
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -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"]
|
||||||
@@ -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"]
|
||||||
@@ -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"]
|
||||||
Reference in New Issue
Block a user