# Any base image can be used; the platform sees only the contract.
FROM python:3.12-slim
WORKDIR /app
LABEL org.opencontainers.image.source="{{ source_url }}"
LABEL org.opencontainers.image.licenses="{{ source_licence }}"
COPY requirements.txt .
# Importing every dependency fails the build, rather than the first run, when a
# wheel needs a system library the image lacks (LightGBM needs libgomp1 on slim
# images, for example). Add each module you add to requirements.txt.
RUN pip install --no-cache-dir -r requirements.txt \
 && python -c "import {{ imports }}"
# The root filesystem is read-only when the platform runs the image, and /tmp
# is writable. Point caches that default to the home directory there, e.g.:
# ENV MPLCONFIGDIR=/tmp/matplotlib
COPY analysis.py .
ENTRYPOINT ["python3", "analysis.py"]
