feat: add build-only and install-skip-build modes for VHD-prebuilt GPU kernel module#159
Draft
ganeshkumarashok wants to merge 1 commit into
Draft
Conversation
…uilt kernel module Split the host-side driver install into two phases so the NVIDIA kernel module can be DKMS-compiled into the VHD at image build time and the boot-time install can skip straight to device init: - install.sh: refactor into build_kernel_module() (compile + stage userspace libs, no device access) and device_init() (modprobe, nvidia-smi, fabric manager, containerd config, udev). Add AKSGPU_BUILD_ONLY and AKSGPU_SKIP_KERNEL_BUILD modes, an overlay cleanup trap, and a dkms-marker (/opt/azure/aks-gpu/dkms-marker) recording kernel, driver_version, driver_kind and arch so the consumer (AgentBaker CSE) can validate an exact match before taking the skip-build fast path. - entrypoint.sh: add build-only and install-skip-build actions and pass the mode through to the host via nsenter. The default install action is unchanged. This is the aks-gpu half of the AgentBaker change that prebuilds the GPU kernel module into the VHD to reduce node provisioning time. Secure Boot module signing and GPU e2e validation are still required. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
4 tasks
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
Splits the host-side NVIDIA driver install into two phases so the kernel module can be DKMS-compiled into the VHD at image build time and the boot-time install can skip straight to device init. This is the
aks-gpuhalf of an effort to cut AKS GPU node provisioning time by removing the expensive boot-time kernel-module compile.Changes
install.sh— refactored into:build_kernel_module()— compile + stage userspace libs, no device access (safe on a GPU-less builder).device_init()— modprobe,nvidia-smi, fabric manager, containerd config, udev.AKSGPU_BUILD_ONLYandAKSGPU_SKIP_KERNEL_BUILD.dkms-marker(/opt/azure/aks-gpu/dkms-marker) recordingkernel,driver_version,driver_kind,archso the consumer (AgentBaker CSE) can validate an exact match before taking the skip-build fast path.entrypoint.sh— newbuild-onlyandinstall-skip-buildactions, passed through to the host viansenter. The defaultinstallaction is unchanged.Compatibility
The default
installpath is behavior-preserving. The new actions are additive.Companion change
The consumer side lives in Azure/AgentBaker (build-time prebuild + boot-time fast path), gated behind
PREBUILD_GPU_KERNEL_MODULE(default off). This image must be published to MCR and referenced incomponents.jsonbefore that flag is enabled.Still required before production
nvidia-installer --dkmscompiles cleanly on a GPU-less builder with the exact driver/flags..komust be signed with a key the node trusts.