Repository navigation
feat(nvidia): build-nvidia-drivers to rebuild NVIDIA kernel modules from sources staged in the AMI - #2859
Merged
Conversation
…rom sources staged in the AMI
Contributor
Author
|
/ci |
Contributor
Contributor
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.
Description of changes:
Refactors the NVIDIA driver build so that the kernel module build is a standalone tool,
build-nvidia-drivers, shipped in the AMI and used by the AMI build itself. The tool builds every driver tree's kernel modules for the running kernel, from sources kept in each tree.How the build is split:
helpers/nvidia-kmods.shnow only stages module sources: the dkms rpms, gdrcopy, and the GRID runfile. They go into each flavor's.sources/(replacing.rpms/, since GRID comes as a runfile).runtime/gpu/build-nvidia-drivers, installed to/usr/sbin.helpers/nvidia-userspace.sh, separate from the GRID module build.install-nvidia-drivers.shstages each tree withstage-driver-tree, then runsbuild-nvidia-drivers..sources/.This also makes it possible to rebuild the modules after a kernel change in a custom image. Note: changing system components (the kernel, NVIDIA drivers or userspace) of an EKS NVIDIA AMI is still not officially supported or recommended.
Call outs:
build-nvidia-driversmust run before the AMI first boots on an NVIDIA GPU instance, and refuses to run after that.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Testing Done
build-nvidia-drivers, then created an image and booted it on g6, g4dn and g6f. The rebuilt modules loaded, with the same results as above.