# llm-rag x kubeflow container image. KFP v2 launches the component from
# this image; the component itself imports component.rag_batch inside the
# container.

FROM python:3.11-slim

WORKDIR /app

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

COPY . .

# KFP invokes the component through kfp.executor; there is no long-lived
# ENTRYPOINT. The default CMD runs the batch once so `docker run` still
# produces a useful smoke output.
CMD ["python", "-c", "from component import rag_batch; print(rag_batch(['heart failure readmission']))"]
