Skip to content

Conversation

@atheo89
Copy link
Member

@atheo89 atheo89 commented Nov 24, 2025

This PR prepares the ground for: https://issues.redhat.com/browse/RHAIENG-1650 as i need to specify different locations for pylocks on the konflux flavors that introduced on red-hat-data-services#1668

Description

Add additional ARGS for pylock locations and names

Related to: https://issues.redhat.com/browse/RHAIENG-2096

How Has This Been Tested?

local gmake cuda-jupyter-minimal-ubi9-python-3.12 completed successfully (for all the flavors cpu/cuda/rocm).

Self checklist (all need to be checked):

  • Ensure that you have run make test (gmake on macOS) before asking for review
  • Changes to everything except Dockerfile.konflux files should be done in odh/notebooks and automatically synced to rhds/notebooks. For Konflux-specific changes, modify Dockerfile.konflux files directly in rhds/notebooks as these require special attention in the downstream repository and flow to the upcoming RHOAI release.

Merge criteria:

  • The commits are squashed in a cohesive manner and have meaningful messages.
  • Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has manually tested the changes and verified that the changes work

Summary by CodeRabbit

  • Chores
    • Docker build configs for Jupyter updated to support configurable dependency lockfile path and name across CPU, CUDA, and ROCm images.
    • Dependency installation now uses the configurable lockfile name instead of a hardcoded filename.
    • Notebook startup script handling preserved and aligned with the new configurable lockfile behavior.

✏️ Tip: You can customize this high-level summary in your review settings.

@github-actions github-actions bot added the review-requested GitHub Bot creates notification on #pr-review-ai-ide-team slack channel label Nov 24, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 24, 2025

Walkthrough

Adds build arguments PYLOCK_PATH and PYLOCK_NAME to three minimal Dockerfiles and their build-args configs; replaces hardcoded pylock copies/uses with dynamic ${PYLOCK_PATH} -> ${PYLOCK_NAME} references and adjusts related COPY and RUN lines.

Changes

Cohort / File(s) Change Summary
Dockerfiles (minimal images)
jupyter/minimal/ubi9-python-3.12/Dockerfile.cpu, jupyter/minimal/ubi9-python-3.12/Dockerfile.cuda, jupyter/minimal/ubi9-python-3.12/Dockerfile.rocm
Added global and per-stage ARG PYLOCK_PATH and ARG PYLOCK_NAME. Replaced static pylock COPY(s) with copies using ${MINIMAL_SOURCE_CODE}${PYLOCK_PATH} -> ./${PYLOCK_NAME} (or similar) and separated start-notebook.sh COPY. Updated RUN/install steps to reference ${PYLOCK_NAME} instead of a hardcoded pylock.toml.
Build-args configs
jupyter/minimal/ubi9-python-3.12/build-args/cpu.conf, .../cuda.conf, .../rocm.conf
Added PYLOCK_PATH=/pylock.toml and PYLOCK_NAME=pylock.toml entries to each variant's build-args configuration.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Homogeneous, repetitive changes across a small set of files.
  • Review focus:
    • Confirm ARG declarations exist at both global and stage scopes as intended.
    • Verify COPY source expressions (${MINIMAL_SOURCE_CODE}${PYLOCK_PATH}) resolve to the correct build context path.
    • Ensure ${PYLOCK_NAME} is used consistently in RUN/install steps and matches the build-args values.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: adding build arguments for pylock locations and names.
Description check ✅ Passed The PR description covers all required sections with sufficient detail: objectives, description, testing approach, and completed merge criteria checklist.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7a03ce2 and cc3e106.

📒 Files selected for processing (6)
  • jupyter/minimal/ubi9-python-3.12/Dockerfile.cpu (3 hunks)
  • jupyter/minimal/ubi9-python-3.12/Dockerfile.cuda (3 hunks)
  • jupyter/minimal/ubi9-python-3.12/Dockerfile.rocm (3 hunks)
  • jupyter/minimal/ubi9-python-3.12/build-args/cpu.conf (1 hunks)
  • jupyter/minimal/ubi9-python-3.12/build-args/cuda.conf (1 hunks)
  • jupyter/minimal/ubi9-python-3.12/build-args/rocm.conf (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (3)
  • jupyter/minimal/ubi9-python-3.12/build-args/cpu.conf
  • jupyter/minimal/ubi9-python-3.12/build-args/rocm.conf
  • jupyter/minimal/ubi9-python-3.12/build-args/cuda.conf
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (9)
  • GitHub Check: Red Hat Konflux / odh-workbench-jupyter-minimal-rocm-py312-ubi9-on-pull-request
  • GitHub Check: Red Hat Konflux / odh-workbench-jupyter-minimal-cpu-py312-ubi9-on-pull-request
  • GitHub Check: Red Hat Konflux / odh-workbench-jupyter-minimal-cuda-py312-ubi9-on-pull-request
  • GitHub Check: build (jupyter-minimal-ubi9-python-3.12, 3.12, linux/s390x, false) / build
  • GitHub Check: build (rocm-jupyter-minimal-ubi9-python-3.12, 3.12, linux/amd64, false) / build
  • GitHub Check: build (jupyter-minimal-ubi9-python-3.12, 3.12, linux/ppc64le, false) / build
  • GitHub Check: build (jupyter-minimal-ubi9-python-3.12, 3.12, linux/amd64, false) / build
  • GitHub Check: build (cuda-jupyter-minimal-ubi9-python-3.12, 3.12, linux/arm64, false) / build
  • GitHub Check: build (cuda-jupyter-minimal-ubi9-python-3.12, 3.12, linux/amd64, false) / build
🔇 Additional comments (4)
jupyter/minimal/ubi9-python-3.12/Dockerfile.rocm (2)

5-6: Verify path concatenation safety in COPY and build-args config.

The ARG declarations and dynamic references are consistent across all files, but the concatenation ${MINIMAL_SOURCE_CODE}${PYLOCK_PATH} on line 95 depends on the values defined in build-args config files. If PYLOCK_PATH is /pylock.toml and MINIMAL_SOURCE_CODE is jupyter/minimal/ubi9-python-3.12, this could result in jupyter/minimal/ubi9-python-3.12/pylock.toml (correct) or jupyter/minimal/ubi9-python-3.12//pylock.toml (double slash, if not carefully defined).

Confirm the build-args config files (e.g., build-args/rocm.conf) define PYLOCK_PATH without leading slash (e.g., PYLOCK_PATH=pylock.toml or PYLOCK_PATH=/subdir/pylock.toml without extra separators) to ensure proper path construction.

Also applies to: 68-69, 95-99, 104-104


95-99: Approve COPY and RUN updates.

The split of COPY into two operations (pylock file + start-notebook.sh) is clean, and the dynamic substitution in both the COPY and RUN commands aligns with the parameterization goal. Comment on line 98 correctly reflects the implementation.

jupyter/minimal/ubi9-python-3.12/Dockerfile.cpu (1)

5-6: Consistency confirmed with CPU variant.

ARG declarations, COPY split, and RUN updates follow the same parameterization pattern as Dockerfile.rocm. All changes are consistent and correct.

Also applies to: 71-72, 98-99, 107-107

jupyter/minimal/ubi9-python-3.12/Dockerfile.cuda (1)

7-8: Consistency confirmed with CUDA variant.

ARG declarations, COPY split, and RUN updates are consistent across all three Dockerfile variants. The parameterization is properly implemented with correct variable scoping and substitution.

Also applies to: 70-71, 97-98, 106-106


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@openshift-ci openshift-ci bot added size/m and removed size/m labels Nov 24, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (3)
jupyter/minimal/ubi9-python-3.12/Dockerfile.cpu (1)

5-6: Consider adding default values for safety.

The ARG declarations enable the parameterization correctly. However, consider adding default values to prevent build failures if the build-args are not passed:

-ARG PYLOCK_PATH
-ARG PYLOCK_NAME
+ARG PYLOCK_PATH=/pylock.toml
+ARG PYLOCK_NAME=pylock.toml
jupyter/minimal/ubi9-python-3.12/Dockerfile.cuda (1)

7-8: Consider adding default values for safety.

Same recommendation as Dockerfile.cpu: add default values to ARGs to prevent build failures if build-args are not provided.

-ARG PYLOCK_PATH
-ARG PYLOCK_NAME
+ARG PYLOCK_PATH=/pylock.toml
+ARG PYLOCK_NAME=pylock.toml
jupyter/minimal/ubi9-python-3.12/Dockerfile.rocm (1)

5-6: Consider adding default values for safety.

Same recommendation as the other Dockerfiles: add default values to prevent build failures if build-args are not provided.

-ARG PYLOCK_PATH
-ARG PYLOCK_NAME
+ARG PYLOCK_PATH=/pylock.toml
+ARG PYLOCK_NAME=pylock.toml
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6c5ecb1 and 5d55ea5.

📒 Files selected for processing (6)
  • jupyter/minimal/ubi9-python-3.12/Dockerfile.cpu (3 hunks)
  • jupyter/minimal/ubi9-python-3.12/Dockerfile.cuda (3 hunks)
  • jupyter/minimal/ubi9-python-3.12/Dockerfile.rocm (3 hunks)
  • jupyter/minimal/ubi9-python-3.12/build-args/cpu.conf (1 hunks)
  • jupyter/minimal/ubi9-python-3.12/build-args/cuda.conf (1 hunks)
  • jupyter/minimal/ubi9-python-3.12/build-args/rocm.conf (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: build (cuda-jupyter-minimal-ubi9-python-3.12, 3.12, linux/amd64, false) / build
  • GitHub Check: build (cuda-jupyter-minimal-ubi9-python-3.12, 3.12, linux/arm64, false) / build
  • GitHub Check: build (rocm-jupyter-minimal-ubi9-python-3.12, 3.12, linux/amd64, false) / build
  • GitHub Check: build (jupyter-minimal-ubi9-python-3.12, 3.12, linux/s390x, false) / build
  • GitHub Check: build (jupyter-minimal-ubi9-python-3.12, 3.12, linux/ppc64le, false) / build
  • GitHub Check: build (jupyter-minimal-ubi9-python-3.12, 3.12, linux/amd64, false) / build
🔇 Additional comments (12)
jupyter/minimal/ubi9-python-3.12/build-args/rocm.conf (1)

2-3: LGTM! Consistent parameterization across flavors.

The PYLOCK_PATH and PYLOCK_NAME configuration is consistent with the cpu.conf and cuda.conf variants, enabling future differentiation of pylock files for konflux builds while maintaining current behavior.

jupyter/minimal/ubi9-python-3.12/build-args/cpu.conf (1)

3-4: LGTM! Consistent configuration.

The build arguments are correctly configured and consistent with the other flavor configurations.

jupyter/minimal/ubi9-python-3.12/build-args/cuda.conf (1)

2-3: LGTM! Configuration is consistent.

Build arguments match the pattern established in cpu.conf and rocm.conf.

jupyter/minimal/ubi9-python-3.12/Dockerfile.cpu (3)

71-72: LGTM! Correct ARG re-declaration in stage.

The ARGs are correctly re-declared in the jupyter-minimal stage to make them available after the FROM instruction.


107-107: LGTM! Install command correctly uses dynamic pylock reference.

The pip install command properly references the pylock file via ${PYLOCK_NAME}, maintaining consistency with the parameterized COPY command.


98-99: Verification confirmed: pylock.toml file exists at expected location.

The parameterized path concatenation ${MINIMAL_SOURCE_CODE}${PYLOCK_PATH} correctly constructs jupyter/minimal/ubi9-python-3.12/pylock.toml (413K, verified Nov 24 13:34). The COPY commands will execute successfully.

jupyter/minimal/ubi9-python-3.12/Dockerfile.cuda (3)

70-71: LGTM! Correct stage-level ARG declarations.


97-98: LGTM! Parameterized COPY implementation is consistent.

The dynamic pylock handling matches the pattern in Dockerfile.cpu.


106-106: LGTM! Install command correctly parameterized.

jupyter/minimal/ubi9-python-3.12/Dockerfile.rocm (3)

68-69: LGTM! Correct ARG re-declarations.


95-96: LGTM! Consistent parameterized implementation.

The COPY commands match the pattern established in the cpu and cuda variants.


104-104: LGTM! Install command correctly parameterized.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 24, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jiridanek

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

The pull request process is described 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

@jiridanek
Copy link
Member

makes sense, should work
/lgtm

@openshift-ci openshift-ci bot added size/m and removed size/m labels Nov 24, 2025
@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD 6c5ecb1 and 2 for PR HEAD cc3e106 in total

@jiridanek
Copy link
Member

@atheo89 do we close this PR, given the apicc phase 2 postponement, or do you think it is still better to go ahead with it and merge? I'm fine either way, although I slightly prefer closing.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 24, 2025

@atheo89: The following tests 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/notebook-cuda-jupyter-ubi9-python-3-12-pr-image-mirror cc3e106 link true /test notebook-cuda-jupyter-ubi9-python-3-12-pr-image-mirror
ci/prow/notebook-rocm-jupyter-ubi9-python-3-12-pr-image-mirror cc3e106 link true /test notebook-rocm-jupyter-ubi9-python-3-12-pr-image-mirror
ci/prow/notebook-jupyter-ubi9-python-3-12-pr-image-mirror cc3e106 link true /test notebook-jupyter-ubi9-python-3-12-pr-image-mirror
ci/prow/notebooks-py312-ubi9-e2e-tests cc3e106 link true /test notebooks-py312-ubi9-e2e-tests
ci/prow/images cc3e106 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.

@atheo89
Copy link
Member Author

atheo89 commented Nov 25, 2025

Ok, we will reopen it once we re-initialize this work.

@atheo89 atheo89 closed this Nov 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved lgtm review-requested GitHub Bot creates notification on #pr-review-ai-ide-team slack channel size/m

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants