# ---- build stage ----
FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim AS builder

WORKDIR /app

COPY . .

RUN apt-get update && apt-get install -y --no-install-recommends git \
    && uv sync --frozen \
    && git submodule update --init \
    && git submodule foreach "uv pip install -e ."

# ---- runtime stage ----
FROM python:3.12-slim AS runtime

WORKDIR /app

COPY --from=builder /app /app

ENV PATH="/app/.venv/bin:$PATH"

ENTRYPOINT [ "python" ]
CMD ["-m", "qciconnect.applib.app.deutsch"]