FROM python:3.11-slim

RUN pip install --no-cache-dir \
    fastapi \
    uvicorn \
    trimesh \
    numpy \
    matplotlib \
    python-multipart \
    aiofiles

WORKDIR /app

COPY main.py .
COPY frontend/ frontend/

ENV MPLCONFIGDIR=/tmp/matplotlib
EXPOSE 3001

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