containers / ai-lab-recipes

Examples for building and running LLM services and applications locally with Podman
Apache License 2.0
103 stars 106 forks source link

Fix the retrieval of kernel version, release and dist #735

Closed fabiendupont closed 1 month ago

fabiendupont commented 1 month ago

During the build of the out-of-tree drivers, the base image will always have the kernel-core package installed. And the Makefile doesn't pass the KERNEL_VERSION argument to the build command. So, it's simpler to rely on the kernel-core package info.

The commands to get the KREL and KDIST were not working with RHEL 9.4 kernel. The new set of commands has been tested with ubi9/ubi:9.4 and centos/centos:stream9 based driver toolkit image and they return the correct value. For example, the values returned for the following kernels are:

The OS_VERSION_MAJOR argument is also not passed by the Makefile, but we can get it from the /etc/os-release file. I'm switching to grep+sed, because I don't want to load all the other variables.

rhatdan commented 1 month ago

LGTM