Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions jupyter/minimal/ubi9-python-3.12/Dockerfile.konflux.cpu
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ RUN dnf -y upgrade --refresh --nobest --skip-broken --nodocs --noplugins --setop
&& dnf clean all -y
# upgrade first to avoid fixable vulnerabilities end

RUN subscription-manager refresh

# Install useful OS packages
RUN dnf install -y perl mesa-libGL skopeo && dnf clean all && rm -rf /var/cache/yum

Expand Down
65 changes: 34 additions & 31 deletions jupyter/utils/install_pdf_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,40 @@

set -euxo pipefail

# Mapping of `uname -m` values to equivalent GOARCH values
declare -A UNAME_TO_GOARCH
UNAME_TO_GOARCH["x86_64"]="amd64"
UNAME_TO_GOARCH["aarch64"]="arm64"
UNAME_TO_GOARCH["ppc64le"]="ppc64le"
UNAME_TO_GOARCH["s390x"]="s390x"
# https://konflux.pages.redhat.com/docs/users/building/activation-keys-subscription.html#automatic-registration
#subscription-manager refresh

ARCH="${UNAME_TO_GOARCH[$(uname -m)]}"
if [[ -z "${ARCH:-}" ]]; then
echo "Unsupported architecture: $(uname -m)" >&2
exit 1
fi
#subscription-manager repos --enable codeready-builder-for-rhel-9-x86_64-rpms

# Skip PDF export installation for s390x and ppc64le architectures
if [[ "$(uname -m)" == "s390x" || "$(uname -m)" == "ppc64le" ]]; then
echo "PDF export functionality is not supported on $(uname -m) architecture. Skipping installation."
exit 0
fi
dnf install -y \
pandoc \

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The simplification of this script to use dnf is a great improvement. However, it seems that the Dockerfiles in this PR are removing the calls to this script, which means that the PDF export dependencies will no longer be installed. Is this intentional? If so, this script is no longer needed. If not, the Dockerfiles should be updated to call this script.

texlive-adjustbox \
texlive-bibtex \
texlive-charter \
texlive-ec \
texlive-euro \
texlive-eurosym \
texlive-fpl \
texlive-jknapltx \
texlive-knuth-local \
texlive-lm-math \
texlive-marvosym \
texlive-mathpazo \
texlive-mflogo-font \
texlive-parskip \
texlive-plain \
texlive-pxfonts \
texlive-rsfs \
texlive-tcolorbox \
texlive-times \
texlive-titling \
texlive-txfonts \
texlive-ulem \
texlive-upquote \
texlive-utopia \

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 For better readability and easier maintenance, consider sorting the packages alphabetically.

texlive-wasy \
texlive-wasy-type1 \
texlive-wasysym \
texlive-xetex

# tex live installation
echo "Installing TexLive to allow PDf export from Notebooks"
curl -fL https://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz -o install-tl-unx.tar.gz
zcat < install-tl-unx.tar.gz | tar xf -
cd install-tl-2*
perl ./install-tl --no-interaction --scheme=scheme-small --texdir=/usr/local/texlive
mv /usr/local/texlive/bin/"$(uname -m)-linux" /usr/local/texlive/bin/linux
cd /usr/local/texlive/bin/linux
./tlmgr install tcolorbox pdfcol adjustbox titling enumitem soul ucs collection-fontsrecommended

# pandoc installation
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
mkdir -p /usr/local/pandoc
tar xvzf /tmp/pandoc.tar.gz --strip-components 1 -C /usr/local/pandoc/
rm -f /tmp/pandoc.tar.gz
dnf clean all
Loading