-
Notifications
You must be signed in to change notification settings - Fork 10
Handle nvidia boards in kairos-init #229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #229 +/- ##
=======================================
Coverage 66.66% 66.66%
=======================================
Files 1 1
Lines 168 168
=======================================
Hits 112 112
Misses 39 39
Partials 17 17 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
- Move all NVIDIA L4T packages from NvidiaPackages to KernelPackagesModels for AgxOrin and OrinNX models - Add CUDA, Jetson GPIO, OpenCV, and NVIDIA Container Toolkit packages to kernel packages - Remove NvidiaPackages struct entirely as all packages are now kernel-related - Update GetPackages function to remove NVIDIA-specific logic - Fix cross-compilation by ensuring ARM64 packages are selected for NVIDIA models - All NVIDIA packages are now properly categorized as kernel/firmware packages
- Add command to remove existing NVIDIA repository files prior to creating the L4T packages directory in the installation stage.
- Remove hardcoded ARM64 architecture handling for NVIDIA Jetson devices. - Update logic to use the system's architecture directly when filtering kernel packages. - This change improves cross-compilation support and streamlines package retrieval.
79c4ece to
ad6357c
Compare
- Introduced BasePackagesModels to define model-specific base packages for Ubuntu on ARM64 architecture. - Updated GetPackages function to include these model-specific packages when a non-generic model is specified.
…tu ARM64 - Expanded BasePackagesModels to include a new entry for AgxOrin with essential packages such as bridge-utils, efibootmgr, and vim. - This update enhances the package management for specific models, improving usability for users of the AgxOrin platform.
- Changed model checks from generic identifiers to full model names for NVIDIA Jetson devices in the installation stage. - This ensures accurate execution of commands specific to the nvidia-jetson-agx-orin and nvidia-jetson-orin-nx models.
| // Dockerfile.nvidia-orin-nx it says 36 :shrug:, do we actually need a | ||
| // default or should the user always set it? if we have a default, should it | ||
| // ever change? | ||
| nvidiaRelease = "35" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jordankrp I see that the default here is 35, but in https://github.com/kairos-io/kairos/blob/master/images/Dockerfile.nvidia-orin-nx#L11 it's 36, do you know why there's a difference?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We were in the midst of upgrading our JetPack version from L4T 35.3.1 to 36.4.4. So the former variables are probably leftovers from our initial setup. We re now using nvidiaRelease = "36" and nvidiaVersion = "4.4" which we can update here.
| // Dockerfile.nvidia-orin-nx it says 4.4 :shrug:, do we actually need a | ||
| // default or should the user always set it? if we have a default, should it | ||
| // ever change? | ||
| nvidiaVersion = "3.1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jordankrp I see that the default here is 3.1 but in https://github.com/kairos-io/kairos/blob/c3011d352d0648df6829352a06eb9e4b96ff1892/images/Dockerfile.nvidia-orin-nx#L12 it's 4.4, do you know why there's a difference?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same, see my comment above.
| }, | ||
| }, | ||
| { | ||
| Name: "Setup NVIDIA L4T repositories", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Itxaka I'm not sure if I'm doing this properly, can you validate? Basically, I'm trying to mimic the steps in https://github.com/kairos-io/kairos/blob/master/images/Dockerfile.nvidia-orin-nx but I couldn't find a way to say e.g.
- rm -rf /etc/apt/sources.list.d/nvidia-l4t-apt-source.list
- install base packages
- set nvidia repos
- install kernel packages in that order
nevertheless this seems to build, so maybe it's ok?
@jordankrp how strict does the order in that dockerfile need to be? 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the order is more about optimising docker caching when building a new OS image.
| type VersionMap map[string][]string | ||
|
|
||
| // BasePackagesModels allows model-specific base packages per distro/arch/model | ||
| var BasePackagesModels = ModelPackageMap{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Itxaka I added these to follow a similar approach to KernelPackagesModels, but I don't understand why we have to distinguish from Generic, IMO it would be better to be able already in KernelPackages, or BasePackages to have this granularity
| "bridge-utils", | ||
| "efibootmgr", | ||
| "fuse", | ||
| "git", | ||
| "grub2-common", | ||
| "libssl-dev", | ||
| "policykit-1", | ||
| "vim", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably not all these packages are needed and probably some can be installed based on the previous stages like GrubPackages for example
Can you validate what is a must here? @mudler
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can remove "git" and "vim" here, but I would keep the rest as kinda of useful.
Note the list was pulled directly from the images from nvidia.
| "bc", | ||
| "binutils", | ||
| "bluez", | ||
| "bridge-utils", | ||
| "bzip2", | ||
| "ca-certificates", | ||
| "can-utils", | ||
| "cloud-guest-utils", | ||
| "conntrack", | ||
| "console-data", | ||
| "console-setup", | ||
| "coreutils", | ||
| "cron", | ||
| "cryptsetup", | ||
| "curl", | ||
| "debianutils", | ||
| "default-jdk", | ||
| "dirmngr", | ||
| "dmsetup", | ||
| "dosfstools", | ||
| "dracut", | ||
| "dracut-live", | ||
| "dracut-network", | ||
| "e2fsprogs", | ||
| "efibootmgr", | ||
| "ethtool", | ||
| "fail2ban", | ||
| "fdisk", | ||
| "file", | ||
| "fuse3", | ||
| "gawk", | ||
| "gdisk", | ||
| "gettext", | ||
| "gnupg", | ||
| "gnupg1-l10n", | ||
| "gpg-agent", | ||
| "grub2-common", | ||
| "grub-efi-arm64", | ||
| "grub-efi-arm64-bin", | ||
| "grub-efi-arm64-signed", | ||
| "haveged", | ||
| "iproute2", | ||
| "iptables", | ||
| "iputils-ping", | ||
| "isc-dhcp-client", | ||
| "isc-dhcp-common", | ||
| "isc-dhcp-server", | ||
| "jq", | ||
| "kbd", | ||
| "kmod", | ||
| "lbzip2", | ||
| "less", | ||
| "libatm1", | ||
| "libglib2.0-data", | ||
| "libgpm2", | ||
| "libldap-common", | ||
| "libnss-systemd", | ||
| "libopencv-dev", | ||
| "libpam-cap", | ||
| "libqt5core5a", | ||
| "libsasl2-modules", | ||
| "libssl-dev", | ||
| "lldpd", | ||
| "logrotate", | ||
| "lvm2", | ||
| "mdadm", | ||
| "modemmanager", | ||
| "mtd-utils", | ||
| "nano", | ||
| "nbd-client", | ||
| "ncurses-term", | ||
| "netplan.io", | ||
| "net-tools", | ||
| "networkd-dispatcher", | ||
| "network-manager", | ||
| "nfs-client", | ||
| "nfs-common", | ||
| "nftables", | ||
| "open-iscsi", | ||
| "openssh-server", | ||
| "open-vm-tools", | ||
| "os-prober", | ||
| "packagekit-tools", | ||
| "parted", | ||
| "passwd", | ||
| "patch", | ||
| "pigz", | ||
| "pkg-config", | ||
| "policykit-1", | ||
| "psmisc", | ||
| "publicsuffix", | ||
| "qemu-user-static", | ||
| "rsync", | ||
| "shared-mime-info", | ||
| "shim-signed", | ||
| "snmpd", | ||
| "software-properties-common", | ||
| "squashfs-tools", | ||
| "ssh", | ||
| "sudo", | ||
| "systemd", | ||
| "systemd-container", | ||
| "systemd-sysv", | ||
| "systemd-timesyncd", | ||
| "tar", | ||
| "tpm2-tools", | ||
| "ubuntu-advantage-tools", | ||
| "udev", | ||
| "unzip", | ||
| "vim", | ||
| "wget", | ||
| "wireless-tools", | ||
| "wpasupplicant", | ||
| "xxd", | ||
| "xz-utils", | ||
| "zerofree", | ||
| "zfsutils-linux", | ||
| "zstd", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this are all the packages in https://github.com/kairos-io/kairos/blob/master/images/Dockerfile.nvidia-orin-nx I assume it can be stripped down to only the necessary ones, but I'm not sure what would those be 😅 ... I just know we probably don't need nano and vim there hehe
Opinions @jordankrp @mudler ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed this is a mix of fairly needed packages and setup-specific ones. Off the top of my head the setup-specific ones in our case (which you probably don't need here) are can-utils, default-jdk, jq, modemmanager, logrotate, zstd and parted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates the naming convention for NVIDIA Jetson board models from short names (agx-orin, orin-nx) to fully qualified names (nvidia-jetson-agx-orin, nvidia-jetson-orin-nx), and adds comprehensive support for these NVIDIA boards including L4T packages, CUDA configuration, and repository setup.
Key Changes:
- Renamed model constants to use fully qualified NVIDIA board names
- Added extensive NVIDIA L4T and CUDA package lists for both AGX Orin and Orin NX models
- Added install stage steps for NVIDIA repository setup, CUDA path configuration, and device-specific configurations
- Extended CI test matrix to include NVIDIA Jetson board builds
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| pkg/values/values.go | Updated model constant names from short form to fully qualified NVIDIA board names |
| pkg/values/packagemaps.go | Added BasePackagesModels map with NVIDIA-specific packages and extensive L4T/CUDA package lists for both board types |
| pkg/stages/steps_install.go | Added environment variable handling for L4T/board configuration and multiple install steps for NVIDIA repository setup and device configuration |
| .github/workflows/test.yml | Extended test matrix to include ARM64 builds for both NVIDIA Jetson board models |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| }, | ||
| }, | ||
| OrinNX: { | ||
| Common: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the packages are the same across all the L4T stack - would make sense to have a common piece for both the flavors (OrinNX and AGX Orin) to improve maintenance
| "grub2-common", | ||
| "libssl-dev", | ||
| "policykit-1", | ||
| "vim", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| "vim", |
| "bridge-utils", | ||
| "efibootmgr", | ||
| "fuse", | ||
| "git", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| "git", |
| // Get board model from environment or config | ||
| boardModel := os.Getenv("BOARD_MODEL") | ||
| if boardModel == "" { | ||
| // Does it make sense that both AGX Orin and Orin NX use the same board model? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eventually the main difference is how we flash and the partition layout, so it probably wouldn't matter to use the same at this stage, as long as the URL request later on doesn't complain.
relates to kairos-io/kairos#3667
Fixes #62