Skip to content

packages: add nvidia-dra-driver-gpu - #1035

Open
maherthomsi wants to merge 2 commits into
bottlerocket-os:developfrom
maherthomsi:dra-changes
Open

packages: add nvidia-dra-driver-gpu#1035
maherthomsi wants to merge 2 commits into
bottlerocket-os:developfrom
maherthomsi:dra-changes

Conversation

@maherthomsi

@maherthomsi maherthomsi commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Description of changes:
Adds the nvidia-dra-driver-gpu package, which builds the NVIDIA GPU DRA driver (gpu-kubelet-plugin) and installs it as a host systemd service. The package is added to the bottlerocket-core-kit workspace and included in the kit manifest so it is available to consuming variants.

Bump settings sdk for this change to include bottlerocket-os/bottlerocket-settings-sdk#148

Testing done:

  • Built the kits for x86_64 and aarch64
  • Launched a custom ami with the driver added to the variant and ensured that the DRA driver was loaded.
    • Tested on aarch64
    • Tested on x86_64

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

Comment thread packages/nvidia-dra-driver-gpu/nvidia-dra-driver-gpu.spec Outdated
Comment thread packages/nvidia-dra-driver-gpu/nvidia-dra-driver-gpu.spec Outdated
Comment thread packages/nvidia-dra-driver-gpu/nvidia-dra-driver-gpu.spec Outdated
Comment thread packages/nvidia-dra-driver-gpu/nvidia-dra-driver-gpu.spec Outdated
Comment thread packages/nvidia-dra-driver-gpu/nvidia-dra-driver-gpu.spec Outdated
Comment thread packages/nvidia-dra-driver-gpu/nvidia-dra-driver-gpu.service Outdated
Comment thread packages/nvidia-dra-driver-gpu/nvidia-dra-driver-gpu-exec-start-conf Outdated
@maherthomsi

Copy link
Copy Markdown
Contributor Author

Added settings-sdk changes to this PR

@maherthomsi
maherthomsi force-pushed the dra-changes branch 4 times, most recently from 63c65b5 to 5dc5941 Compare September 11, 2026 22:06
@maherthomsi

maherthomsi commented Sep 11, 2026

Copy link
Copy Markdown
Contributor Author

Addresses review feedback on the nvidia-dra-driver-gpu package:

  • spec: add Requires: %{_cross_os}nvidia-container-toolkit - the rendered unit invokes /usr/bin/nvidia-cdi-hook, which that package ships.
  • service (base unit): replace the ExecStart=/usr/bin/false + Type=simple + Restart=always placeholder with an inert no-op (Type=oneshot, RemainAfterExit=true, ExecStart=/usr/bin/true). It no longer retries forever / logs to console before the drop-in renders, and the ExecStartPre checks are no longer duplicated between the base unit and the drop-in.
  • exec-start-conf (drop-in): reference the optional settings.kubernetes.hostname-override only inside {{#if_not_null}}, so an unset value no longer fails the strict render. Move the daemon's Type=simple/Restart=always/RestartSec/RemainAfterExit=false into the enabled branch (previously inherited from the base) and drop the redundant {{else}} branch since the inert base now covers the disabled/unset case.

Comment on lines +30 to +33
# --image-name is only used to render MPS control-daemon pods; MPS is alpha and
# disabled by default, and an empty string satisfies the required flag.
# --healthcheck-port -1 disables the gRPC healthcheck service: any negative
# value short-circuits startHealthcheck before it creates a listener.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: they should go on top of the flags they reference.

@@ -0,0 +1,18 @@
[Unit]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should mimic what the kubelet-device-plugin does:

  • Provide a unit that just works - with the drop-in for the host name
  • Provide an override that runs true when disabled
  • And in the same template, provide the "enabled" case and run the unit

Add the nvidia-dra-driver-gpu package, which builds the NVIDIA GPU DRA
driver (gpu-kubelet-plugin) and installs it as a host systemd service.
Include it in the bottlerocket-core-kit workspace and kit manifest.

Signed-off-by: Maher Homsi <maherhom@amazon.com>
Signed-off-by: Maher Homsi <maherhom@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants