# llm-rag x vertex-fastapi container image. Vertex expects the container
# to bind to $AIP_HTTP_PORT (default 8080) and serve GET /health and
# POST /predict at the request paths configured on the Model resource.

FROM python:3.11-slim

WORKDIR /app

COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

COPY . .

ENV AIP_HTTP_PORT=8080
CMD ["sh", "-c", "uvicorn predictor:app --host 0.0.0.0 --port ${AIP_HTTP_PORT}"]
