Skip to content

Commit

Permalink
FIXUP: Make Dockerfile work with latest wheels
Browse files Browse the repository at this point in the history
  • Loading branch information
apyrgio committed Oct 7, 2024
1 parent e1b0c26 commit 28c9fc3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ FROM alpine:latest as pymupdf-build
ARG ARCH
ARG REQUIREMENTS_TXT

RUN mkdir -p /usr/lib/python3.12/site-packages/PyMuPDFb.libs
# Install PyMuPDF via hash-checked requirements file
COPY ${REQUIREMENTS_TXT} /tmp/requirements.txt

Expand All @@ -14,7 +13,7 @@ COPY ${REQUIREMENTS_TXT} /tmp/requirements.txt
RUN case "$ARCH" in \
"arm64") \
# This is required for copying later, but is created only in the pre-built wheels
mkdir -p /usr/lib/python3.12/site-packages/PyMuPDFb.libs/ \
mkdir -p /usr/lib/python3.12/site-packages/PyMuPDF.libs/ \
&& apk --no-cache add linux-headers g++ linux-headers gcc make python3-dev py3-pip clang-dev ;; \
*) \
apk --no-cache add py3-pip ;; \
Expand Down Expand Up @@ -50,7 +49,7 @@ RUN apk --no-cache -U upgrade && \

COPY --from=pymupdf-build /usr/lib/python3.12/site-packages/fitz/ /usr/lib/python3.12/site-packages/fitz
COPY --from=pymupdf-build /usr/lib/python3.12/site-packages/pymupdf/ /usr/lib/python3.12/site-packages/pymupdf
COPY --from=pymupdf-build /usr/lib/python3.12/site-packages/PyMuPDFb.libs/ /usr/lib/python3.12/site-packages/PyMuPDFb.libs
COPY --from=pymupdf-build /usr/lib/python3.12/site-packages/PyMuPDF.libs/ /usr/lib/python3.12/site-packages/PyMuPDF.libs
COPY --from=h2orestart-dl /libreoffice_ext/ /libreoffice_ext

RUN install -dm777 "/usr/lib/libreoffice/share/extensions/"
Expand Down

0 comments on commit 28c9fc3

Please sign in to comment.