FROM python:3.13-slim-bookworm AS builder RUN apt-get update && apt-get install -y wget unzip RUN pip install --no-cache-dir --upgrade pip setuptools wheel WORKDIR /usr/src/app # Work around for the unreleased version of PNUTpy RUN wget https://github.com/spacenerdmo/PNUTpy/archive/refs/heads/api_v1.zip RUN unzip api_v1.zip RUN cd PNUTpy-api_v1 && pip wheel . --wheel-dir /wheels --find-links /wheels WORKDIR /usr/src/app/pnut-matrix COPY . . RUN pip wheel . --wheel-dir /wheels --find-links /wheels FROM python:3.13-slim-bookworm AS run COPY --from=builder /wheels /wheels RUN pip --no-cache-dir install --find-links /wheels --no-index pnut-matrix VOLUME /data WORKDIR /data EXPOSE 5000 CMD [ "bash", "/usr/src/app/run.sh" ]