Skip to content

Commit 9f53944

Browse files
committed
Update pdf scripts
Updated install_texlive and install_pandoc scripts to run only on ppc64le. Other architectures use the default install_pdf_deps scripts. This is to ensure s390x builds don't break with ppc64le scripts. Signed-off-by: Md. Shafi Hussain <[email protected]>
1 parent c0bcaf0 commit 9f53944

File tree

4 files changed

+19
-30
lines changed

4 files changed

+19
-30
lines changed

jupyter/minimal/ubi9-python-3.11/Dockerfile.konflux.cpu

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,15 @@ COPY ${JUPYTER_REUSABLE_UTILS} utils/
7272

7373
USER 0
7474

75-
# Copy built TeXLive and Pandoc binaries only (no build deps)
76-
COPY --from=pdf-builder /usr/local/texlive /usr/local/texlive
77-
COPY --from=pdf-builder /usr/local/pandoc /usr/local/pandoc
78-
75+
# Dependencies for PDF export begin
76+
RUN --mount=type=bind,from=pdf-builder,source=/usr/local/,target=/pdf_builder/,rw \
77+
bash -c ' \
78+
if [[ "$(uname -m)" == "ppc64le" ]]; then \
79+
cp /pdf_builder/texlive /usr/local/; \
80+
cp /pdf_builder/pandoc /usr/local/; \
81+
else \
82+
./utils/install_pdf_deps.sh; \
83+
fi'
7984
ENV PATH="/usr/local/texlive/bin/linux:/usr/local/pandoc/bin:$PATH"
8085
# Dependencies for PDF export end
8186

jupyter/minimal/ubi9-python-3.12/Dockerfile.konflux.cpu

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,15 @@ COPY ${JUPYTER_REUSABLE_UTILS} utils/
7272

7373
USER 0
7474

75-
# Copy built TeXLive and Pandoc binaries only (no build deps)
76-
COPY --from=pdf-builder /usr/local/texlive /usr/local/texlive
77-
COPY --from=pdf-builder /usr/local/pandoc /usr/local/pandoc
78-
75+
# Dependencies for PDF export begin
76+
RUN --mount=type=bind,from=pdf-builder,source=/usr/local/,target=/pdf_builder/,rw \
77+
bash -c ' \
78+
if [[ "$(uname -m)" == "ppc64le" ]]; then \
79+
cp /pdf_builder/texlive /usr/local/; \
80+
cp /pdf_builder/pandoc /usr/local/; \
81+
else \
82+
./utils/install_pdf_deps.sh; \
83+
fi'
7984
ENV PATH="/usr/local/texlive/bin/linux:/usr/local/pandoc/bin:$PATH"
8085
# Dependencies for PDF export end
8186

jupyter/utils/install_pandoc.sh

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,4 @@ if [[ "$ARCH" == "ppc64le" ]]; then
2020
export PATH="/usr/local/pandoc/bin:$PATH"
2121
pandoc --version
2222

23-
else
24-
25-
# pandoc installation
26-
curl -fL "https://github.com/jgm/pandoc/releases/download/3.7.0.2/pandoc-3.7.0.2-linux-${ARCH}.tar.gz" -o /tmp/pandoc.tar.gz
27-
mkdir -p /usr/local/pandoc
28-
tar xvzf /tmp/pandoc.tar.gz --strip-components 1 -C /usr/local/pandoc/
29-
rm -f /tmp/pandoc.tar.gz
30-
3123
fi

jupyter/utils/install_texlive.sh

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -81,17 +81,4 @@ ln -sf "$TEX_BIN_DIR" /usr/local/texlive/bin/linux
8181
pdflatex --version
8282
tlmgr --version
8383

84-
else
85-
86-
# tex live installation
87-
echo "Installing TexLive to allow PDf export from Notebooks"
88-
curl -fL https://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz -o install-tl-unx.tar.gz
89-
zcat < install-tl-unx.tar.gz | tar xf -
90-
cd install-tl-2*
91-
perl ./install-tl --no-interaction --scheme=scheme-small --texdir=/usr/local/texlive
92-
mv /usr/local/texlive/bin/"$(uname -m)-linux" /usr/local/texlive/bin/linux
93-
cd /usr/local/texlive/bin/linux
94-
./tlmgr install tcolorbox pdfcol adjustbox titling enumitem soul ucs collection-fontsrecommended
95-
96-
fi
97-
84+
fi

0 commit comments

Comments
 (0)