Skip to content

Conversation

Nash-123
Copy link

@Nash-123 Nash-123 commented Sep 1, 2025

Summary (TEST PR on Konflux)

This is a Test PR that introduces s390x (IBM Z) support and build optimizations for the runtime-datascience notebook images for Python 3.12.

  • Reduced build time for s390x: ~2–2.3 hours (down from 4 hours on building natively)
  • No impact on other platforms (x86_64, arm64, etc.)
  • Elyra-compatible: validated for notebook execution

Key Changes

Dockerfile.cpu (Python 3.12)

  • Introduced ARG TARGETARCH for architecture-specific builds
  • Multi-stage build using s390x-builder to build pyarrow from source on IBM Z
  • Enabled cache mounts option for dnf and pip
  • Optimizations for s390x:
    • Installs Rust & Cargo
    • Uses compiler flags (CFLAGS="-O3")
    • Installs development dependencies required for pyarrow compilation
  • Package installation and build logic gated via TARGETARCH

Pipfile (Python 3.12)

Architecture-specific markers added to exclude incompatible packages on s390x:

codeflare-sdk = { version = "~=0.30.0", markers = "platform_machine != 's390x'" }
py-spy        = { version = "~=0.4.0", markers = "platform_machine != 's390x'" }
ray           = { version = "~=2.47.1", markers = "platform_machine != 's390x'", extras = ["data", "default"] }
pyarrow       = { version = "~=21.0.0", markers = "platform_machine != 's390x'" }

Regenerated Pipfile.locks using Renewal Action


Validation & Testing

  • Builds completed successfully on s390x LPAR for Python 3.12
  • Build time reduced to ~2 hours
  • Verified compatibility by deploying on an local openshift cluster on s390x lpar

Sample Notebook Validation :-

Build & Push:

image

Validate Runtime Image(version 3.11):

+ bin/kubectl exec runtime-runtime-pod -- /bin/sh -c 'curl https://raw.githubusercontent.com/opendatahub-io/elyra/refs/heads/main/etc/generic/requirements-elyra.txt --output req.txt && 				python3 -m pip install -r req.txt > /dev/null && 				curl https://raw.githubusercontent.com/nteract/papermill/main/papermill/tests/notebooks/simple_execute.ipynb --output simple_execute.ipynb && 				python3 -m papermill simple_execute.ipynb output.ipynb > /dev/null'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1368  100  1368    0     0   7907      0 --:--:-- --:--:-- --:--:--  7907

[notice] A new release of pip is available: 24.2 -> 25.1.1
[notice] To update, run: pip install --upgrade pip
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   910  100   910    0     0   3791      0 --:--:-- --:--:-- --:--:--  3791
Input Notebook:  simple_execute.ipynb
Output Notebook: output.ipynb
Executing:   0%|          | 0/3 [00:00<?, ?cell/s]Executing notebook with kernel: python3
Executing DESC: 100%|██████████| 3/3 [00:01<00:00,  2.04cell/s]
+ '[' 0 -eq 1 ']'
+ echo '=> Container image runtime-datascience-ubi9-python-3.11 is a suitable Elyra runtime image'
=> Container image runtime-datascience-ubi9-python-3.11 is a suitable Elyra runtime image

Validate Runtime Image(version 3.12):

=> Checking container image runtime-datascience-ubi9-python-3.12 for python3...
+ bin/kubectl exec runtime-pod which python3
+ '[' python3 == python3 ']'
+ echo '=> Checking notebook execution...'
=> Checking notebook execution...
+ bin/kubectl exec runtime-pod -- /bin/sh -c 'curl https://raw.githubusercontent.com/opendatahub-io/elyra/refs/heads/main/etc/generic/requirements-elyra.txt --output req.txt && 				python3 -m pip install -r req.txt > /dev/null && 				curl https://raw.githubusercontent.com/nteract/papermill/main/papermill/tests/notebooks/simple_execute.ipynb --output simple_execute.ipynb && 				python3 -m papermill simple_execute.ipynb output.ipynb > /dev/null'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1368  100  1368    0     0   6705      0 --:--:-- --:--:-- --:--:--  6738

[notice] A new release of pip is available: 24.2 -> 25.1.1
[notice] To update, run: pip install --upgrade pip
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   910  100   910    0     0   3939      0 --:--:-- --:--:-- --:--:--  3922
Input Notebook:  simple_execute.ipynb
Output Notebook: output.ipynb
Executing:   0%|          | 0/3 [00:00<?, ?cell/s]Executing notebook with kernel: python3
Executing DESC: 100%|██████████| 3/3 [00:01<00:00,  2.09cell/s]
+ '[' 0 -eq 1 ']'
+ echo '=> Container image runtime-datascience-ubi9-python-3.12 is a suitable Elyra runtime image'
=> Container image runtime-datascience-ubi9-python-3.12 is a suitable Elyra runtime image

@Nash-123 Nash-123 self-assigned this Sep 1, 2025
@openshift-ci openshift-ci bot requested review from atheo89 and dibryant September 1, 2025 18:47
Copy link

openshift-ci bot commented Sep 1, 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 atheo89 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

@Nash-123
Copy link
Author

Nash-123 commented Sep 1, 2025

/build-konflux

Copy link

openshift-ci bot commented Sep 1, 2025

@Nash-123: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/images 8ab7263 link true /test images

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@openshift-merge-robot
Copy link
Collaborator

PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants