2024-12-25 15:21:29 +00:00
|
|
|
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
|
2020-03-26 05:10:42 +00:00
|
|
|
|
|
|
|
WORKDIR /usr/src/app
|
|
|
|
|
2024-12-25 15:21:29 +00:00
|
|
|
# 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
|
2020-03-26 05:10:42 +00:00
|
|
|
|
2024-12-25 15:21:29 +00:00
|
|
|
WORKDIR /usr/src/app/pnut-matrix
|
2020-03-26 05:10:42 +00:00
|
|
|
COPY . .
|
|
|
|
|
2024-12-25 15:21:29 +00:00
|
|
|
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
|
|
|
|
|
2022-12-10 15:21:37 +00:00
|
|
|
VOLUME /data
|
2020-03-26 05:10:42 +00:00
|
|
|
WORKDIR /data
|
2022-12-10 15:21:37 +00:00
|
|
|
EXPOSE 5000
|
2024-12-25 15:21:29 +00:00
|
|
|
CMD [ "bash", "/usr/src/app/run.sh" ]
|