Build images for Flatcar#1
Conversation
0754535 to
87bd129
Compare
Signed-off-by: Robin Schneider <mail@robinschneider.dev>
87bd129 to
82e64e5
Compare
chewi
left a comment
There was a problem hiding this comment.
Looks good! I haven't gone over it too closely, as I've seen it basically work before, and I know most of it is based on NVIDIA's code anyway.
One thought though. I don't think any of this depends on anything outside the flatcar directory. Maintenance would be far simpler if we just put these files at the top-level of an empty repo. What do you think?
| @@ -0,0 +1,151 @@ | |||
| # Copyright 2026 NVIDIA CORPORATION | |||
There was a problem hiding this comment.
Didn't you write this? Or AI did? Or it's heavily based on theirs?
There was a problem hiding this comment.
It is not heavily based on theirs, I am unsure if we should drop the license header or not, other files I introduced have no license header.
I changed it to Flatcar Maintainers here.
Not sure how to deal with that.
There was a problem hiding this comment.
If you're unsure, it's common to include both.
|
|
||
| env: | ||
| CUDA_VERSION: 13.0.1 | ||
| IMAGE_NAME: ghcr.io/${{ github.repository_owner }}/driver |
There was a problem hiding this comment.
Don't we want a less ambiguous image name?
There was a problem hiding this comment.
I am aware, but that way the CI works for my fork as well to test builds, but we can change it.
| # Since kernel 6.12 the vermagic (and other module boilerplate) lives in a | ||
| # separate module-common object that kbuild only links into the final .ko | ||
| # during the modfinal stage. Merge it into the kernel interfaces before | ||
| # packing, otherwise modules relinked from the precompiled interfaces lack | ||
| # vermagic and the kernel rejects them with "Invalid module format". |
That way we should also be able to move it to the flatcar org, right? |
I like the idea, then we could also host it in the flatcar org instead. |
|
I guess keeping the name would help users. It is unlikely we would need anything like this for any other GPU. |
|
@chewi @t-lo I created a new repo here and created a PR there: flatcar/gpu-driver-container#1 |
This PR adds support for Flatcar for the Nvidia GPU operator.
It features both pre-compiled images as well as a built container to build the driver image at runtime for arbitrary Flatcar releases.
Both image versions provide support for the fabric manager, required for multi GPU nodes such as HGX H100 with 4 or 8 GPUs on a single board.
All images are built using GItHub Actions and published to
ghcr.io.Fixes flatcar/Flatcar#1928 flatcar/Flatcar#1962
Testing
build container (driver compiled at runtime)
Deploy the GPU operator with the base image tag (the operator appends the
-flatcar<VERSION_ID>suffix derived from the node labels):The driver container downloads the Flatcar kernel sources and compiles the kernel
modules on the node. This is visible in the driver pod logs (takes a few minutes):
pre-compiled image
The pre-compiled image ships kernel modules built for one specific Flatcar release
(tag suffix
flatcar<VERSION_ID>, e.g.flatcar4593.2.0/ kernel6.12.81-flatcar).Deploy it by using the version prefix without the
-flatcarsuffix:That the pre-compiled path is actually used (no download, no compilation) can be
verified in the driver pod logs — the packaged kernel interface is matched against
the running kernel's
/proc/versionand installed directly, the pod becomes Readywithin seconds:
If the node runs a Flatcar release that does not match the image, the container
falls back to building the modules at runtime (same behavior as the build container).
fabric manager (NVSwitch systems, e.g. HGX H100 8-GPU)
On NVSwitch based nodes the driver container detects the switch devices
(
/proc/driver/nvidia-nvswitch/devices) and starts the NVIDIA Fabric Managerautomatically — with both image types:
A successfully initialized fabric is reported by
nvidia-smi:Verified on an HGX H100 8-GPU node (Flatcar 4593.2.0): all 8 GPUs visible via
nvidia-smi -L, CUDA validator pods complete,cuda-vectoraddsample passes.On nodes without NVSwitch (e.g. L40S) the fabric manager start is skipped.
Example workload
Applies to both image types — schedule a CUDA sample on a GPU node: