-
Notifications
You must be signed in to change notification settings - Fork 82
add support for rocky8 and rocky10 #688
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,6 +16,7 @@ dep_installer () { | |
| glibc \ | ||
| make \ | ||
| cpio \ | ||
| file \ | ||
|
tariq1890 marked this conversation as resolved.
|
||
| kmod | ||
| elif [ "$DRIVER_ARCH" = "ppc64le" ]; then | ||
| dnf install -y \ | ||
|
|
@@ -26,6 +27,7 @@ dep_installer () { | |
| glibc \ | ||
| make \ | ||
| cpio \ | ||
| file \ | ||
| kmod | ||
| elif [ "$DRIVER_ARCH" = "aarch64" ]; then | ||
| dnf install -y \ | ||
|
|
@@ -36,35 +38,66 @@ dep_installer () { | |
| glibc \ | ||
| make \ | ||
| cpio \ | ||
| file \ | ||
| kmod | ||
| fi | ||
|
|
||
| # Download unzboot as kernel images are compressed in the zboot format on RHEL 9 arm64 | ||
| if ! dnf install -y 'dnf-command(config-manager)'; then | ||
| dnf install -y dnf5-plugins | ||
| fi | ||
|
|
||
| OS_RELEASE_ID=$(grep -oP '(?<=^ID=).+' /etc/os-release | tr -d '"') | ||
| if [ "$OS_RELEASE_ID" = "rocky" ]; then | ||
| dnf config-manager --set-enabled crb | ||
| elif [ "$OS_RELEASE_ID" = "rhel" ]; then | ||
| dnf config-manager --set-enabled codeready-builder-for-rhel-10-${DRIVER_ARCH}-rpms || true | ||
| fi | ||
|
|
||
| # Download unzboot as kernel images are compressed in the zboot format on RHEL 10 arm64 | ||
| # unzboot is only available on the EPEL RPM repo | ||
| rpm --import https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-10 | ||
| dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-10.noarch.rpm | ||
| dnf config-manager --enable epel | ||
|
|
||
| # Try to install unzboot, but continue if not available (only in EPEL 10.2+) | ||
| if ! dnf install -y unzboot 2>/dev/null; then | ||
| echo "Warning: unzboot package not available in current EPEL version (requires EPEL 10.2+)" | ||
| echo "Attempting to build unzboot from source..." | ||
|
|
||
| # Install meson build dependencies | ||
| dnf install -y git gcc meson ninja-build glib2-devel zlib-devel libzstd-devel || true | ||
| git clone https://github.com/eballetbo/unzboot.git 2>/dev/null | ||
| cd unzboot | ||
| if meson setup build && meson compile -C build; then | ||
| echo "Successfully built unzboot from source" | ||
| cp build/unzboot /usr/bin/unzboot | ||
| chmod +x /usr/bin/unzboot | ||
| else | ||
| echo "Warning: Failed to build unzboot from source. Kernel extraction may fall back to gunzip methods." | ||
| if [ "$DRIVER_ARCH" = "aarch64" ]; then | ||
| rpm --import https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-10 | ||
| dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-10.noarch.rpm | ||
| dnf config-manager --enable epel | ||
| # Try to install unzboot from EPEL. If it is not available yet, build it | ||
| # from source because RHEL/Rocky 10 arm64 kernel images require it. | ||
| if ! dnf install -y unzboot; then | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. non-blocking. Let's factor this out into its own method. Can be done in a follow-up PR |
||
| echo "unzboot package not available in current EPEL version; building from source." | ||
|
|
||
| # Install meson build dependencies | ||
| if dnf install -y git gcc meson ninja-build glib2-devel zlib-devel libzstd-devel; then | ||
| if command -v meson >/dev/null 2>&1 && command -v ninja >/dev/null 2>&1; then | ||
| if git clone https://github.com/eballetbo/unzboot.git /tmp/unzboot-src 2>/dev/null; then | ||
| if meson setup /tmp/unzboot-src/build /tmp/unzboot-src && meson compile -C /tmp/unzboot-src/build; then | ||
| cp /tmp/unzboot-src/build/unzboot /usr/bin/unzboot | ||
| chmod +x /usr/bin/unzboot | ||
| runtime_pkgs=$(ldd /usr/bin/unzboot | awk '/=> \// { print $3 } /^\// { print $1 }' | xargs -r rpm -q --whatprovides | sort -u) | ||
| if [ -n "$runtime_pkgs" ]; then | ||
| dnf install -y $runtime_pkgs | ||
| fi | ||
| echo "Built and installed unzboot from source" | ||
| else | ||
| echo "Error: Failed to build unzboot from source." >&2 | ||
| rm -rf /tmp/unzboot-src | ||
| return 1 | ||
| fi | ||
| rm -rf /tmp/unzboot-src | ||
| else | ||
| echo "Error: Unable to clone unzboot source." >&2 | ||
| return 1 | ||
| fi | ||
| else | ||
| echo "Error: meson or ninja not available." >&2 | ||
| return 1 | ||
| fi | ||
|
|
||
| dnf remove -y git meson ninja-build glib2-devel zlib-devel libzstd-devel || true | ||
| dnf autoremove -y || true | ||
| else | ||
| echo "Error: Could not install build dependencies for unzboot." >&2 | ||
| return 1 | ||
| fi | ||
| fi | ||
| cd .. | ||
| rm -rf unzboot | ||
| dnf remove -y git meson ninja-build glib2-devel zlib-devel libzstd-devel || true | ||
| dnf autoremove -y || true | ||
| fi | ||
| rm -rf /var/cache/yum/* | ||
| } | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Non-blocking: Let's move to the upstream rocky base images like how we do for
rhelandubuntuThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be done in a follow-up PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was taking a look at them but it looks like they don't update them too frequently. Plus, rocky had two different publishers on github, so we need to decide which one to use for ubi images there. I'll create a separate ticket to track this work and we can do it as needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI, the rocky CUDA base images seem to use the DockerHub image. See here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, this is the image repo in DockerHub which gets the frequent updates
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I was reading this reddit yesterday: https://www.reddit.com/r/RockyLinux/comments/1d457dj/question_about_container_images_what_is_the/
They don't update as frequently as rhel though :-)
Filed this enhancement issue for this. #764
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, but the RHEL cadence is orthogonal here, yes? The upstream RockyLinux base image is updated more frequently than the CUDA base counterpart, so we still end up benefiting from the move to the upstream base image.