Skip to content

update runtime-minimal image for ppc64le #1330

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

Closed
wants to merge 1 commit into from

Conversation

AaruniAggarwal
Copy link

@AaruniAggarwal AaruniAggarwal commented Jul 31, 2025

This PR adds additional packages in minimal runtime Dockerfile.cpu for ppc64le as pyzmq require them. Without these changes, image is failing to build on ppc64le with following error:

127.3   note: This error originates from a subprocess, and is likely not a problem with pip.
127.3   ERROR: Failed building wheel for pyzmq
127.3 Failed to build pyzmq
127.3 ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (pyzmq)
127.6 Failed to install requirements, dependency 'pyzmq' could not be installed

This change ensures notebook runtime minimal builds are successfull on IBM Power (ppc64le) and it will not impact to x86_64 builds.

Tested on: ppc64le

Able to build runtime-minimal image for both python3.11 and python3.12 with these changes.

@openshift-ci openshift-ci bot requested review from andyatmiami and atheo89 July 31, 2025 08:51
Copy link

openshift-ci bot commented Jul 31, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign jstourac for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@AaruniAggarwal
Copy link
Author

python3.12::

[root@ocpworkload36 notebooks]# docker build -t nb-runtime-minimal-ubi9py312 -f runtimes/minimal/ubi9-python-3.12/Dockerfile.cpu .
[+] Building 160.5s (15/15) FINISHED                                                                                                                                               docker:default
 => [internal] load build definition from Dockerfile.cpu                                                                                                                                     0.0s
 => => transferring dockerfile: 2.60kB                                                                                                                                                       0.0s
 => [internal] load metadata for registry.access.redhat.com/ubi9/python-312:latest                                                                                                           0.8s
 => [internal] load .dockerignore                                                                                                                                                            0.0s
 => => transferring context: 211B                                                                                                                                                            0.0s
 => [base 1/5] FROM registry.access.redhat.com/ubi9/python-312:latest@sha256:95ec8d3ee9f875da011639213fd254256c29bc58861ac0b11f290a291fa04435                                               16.3s
 => => resolve registry.access.redhat.com/ubi9/python-312:latest@sha256:95ec8d3ee9f875da011639213fd254256c29bc58861ac0b11f290a291fa04435                                                     0.0s
 => => sha256:547b4f1ae78c160934f0432978a59114ffa488302e4dce8c0fc71e8f65d517d3 85.37MB / 85.37MB                                                                                             2.7s
 => => sha256:4b351371296d890d642aebede47616743633ea2a80fb8d0376e0de5445dbf5a3 17.96MB / 17.96MB                                                                                             0.7s
 => => sha256:4def761bce337f2ade18147249b5b4a1576e919c25984c3be14619db56d7db94 213.02MB / 213.02MB                                                                                           4.4s
 => => sha256:95ec8d3ee9f875da011639213fd254256c29bc58861ac0b11f290a291fa04435 916B / 916B                                                                                                   0.0s
 => => sha256:559127c860d0af543b9f3a450ec65482a1c2dd5d82f39a78301fb6dd8d114f5d 1.17kB / 1.17kB                                                                                               0.0s
 => => sha256:bf172bb3e44ffad52d0caa643fcf880348987598ef53395c253d091dc67e360f 17.65kB / 17.65kB                                                                                             0.0s
 => => sha256:aaa0f5240193bd1705b1f060d2955e14cfe6a877c9f5745af10c7c0cffe636f5 69.97MB / 69.97MB                                                                                             3.2s
 => => extracting sha256:547b4f1ae78c160934f0432978a59114ffa488302e4dce8c0fc71e8f65d517d3                                                                                                    4.7s
 => => extracting sha256:4b351371296d890d642aebede47616743633ea2a80fb8d0376e0de5445dbf5a3                                                                                                    0.6s
 => => extracting sha256:4def761bce337f2ade18147249b5b4a1576e919c25984c3be14619db56d7db94                                                                                                    5.3s
 => => extracting sha256:aaa0f5240193bd1705b1f060d2955e14cfe6a877c9f5745af10c7c0cffe636f5                                                                                                    2.4s
 => [internal] load build context                                                                                                                                                            0.1s
 => => transferring context: 162.49kB                                                                                                                                                        0.0s
 => [base 2/5] WORKDIR /opt/app-root/bin                                                                                                                                                     2.3s
 => [base 3/5] RUN ARCH=$(uname -m) &&     echo "Detected architecture: $ARCH" &&     PACKAGES="mesa-libGL skopeo" &&     if [ "$ARCH" = "s390x" ] || [ "$ARCH" = "ppc64le" ]; then          6.7s
 => [base 4/5] RUN pip install --no-cache-dir -U "micropipenv[toml]"                                                                                                                         1.4s
 => [base 5/5] RUN curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/ocp/stable/openshift-client-linux.tar.gz         -o /tmp/openshift-client-linux.tar.gz &&       3.6s 
 => [runtime-minimal 1/5] WORKDIR /opt/app-root/bin                                                                                                                                          0.0s 
 => [runtime-minimal 2/5] COPY runtimes/minimal/ubi9-python-3.12/Pipfile.lock ./                                                                                                             0.0s 
 => [runtime-minimal 3/5] COPY runtimes/minimal/ubi9-python-3.12/utils ./utils/                                                                                                              0.0s 
 => [runtime-minimal 4/5] RUN echo "Installing softwares and packages" &&     micropipenv install &&     rm -f ./Pipfile.lock &&     chmod -R g+w /opt/app-root/lib/python3.12/site-packa  122.5s 
 => [runtime-minimal 5/5] WORKDIR /opt/app-root/src                                                                                                                                          0.2s 
 => exporting to image                                                                                                                                                                       2.0s
 => => exporting layers                                                                                                                                                                      2.0s
 => => writing image sha256:92de6f995e31885bd18a0443a9eb4daf5c616eccb7e91212d0c9c8eb6617bf57                                                                                                 0.0s
 => => naming to docker.io/library/nb-runtime-minimal-ubi9py312                         

Python3.11::

[root@ocpworkload36 notebooks]# docker build -t nb-runtime-minimal-ubi9py311 -f runtimes/minimal/ubi9-python-3.11/Dockerfile.cpu .
[+] Building 132.7s (15/15) FINISHED                                                                                                                                                           docker:default
 => [internal] load build definition from Dockerfile.cpu                                                                                                                                                 0.0s
 => => transferring dockerfile: 2.71kB                                                                                                                                                                   0.0s
 => [internal] load metadata for registry.access.redhat.com/ubi9/python-311:latest                                                                                                                       0.0s
 => [internal] load .dockerignore                                                                                                                                                                        0.0s
 => => transferring context: 211B                                                                                                                                                                        0.0s
 => [internal] load build context                                                                                                                                                                        0.0s
 => => transferring context: 953B                                                                                                                                                                        0.0s
 => [base 1/5] FROM registry.access.redhat.com/ubi9/python-311:latest                                                                                                                                    0.0s
 => CACHED [base 2/5] WORKDIR /opt/app-root/bin                                                                                                                                                          0.0s
 => [base 3/5] RUN ARCH=$(uname -m) &&     echo "Detected architecture: $ARCH" &&     if [ "$ARCH" = "s390x" ] || [ "$ARCH" = "ppc64le" ]; then         dnf install -y mesa-libGL skopeo gcc g++ make o  8.1s
 => [base 4/5] RUN pip install --no-cache-dir -U "micropipenv[toml]"                                                                                                                                     1.3s
 => [base 5/5] RUN curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/ocp/stable/openshift-client-linux.tar.gz         -o /tmp/openshift-client-linux.tar.gz &&     tar -xzvf /t  3.3s 
 => [runtime-minimal 1/5] WORKDIR /opt/app-root/bin                                                                                                                                                      0.1s 
 => [runtime-minimal 2/5] COPY runtimes/minimal/ubi9-python-3.11/Pipfile.lock ./                                                                                                                         0.1s 
 => [runtime-minimal 3/5] COPY runtimes/minimal/ubi9-python-3.11/utils ./utils/                                                                                                                          0.0s 
 => [runtime-minimal 4/5] RUN echo "Installing softwares and packages" &&     micropipenv install &&     rm -f ./Pipfile.lock &&     chmod -R g+w /opt/app-root/lib/python3.11/site-packages &&     f  115.4s 
 => [runtime-minimal 5/5] WORKDIR /opt/app-root/src                                                                                                                                                      0.2s 
 => exporting to image                                                                                                                                                                                   4.1s 
 => => exporting layers                                                                                                                                                                                  4.1s 
 => => writing image sha256:821f58b96e59b895af9305a8966c42edd683dd5ba3d99badc28c27143cf21e8e                                                                                                             0.0s 
 => => naming to docker.io/library/nb-runtime-minimal-ubi9py311                                                                                                                                          0.0s 

images::

[root@ocpworkload36 notebooks]# docker images |grep minimal
nb-runtime-minimal-ubi9py312                              latest                    92de6f995e31   13 minutes ago   1.78GB
nb-runtime-minimal-ubi9py311                              latest                    821f58b96e59   5 weeks ago      1.79GB

@atheo89
Copy link
Member

atheo89 commented Jul 31, 2025

Hi @AaruniAggarwal, just out of curiosity—was there a specific reason for creating the feature branch on the downstream repo instead of under opendatahub-io/notebooks?

@AaruniAggarwal
Copy link
Author

Hi aTheo,
We wanted to verify our changes for Power via Konflux. Hence raised the PR downstream. We can raise another similar PR against opendatahub-io as well, if multi-arch pipeline is enabled there.

@atheo89
Copy link
Member

atheo89 commented Aug 1, 2025

. We can raise another similar PR against opendatahub-io as well, if multi-arch pipeline is enabled there.

Thanks for the response. We recently added the multiarch-pull-request-pipeline on the upstream for pull request builds. You can now try it out directly there.

@atheo89
Copy link
Member

atheo89 commented Aug 1, 2025

I just remembered your upstream PR: https://github.com/opendatahub-io/notebooks/pull/1175/files. Since it's now merged upstream, you might want to apply the same upgrade to the py312 image, as that change hasn’t been included there yet.

@jiridanek jiridanek changed the title updating runtime-minimal image for ppc64le update runtime-minimal image for ppc64le Aug 1, 2025
moulalis pushed a commit to moulalis/notebooks that referenced this pull request Aug 4, 2025
@AaruniAggarwal
Copy link
Author

I just remembered your upstream PR: https://github.com/opendatahub-io/notebooks/pull/1175/files. Since it's now merged upstream, you might want to apply the same upgrade to the py312 image, as that change hasn’t been included there yet.

Thanks aTheo, I have created a similar PR for python3.12 in opendatahub-io/notebooks :
opendatahub-io#1632

@atheo89
Copy link
Member

atheo89 commented Aug 5, 2025

Thanks, @AaruniAggarwal. Can I go ahead and close this one? Have you completed the Konflux test?

@AaruniAggarwal
Copy link
Author

Hi @atheo89 , I can see here konflux related checks for ppc64le image are passing for both python3.11 and 3.12 . took some snapshots from konflux.

python3.11 ::
runtime-minimal-ppc-rhoai2 23-py3 11
runtime-minimal-ppc-rhoai2 23-py3 11-1

python3.12::
runtime-minimal-ppc-rhoai2 23-py3 12-2
runtime-minimal-ppc-rhoai2 23-py3 12

Is anything else also needs to be done?
Thanks

@atheo89
Copy link
Member

atheo89 commented Aug 6, 2025

Great, thank you, I thing is fine.
I will move this to close and we will allow the one from upstream to get sync here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants