Skip to content

backport changes from pr:1318 to main #1490

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 11 commits into
base: rhoai-2.24
Choose a base branch
from
Open
44 changes: 36 additions & 8 deletions jupyter/minimal/ubi9-python-3.11/Dockerfile.konflux.cpu
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
############################
# Stage 1: PDF Tool Build #
############################
FROM registry.access.redhat.com/ubi9/python-311:latest AS pdf-builder

WORKDIR /opt/app-root/bin

# OS Packages needs to be installed as root
USER 0

# Copy scripts
COPY jupyter/utils/install_texlive.sh ./install_texlive.sh
COPY jupyter/utils/install_pandoc.sh ./install_pandoc.sh
RUN chmod +x install_texlive.sh install_pandoc.sh

RUN ./install_texlive.sh
RUN ./install_pandoc.sh

####################
# base #
####################
Expand Down Expand Up @@ -38,14 +56,31 @@ FROM base AS jupyter-minimal
ARG JUPYTER_REUSABLE_UTILS=jupyter/utils
ARG MINIMAL_SOURCE_CODE=jupyter/minimal/ubi9-python-3.11

LABEL name="odh-notebook-jupyter-minimal-ubi9-python-3.11" \
summary="Minimal Jupyter notebook image for ODH notebooks" \
description="Minimal Jupyter notebook image with base Python 3.11 builder image based on UBI9 for ODH notebooks" \
io.k8s.display-name="Minimal Jupyter notebook image for ODH notebooks" \
io.k8s.description="Minimal Jupyter notebook image with base Python 3.11 builder image based on UBI9 for ODH notebooks" \
authoritative-source-url="https://github.com/opendatahub-io/notebooks" \
io.openshift.build.commit.ref="main" \
io.openshift.build.source-location="https://github.com/opendatahub-io/notebooks/tree/main/jupyter/minimal/ubi9-python-3.11" \
io.openshift.build.image="quay.io/opendatahub/workbench-images:jupyter-minimal-ubi9-python-3.11"

WORKDIR /opt/app-root/bin

COPY ${JUPYTER_REUSABLE_UTILS} utils/

USER 0

# Dependencies for PDF export begin
RUN ./utils/install_pdf_deps.sh
RUN --mount=type=cache,from=pdf-builder,source=/usr/local/,target=/pdf_builder/,rw \
bash -c ' \
if [[ "$(uname -m)" == "ppc64le" ]]; then \
cp -r /pdf_builder/texlive /usr/local/; \
cp -r /pdf_builder/pandoc /usr/local/; \
else \
./utils/install_pdf_deps.sh; \
fi'
ENV PATH="/usr/local/texlive/bin/linux:/usr/local/pandoc/bin:$PATH"
# Dependencies for PDF export end

Expand Down Expand Up @@ -73,10 +108,3 @@ WORKDIR /opt/app-root/src

ENTRYPOINT ["start-notebook.sh"]

LABEL name="rhoai/odh-workbench-jupyter-minimal-cpu-py311-rhel9" \
com.redhat.component="odh-workbench-jupyter-minimal-cpu-py311-rhel9" \
io.k8s.display-name="odh-workbench-jupyter-minimal-cpu-py311-rhel9" \
summary="Minimal Jupyter notebook image for ODH notebooks" \
description="Minimal Jupyter notebook image with base Python 3.11 builder image based on UBI9 for ODH notebooks" \
io.k8s.description="Minimal Jupyter notebook image with base Python 3.11 builder image based on UBI9 for ODH notebooks" \
com.redhat.license_terms="https://www.redhat.com/licenses/Red_Hat_Standard_EULA_20191108.pdf"
35 changes: 26 additions & 9 deletions jupyter/minimal/ubi9-python-3.12/Dockerfile.konflux.cpu
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
############################
# Stage 1: PDF Tool Build #
############################
FROM registry.access.redhat.com/ubi9/python-312:latest AS pdf-builder

WORKDIR /opt/app-root/bin

# OS Packages needs to be installed as root
USER 0

# Copy scripts
COPY jupyter/utils/install_texlive.sh ./install_texlive.sh
COPY jupyter/utils/install_pandoc.sh ./install_pandoc.sh
RUN chmod +x install_texlive.sh install_pandoc.sh

RUN ./install_texlive.sh
RUN ./install_pandoc.sh

####################
# base #
####################
Expand Down Expand Up @@ -55,7 +73,14 @@ COPY ${JUPYTER_REUSABLE_UTILS} utils/
USER 0

# Dependencies for PDF export begin
RUN ./utils/install_pdf_deps.sh
RUN --mount=type=cache,from=pdf-builder,source=/usr/local/,target=/pdf_builder/,rw \
bash -c ' \
if [[ "$(uname -m)" == "ppc64le" ]]; then \
cp -r /pdf_builder/texlive /usr/local/; \
cp -r /pdf_builder/pandoc /usr/local/; \
else \
./utils/install_pdf_deps.sh; \
fi'
ENV PATH="/usr/local/texlive/bin/linux:/usr/local/pandoc/bin:$PATH"
# Dependencies for PDF export end

Expand All @@ -80,11 +105,3 @@ RUN echo "Installing softwares and packages" && \
WORKDIR /opt/app-root/src

ENTRYPOINT ["start-notebook.sh"]

LABEL name="rhoai/odh-workbench-jupyter-minimal-cpu-py312-rhel9" \
com.redhat.component="odh-workbench-jupyter-minimal-cpu-py312-rhel9" \
io.k8s.display-name="odh-workbench-jupyter-minimal-cpu-py312-rhel9" \
summary="Minimal Jupyter notebook image for ODH notebooks" \
description="Minimal Jupyter notebook image with base Python 3.12 builder image based on UBI9 for ODH notebooks" \
io.k8s.description="Minimal Jupyter notebook image with base Python 3.12 builder image based on UBI9 for ODH notebooks" \
com.redhat.license_terms="https://www.redhat.com/licenses/Red_Hat_Standard_EULA_20191108.pdf"
23 changes: 23 additions & 0 deletions jupyter/utils/install_pandoc.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash
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"

ARCH="${UNAME_TO_GOARCH[$(uname -m)]}"

if [[ "$ARCH" == "ppc64le" ]]; then

# Install Pandoc from source
dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
dnf install -y pandoc
mkdir -p /usr/local/pandoc/bin
ln -s /usr/bin/pandoc /usr/local/pandoc/bin/pandoc
export PATH="/usr/local/pandoc/bin:$PATH"
pandoc --version

fi
84 changes: 84 additions & 0 deletions jupyter/utils/install_texlive.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
#!/bin/bash
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"

ARCH="${UNAME_TO_GOARCH[$(uname -m)]}"

if [[ "$ARCH" == "ppc64le" ]]; then

echo "Installing TeX Live from source for $ARCH..."

# Install build dependencies
dnf install -y gcc-toolset-13 perl make libX11-devel \
zlib-devel freetype-devel libpng-devel ncurses-devel \
gd-devel libtool wget tar xz \
https://mirror.stream.centos.org/9-stream/AppStream/ppc64le/os/Packages/libXmu-devel-1.1.3-8.el9.ppc64le.rpm \
https://mirror.stream.centos.org/9-stream/AppStream/ppc64le/os/Packages/libXext-devel-1.3.4-8.el9.ppc64le.rpm \
https://mirror.stream.centos.org/9-stream/AppStream/ppc64le/os/Packages/libICE-devel-1.0.10-8.el9.ppc64le.rpm \
https://mirror.stream.centos.org/9-stream/AppStream/ppc64le/os/Packages/libSM-devel-1.2.3-10.el9.ppc64le.rpm \
https://mirror.stream.centos.org/9-stream/AppStream/ppc64le/os/Packages/libXmu-1.1.3-8.el9.ppc64le.rpm \
https://mirror.stream.centos.org/9-stream/AppStream/ppc64le/os/Packages/libXaw-devel-1.0.13-19.el9.ppc64le.rpm \
https://mirror.stream.centos.org/9-stream/AppStream/ppc64le/os/Packages/libXaw-1.0.13-19.el9.ppc64le.rpm \
https://mirror.stream.centos.org/9-stream/AppStream/ppc64le/os/Packages/libXt-devel-1.2.0-6.el9.ppc64le.rpm \
https://mirror.stream.centos.org/9-stream/AppStream/ppc64le/os/Packages/flex-2.6.4-9.el9.ppc64le.rpm \
https://mirror.stream.centos.org/9-stream/AppStream/ppc64le/os/Packages/bison-3.7.4-5.el9.ppc64le.rpm

# Step 1: Download and extract the TeX Live source
wget https://ftp.math.utah.edu/pub/tex/historic/systems/texlive/2025/texlive-20250308-source.tar.xz
tar -xf texlive-20250308-source.tar.xz
cd texlive-20250308-source

# Enable newer GCC toolchain
source /opt/rh/gcc-toolset-13/enable

# Create build directory and build
mkdir -p ../texlive-build
cd ../texlive-build
../texlive-20250308-source/configure --prefix=/usr/local/texlive
make -j"$(nproc)"
make install

# Symlink for pdflatex
ln -sf pdftex /usr/local/texlive/bin/powerpc64le-unknown-linux-gnu/pdflatex

# Cleanup sources to reduce image size
rm -rf /texlive-20250308-source /texlive-build

# Step 2: Run TeX Live installer for runtime tree setup
cd /
wget https://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz
tar -xzf install-tl-unx.tar.gz
cd install-tl-2*/

# Create a custom install profile
TEXLIVE_INSTALL_PREFIX="/usr/local/texlive"
cat <<EOF > texlive.profile
selected_scheme scheme-small
TEXDIR $TEXLIVE_INSTALL_PREFIX
TEXMFCONFIG ~/.texlive2025/texmf-config
TEXMFVAR ~/.texlive2025/texmf-var
option_doc 0
option_src 0
EOF

./install-tl --profile=texlive.profile --custom-bin=$TEXLIVE_INSTALL_PREFIX/bin/powerpc64le-unknown-linux-gnu

# TeX Live binary directory
TEX_BIN_DIR="/usr/local/texlive/bin/powerpc64le-unknown-linux-gnu"

# Create standard symlink 'linux' → arch-specific folder
ln -sf "$TEX_BIN_DIR" /usr/local/texlive/bin/linux


# Set up environment
export PATH="$TEXLIVE_INSTALL_PREFIX/bin/linux:$PATH"
pdflatex --version
tlmgr --version

fi
58 changes: 29 additions & 29 deletions manifests/base/commit-latest.env
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
odh-workbench-jupyter-minimal-cpu-py311-ubi9-commit-n=e759b15
odh-workbench-jupyter-minimal-cuda-py311-ubi9-commit-n=78f1a41
odh-workbench-jupyter-minimal-rocm-py311-ubi9-commit-n=2d72365
odh-workbench-jupyter-datascience-cpu-py311-ubi9-commit-n=e759b15
odh-workbench-jupyter-pytorch-cuda-py311-ubi9-commit-n=78f1a41
odh-workbench-jupyter-pytorch-rocm-py311-ubi9-commit-n=2d72365
odh-workbench-jupyter-tensorflow-cuda-py311-ubi9-commit-n=78f1a41
odh-workbench-jupyter-tensorflow-rocm-py311-ubi9-commit-n=e759b15
odh-workbench-jupyter-trustyai-cpu-py311-ubi9-commit-n=e759b15
odh-workbench-codeserver-datascience-cpu-py311-ubi9-commit-n=2d72365
odh-pipeline-runtime-minimal-cpu-py311-ubi9-commit-n=2d72365
odh-pipeline-runtime-datascience-cpu-py311-ubi9-commit-n=2d72365
odh-pipeline-runtime-pytorch-cuda-py311-ubi9-commit-n=e759b15
odh-pipeline-runtime-pytorch-rocm-py311-ubi9-commit-n=2d72365
odh-pipeline-runtime-tensorflow-cuda-py311-ubi9-commit-n=78f1a41
odh-pipeline-runtime-tensorflow-rocm-py311-ubi9-commit-n=e759b15
odh-workbench-jupyter-minimal-cpu-py312-ubi9-commit-n=2d72365
odh-workbench-jupyter-minimal-cuda-py312-ubi9-commit-n=e759b15
odh-workbench-jupyter-minimal-rocm-py312-ubi9-commit-n=2d72365
odh-workbench-jupyter-datascience-cpu-py312-ubi9-commit-n=2d72365
odh-workbench-jupyter-pytorch-cuda-py312-ubi9-commit-n=78f1a41
odh-workbench-jupyter-pytorch-rocm-py312-ubi9-commit-n=2d72365
odh-workbench-jupyter-tensorflow-cuda-py312-ubi9-commit-n=78f1a41
odh-workbench-jupyter-trustyai-cpu-py312-ubi9-commit-n=2d72365
odh-workbench-codeserver-datascience-cpu-py312-ubi9-commit-n=2d72365
odh-workbench-jupyter-minimal-cpu-py311-ubi9-commit-n=4fce1e1
odh-workbench-jupyter-minimal-cuda-py311-ubi9-commit-n=4fce1e1
odh-workbench-jupyter-minimal-rocm-py311-ubi9-commit-n=4fce1e1
odh-workbench-jupyter-datascience-cpu-py311-ubi9-commit-n=e8b7177
odh-workbench-jupyter-pytorch-cuda-py311-ubi9-commit-n=4fce1e1
odh-workbench-jupyter-pytorch-rocm-py311-ubi9-commit-n=e8b7177
odh-workbench-jupyter-tensorflow-cuda-py311-ubi9-commit-n=e8b7177
odh-workbench-jupyter-tensorflow-rocm-py311-ubi9-commit-n=e8b7177
odh-workbench-jupyter-trustyai-cpu-py311-ubi9-commit-n=e8b7177
odh-workbench-codeserver-datascience-cpu-py311-ubi9-commit-n=e8b7177
odh-pipeline-runtime-minimal-cpu-py311-ubi9-commit-n=14f2d8b
odh-pipeline-runtime-datascience-cpu-py311-ubi9-commit-n=e8b7177
odh-pipeline-runtime-pytorch-cuda-py311-ubi9-commit-n=e8b7177
odh-pipeline-runtime-pytorch-rocm-py311-ubi9-commit-n=e8b7177
odh-pipeline-runtime-tensorflow-cuda-py311-ubi9-commit-n=e8b7177
odh-pipeline-runtime-tensorflow-rocm-py311-ubi9-commit-n=e8b7177
odh-workbench-jupyter-minimal-cpu-py312-ubi9-commit-n=4fce1e1
odh-workbench-jupyter-minimal-cuda-py312-ubi9-commit-n=e8b7177
odh-workbench-jupyter-minimal-rocm-py312-ubi9-commit-n=e8b7177
odh-workbench-jupyter-datascience-cpu-py312-ubi9-commit-n=4fce1e1
odh-workbench-jupyter-pytorch-cuda-py312-ubi9-commit-n=4fce1e1
odh-workbench-jupyter-pytorch-rocm-py312-ubi9-commit-n=e8b7177
odh-workbench-jupyter-tensorflow-cuda-py312-ubi9-commit-n=d131dbe
odh-workbench-jupyter-trustyai-cpu-py312-ubi9-commit-n=e8b7177
odh-workbench-codeserver-datascience-cpu-py312-ubi9-commit-n=e8b7177
odh-pipeline-runtime-minimal-cpu-py312-ubi9-commit-n=4212e5f
odh-pipeline-runtime-datascience-cpu-py312-ubi9-commit-n=2d72365
odh-pipeline-runtime-pytorch-cuda-py312-ubi9-commit-n=78f1a41
odh-pipeline-runtime-pytorch-rocm-py312-ubi9-commit-n=2d72365
odh-pipeline-runtime-tensorflow-cuda-py312-ubi9-commit-n=78f1a41
odh-pipeline-runtime-datascience-cpu-py312-ubi9-commit-n=e8b7177
odh-pipeline-runtime-pytorch-cuda-py312-ubi9-commit-n=e8b7177
odh-pipeline-runtime-pytorch-rocm-py312-ubi9-commit-n=4fce1e1
odh-pipeline-runtime-tensorflow-cuda-py312-ubi9-commit-n=e8b7177
Loading