Skip to content
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

RHELAI-473: Adding rhel ai version #665

Merged
merged 1 commit into from
Jul 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions training/common/Makefile.common
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ CONTAINER_TOOL_EXTRA_ARGS ?=
EXTRA_RPM_PACKAGES ?=
GRAPH_ROOT=$(shell podman info --format '{{ .Store.GraphRoot }}')
UMASK=$(shell umask)
IMAGE_VERSION := $(or ${IMAGE_VERSION},$(shell git rev-parse --short HEAD))

AUTH_JSON ?=

Expand Down
5 changes: 5 additions & 0 deletions training/nvidia-bootc/Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ COPY --from=builder --chmod=444 /home/builder/yum-packaging-precompiled-kmod/tmp
# Temporary workaround until the permanent fix for libdnf is merged
COPY nvidia-toolkit-firstboot.service /usr/lib/systemd/system/nvidia-toolkit-firstboot.service

ARG IMAGE_VERSION

# TODO: rework this monstrosity into a build.sh (or even not shell script)
# The need for the `cp /etc/dnf/dnf.conf` is a workaround for https://github.com/containers/bootc/issues/637
RUN mv /etc/selinux /etc/selinux.tmp \
Expand Down Expand Up @@ -146,6 +148,9 @@ RUN mv /etc/selinux /etc/selinux.tmp \
# Install rhc connect for insights telemetry gathering
&& . /etc/os-release && if [ "${ID}" == "rhel" ]; then \
dnf install -y rhc rhc-worker-playbook; \
sed -i -e "/^VARIANT=/ {s/^VARIANT=.*/VARIANT=\"RHEL AI\"/; t}" -e "\$aVARIANT=\"RHEL AI\"\"" /etc/os-release;
Copy link
Contributor

Choose a reason for hiding this comment

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

amd, intel?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will do in next PR, in anycase GA is nvidia.

sed -i -e "/^VARIANT_ID=/ {s/^VARIANT_ID=.*/VARIANT_ID=rhel_ai/; t}" -e "\$aVARIANT_ID=rhel_ai" /etc/os-release;
sed -i -e "/^BUILD_ID=/ {s/^BUILD_ID=.*/BUILD_ID='${IMAGE_VERSION}'/; t}" -e "\$aBUILD_ID='${IMAGE_VERSION}'" /etc/os-release;
fi \
&& dnf clean all \
&& ln -s ../cloud-init.target /usr/lib/systemd/system/default.target.wants \
Expand Down
2 changes: 2 additions & 0 deletions training/nvidia-bootc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ bootc: driver-toolkit check-sshkey prepare-files
$(DRIVER_TOOLKIT_IMAGE:%=--build-arg DRIVER_TOOLKIT_IMAGE=%) \
$(DRIVER_VERSION:%=--build-arg DRIVER_VERSION=%) \
$(DRIVER_VERSION:%=--label driver-version=%) \
$(IMAGE_VERSION:%=--label image_version=%) \
$(IMAGE_VERSION:%=--build-arg IMAGE_VERSION=%) \
$(EXTRA_RPM_PACKAGES:%=--build-arg EXTRA_RPM_PACKAGES=%) \
$(FROM:%=--build-arg BASEIMAGE=%) \
$(INSTRUCTLAB_IMAGE:%=--build-arg INSTRUCTLAB_IMAGE=%) \
Expand Down