Skip to content

fix(docker): pre-install test deps so dnf removal doesn't break test_image.sh - #1627

Merged
rapids-bot[bot] merged 1 commit into
mainfrom
fix/docker-test-image-dnf-not-found
Jul 27, 2026
Merged

fix(docker): pre-install test deps so dnf removal doesn't break test_image.sh#1627
rapids-bot[bot] merged 1 commit into
mainfrom
fix/docker-test-image-dnf-not-found

Conversation

@ramakrishnap-nv

@ramakrishnap-nv ramakrishnap-nv commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

test_image.sh calls dnf install at CI test time, but the cuopt-final Dockerfile stage was removing the entire RPM stack (rpm -e --nodeps dnf rpm curl ...), leaving no way to install packages at runtime.

Remove the rpm-erase block so dnf stays in the image. CVE risk from retained packages (curl, dnf, rpm, python3-libs) is tracked separately for security approval.

@copy-pr-bot

copy-pr-bot Bot commented Jul 27, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@ramakrishnap-nv ramakrishnap-nv self-assigned this Jul 27, 2026
@ramakrishnap-nv ramakrishnap-nv added bug Something isn't working non-breaking Introduces a non-breaking change labels Jul 27, 2026
@ramakrishnap-nv
ramakrishnap-nv marked this pull request as ready for review July 27, 2026 18:34
@ramakrishnap-nv
ramakrishnap-nv requested a review from a team as a code owner July 27, 2026 18:34
@github-actions

Copy link
Copy Markdown

CI Test Summary

⏭️ All 5 test job(s) skipped.

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The UBI Dockerfile now runs Python alternatives registration in a separate command from the RPM package-manager cleanup.

Changes

Python alternatives registration

Layer / File(s) Summary
Separate alternatives setup from RPM cleanup
ci/docker/Dockerfile.ubi
Moves Python 3.14 and Python 3 alternatives registration into a standalone RUN block outside the rpm -e --nodeps cleanup command.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Suggested reviewers: jameslamb, afender, bdice

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title is related to the Dockerfile and dnf/test_image.sh behavior, though it emphasizes a different aspect than the implemented change.
Description check ✅ Passed The description is about the same Docker image and dnf removal issue, so it is related to the changeset.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/docker-test-image-dnf-not-found

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

… deps

The cuopt-final stage was removing the entire RPM stack (dnf, rpm, curl,
etc.) for attack-surface reduction, but this broke test_image.sh which
calls `dnf install` at CI test time to install file/bzip2/gcc/wget/unzip.
Since rpm is fully erased there is no way to reinstall or fix dnf at
runtime.

Remove the rpm-erase block so dnf stays in the image. CVE risk from
retained packages (curl, dnf, rpm, python3-libs) will be tracked
separately for security approval. Register python/python3 via alternatives
directly (no longer needs to be deferred until after rpm %postun).

Signed-off-by: Ramakrishna Prabhu <ramakrishnap@nvidia.com>
@ramakrishnap-nv
ramakrishnap-nv force-pushed the fix/docker-test-image-dnf-not-found branch from b2328af to c251c2f Compare July 27, 2026 18:54
@ramakrishnap-nv

Copy link
Copy Markdown
Collaborator Author

/merge

@rapids-bot
rapids-bot Bot merged commit 91134a2 into main Jul 27, 2026
22 checks passed
@ramakrishnap-nv
ramakrishnap-nv deleted the fix/docker-test-image-dnf-not-found branch September 9, 2026 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working non-breaking Introduces a non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants