FROM python:3.11-slim

RUN apt-get update \
    && apt-get install -y ffmpeg \
    && pip install --no-cache-dir fastapi uvicorn[standard] python-multipart boto3 aiofiles \
    && apt-get clean \
    && rm -rf /var/lib/apt/lists/*

WORKDIR /app
COPY app.py /app/app.py

CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]