diff --git a/training/common/driver-toolkit/Containerfile b/training/common/driver-toolkit/Containerfile index 64e07da5..eac5a02c 100644 --- a/training/common/driver-toolkit/Containerfile +++ b/training/common/driver-toolkit/Containerfile @@ -8,9 +8,8 @@ ARG ENABLE_RT='' USER root RUN if [ "${KERNEL_VERSION}" == "" ]; then \ - NEWER_KERNEL_CORE=$(dnf info kernel-core | awk -F: '/^Source/{gsub(/.src.rpm/, "", $2); print $2}' | sort -n | tail -n1) \ - && RELEASE=$(dnf info ${NEWER_KERNEL_CORE} | awk -F: '/^Release/{print $2}' | tr -d '[:blank:]') \ - && VERSION=$(dnf info ${NEWER_KERNEL_CORE} | awk -F: '/^Version/{print $2}' | tr -d '[:blank:]') \ + RELEASE=$(dnf info --installed kernel-core | awk -F: '/^Release/{print $2}' | tr -d '[:blank:]') \ + && VERSION=$(dnf info --installed kernel-core | awk -F: '/^Version/{print $2}' | tr -d '[:blank:]') \ && export KERNEL_VERSION="${VERSION}-${RELEASE}" ;\ fi \ && echo "${KERNEL_VERSION}" \ diff --git a/training/nvidia-bootc/Containerfile b/training/nvidia-bootc/Containerfile index 790e253d..bb96bfd4 100644 --- a/training/nvidia-bootc/Containerfile +++ b/training/nvidia-bootc/Containerfile @@ -23,9 +23,8 @@ WORKDIR /home/builder COPY --chown=1001:0 x509-configuration.ini x509-configuration.ini RUN if [ "${KERNEL_VERSION}" == "" ]; then \ - NEWER_KERNEL_CORE=$(dnf info kernel-core | awk -F: '/^Source/{gsub(/.src.rpm/, "", $2); print $2}' | sort -n | tail -n1) \ - && RELEASE=$(dnf info ${NEWER_KERNEL_CORE} | awk -F: '/^Release/{print $2}' | tr -d '[:blank:]') \ - && VERSION=$(dnf info ${NEWER_KERNEL_CORE} | awk -F: '/^Version/{print $2}' | tr -d '[:blank:]') \ + RELEASE=$(dnf info --installed kernel-core | awk -F: '/^Release/{print $2}' | tr -d '[:blank:]') \ + && VERSION=$(dnf info --installed kernel-core | awk -F: '/^Version/{print $2}' | tr -d '[:blank:]') \ && export KERNEL_VERSION="${VERSION}-${RELEASE}" ;\ fi \ && if [ "${OS_VERSION_MAJOR}" == "" ]; then \