# Google Vertex AI custom prediction container for predictive-classification x vertex-fastapi.
# Vertex supplies AIP_HTTP_PORT (default 8080) and expects GET /health +
# POST /predict on that port.

FROM python:3.11-slim

WORKDIR /app

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

COPY . .

RUN python train_model.py

ENV AIP_HTTP_PORT=8080
CMD ["uvicorn", "predictor:app", "--host", "0.0.0.0", "--port", "8080"]
