Skip to content

(feat): Update dockerfile to support multi-arch images#412

Merged
openshift-merge-bot[bot] merged 1 commit intoopendatahub-io:mainfrom
AjayJagan:konflux-dockerfile-update
Jul 8, 2025
Merged

(feat): Update dockerfile to support multi-arch images#412
openshift-merge-bot[bot] merged 1 commit intoopendatahub-io:mainfrom
AjayJagan:konflux-dockerfile-update

Conversation

@AjayJagan
Copy link
Copy Markdown
Member

@AjayJagan AjayJagan commented Jul 3, 2025

Description

In order to support multi-arch builds in konflux, we need some updates in the Dockerfile.
The issue we are trying to solve is:
caikit uses psutil version 5 which doesn't have python wheel support. The support starts at giampaolo/psutil#1782 (comment). Hence building from source by installing some devel tools.

JIRA: https://issues.redhat.com/browse/RHOAIENG-28782

How Has This Been Tested?

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
    • Updated the build environment to include additional system packages for improved compatibility during installation.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Jul 3, 2025

Walkthrough

The Dockerfile was updated to add gcc and python3.11-devel packages to the poetry-builder stage, enhancing the build environment with a C compiler and Python development headers. No other modifications or changes to the build process or exported entities were made.

Changes

File Change Summary
Dockerfile Added gcc and python3.11-devel to the list of installed packages in the poetry-builder stage.

Poem

In Docker’s den, new tools arrive—
gcc and headers now help us thrive.
With code to compile and wheels to spin,
Our builder’s ready, let work begin!
🐇✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 92d7e96 and a2230a2.

📒 Files selected for processing (1)
  • Dockerfile (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Build image
🔇 Additional comments (1)
Dockerfile (1)

5-6: Verify availability of python3.11-devel across all target architectures

python3.11-devel is required to compile psutil but is not shipped for every architecture in the UBI 9 repos (e.g., often only python3-devel is multi-arch). If the package is missing for arm64/ppc64le/s390x, the build will fail and negate the multi-arch goal.

Action items
• Double-check that microdnf install python3.11-devel resolves on every arch you plan to publish.
• If not, fall back to python3-devel or gate the install on $TARGETARCH.

Example conditional install snippet:

RUN microdnf -y update && \
    if [ "$TARGETARCH" = "x86_64" ]; then \
        microdnf -y install gcc python3.11-devel git shadow-utils python3.11-pip python-wheel ; \
    else \
        microdnf -y install gcc python3-devel    git shadow-utils python3.11-pip python-wheel ; \
    fi && \
    pip3.11 install --no-cache-dir --upgrade pip wheel && \
    microdnf clean all

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@openshift-ci openshift-ci bot requested review from Xaenalt and heyselbi July 3, 2025 19:41
@AjayJagan
Copy link
Copy Markdown
Member Author

@grdryn ^

@AjayJagan
Copy link
Copy Markdown
Member Author

/cc @vaibhavjainwiz

@openshift-ci openshift-ci bot requested a review from vaibhavjainwiz July 8, 2025 05:28
@vaibhavjainwiz
Copy link
Copy Markdown
Member

/approve

@vaibhavjainwiz
Copy link
Copy Markdown
Member

/lgtm

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Jul 8, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: AjayJagan, vaibhavjainwiz

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

The pull request process is described here

Details 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

@openshift-ci openshift-ci bot added the approved label Jul 8, 2025
@openshift-ci openshift-ci bot added the lgtm label Jul 8, 2025
@openshift-merge-bot openshift-merge-bot bot merged commit ea72080 into opendatahub-io:main Jul 8, 2025
8 checks passed
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