FROM python:3.12-slim
ENV PYTHONUNBUFFERED=1 PIP_NO_CACHE_DIR=1 PORT=8080
WORKDIR /app
COPY requirements.txt .
RUN grep -vE '^(pytest|httpx)' requirements.txt > req-prod.txt && pip install -r req-prod.txt
COPY semantique.yaml ./
COPY assistant/ assistant/
COPY web/ web/
RUN useradd --uid 10001 app
USER app
CMD exec uvicorn assistant.web:app --host 0.0.0.0 --port ${PORT} --proxy-headers
