FROM python:3.11-slim

RUN apt-get update && apt-get install -y --no-install-recommends gcc g++ && rm -rf /var/lib/apt/lists/*

# CPU torch first — prevents silero-vad from pulling in the CUDA variant
RUN pip install --no-cache-dir torch --index-url https://download.pytorch.org/whl/cpu

RUN pip install --no-cache-dir \
    "pipecat-ai[openai,livekit,silero]" \
    "livekit-api" \
    fastapi \
    "uvicorn[standard]"

WORKDIR /app
COPY . .

EXPOSE 8882
CMD ["uvicorn", "bot:app", "--host", "0.0.0.0", "--port", "8882"]
