# Base image
FROM python:3.13-slim-bookworm

ENV DEBIAN_FRONTEND=noninteractive \
    PIP_NO_CACHE_DIR=1 \
    UV_SYSTEM_PYTHON=1

# Base packages
# OS deps. Use --no-install-recommends and clean the lists.
RUN apt-get update \
 && apt-get install -y --no-install-recommends graphviz pandoc ca-certificates curl git \
 && rm -rf /var/lib/apt/lists/*

RUN apt-get update \
 && apt-get install -y --no-install-recommends build-essential \
 && rm -rf /var/lib/apt/lists/*

# Copy repository and pyproject.toml
COPY pyproject.toml /app/
COPY icet/ /app/icet

# Install the project and all dependencies
RUN pip install /app[documentation,test]

# Uninstall the project, keeping the dependencies, and remove the files
RUN pip uninstall -y icet; rm -rf /app

CMD /bin/bash
