Skip to content

Commit

Permalink
Merge pull request bottlerocket-os#4182 from arnaldo2792/nvidia-api-kit
Browse files Browse the repository at this point in the history
Add NVIDIA APIs
  • Loading branch information
arnaldo2792 authored Sep 12, 2024
2 parents 87b283c + d3d8b35 commit 26ec2cc
Show file tree
Hide file tree
Showing 25 changed files with 380 additions and 48 deletions.
8 changes: 7 additions & 1 deletion Release.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = "1.22.0"
version = "1.23.0"

[migrations]
"(0.3.1, 0.3.2)" = ["migrate_v0.3.2_admin-container-v0-5-0.lz4"]
Expand Down Expand Up @@ -344,3 +344,9 @@ version = "1.22.0"
"migrate_v1.22.0_bootstrap-commands-settings.lz4",
"migrate_v1.22.0_bootstrap-commands-metadata.lz4",
]
"(1.22.0, 1.23.0)" = [
"migrate_v1.23.0_kubelet-device-plugins-metadata.lz4",
"migrate_v1.23.0_kubelet-device-plugins-settings.lz4",
"migrate_v1.23.0_nvidia-container-runtime-metadata.lz4",
"migrate_v1.23.0_nvidia-container-runtime-settings.lz4",
]
2 changes: 1 addition & 1 deletion Twoliter.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
schema-version = 1
release-version = "1.22.0"
release-version = "1.23.0"

[vendor.bottlerocket]
registry = "public.ecr.aws/bottlerocket"
Expand Down
48 changes: 38 additions & 10 deletions packages/settings-plugins/settings-plugins.spec
Original file line number Diff line number Diff line change
Expand Up @@ -57,28 +57,39 @@ Summary: Settings plugin for the aws-k8s variants
Requires: %{_cross_os}variant-family(aws-k8s)
Provides: %{_cross_os}settings-plugin(any)
Provides: %{_cross_os}settings-plugin(aws-k8s-1.23)
Provides: %{_cross_os}settings-plugin(aws-k8s-1.23-nvidia)
Provides: %{_cross_os}settings-plugin(aws-k8s-1.24)
Provides: %{_cross_os}settings-plugin(aws-k8s-1.24-nvidia)
Provides: %{_cross_os}settings-plugin(aws-k8s-1.25)
Provides: %{_cross_os}settings-plugin(aws-k8s-1.25-nvidia)
Provides: %{_cross_os}settings-plugin(aws-k8s-1.26)
Provides: %{_cross_os}settings-plugin(aws-k8s-1.26-nvidia)
Provides: %{_cross_os}settings-plugin(aws-k8s-1.27)
Provides: %{_cross_os}settings-plugin(aws-k8s-1.27-nvidia)
Provides: %{_cross_os}settings-plugin(aws-k8s-1.28)
Provides: %{_cross_os}settings-plugin(aws-k8s-1.28-nvidia)
Provides: %{_cross_os}settings-plugin(aws-k8s-1.29)
Provides: %{_cross_os}settings-plugin(aws-k8s-1.29-nvidia)
Provides: %{_cross_os}settings-plugin(aws-k8s-1.30)
Provides: %{_cross_os}settings-plugin(aws-k8s-1.30-nvidia)
Provides: %{_cross_os}settings-plugin(aws-k8s-1.31)
Provides: %{_cross_os}settings-plugin(aws-k8s-1.31-nvidia)
Conflicts: %{_cross_os}settings-plugin(any)
Conflicts: %{_cross_os}variant-flavor(nvidia)


%description aws-k8s
%{summary}.

%package aws-k8s-nvidia
Summary: Settings plugin for the aws-k8s-nvidia variants
Requires: (%{_cross_os}variant-family(aws-k8s) and %{_cross_os}variant-flavor(nvidia))
Provides: %{_cross_os}settings-plugin(any)
Provides: %{_cross_os}settings-plugin(aws-k8s-1.23-nvidia)
Provides: %{_cross_os}settings-plugin(aws-k8s-1.24-nvidia)
Provides: %{_cross_os}settings-plugin(aws-k8s-1.25-nvidia)
Provides: %{_cross_os}settings-plugin(aws-k8s-1.26-nvidia)
Provides: %{_cross_os}settings-plugin(aws-k8s-1.27-nvidia)
Provides: %{_cross_os}settings-plugin(aws-k8s-1.28-nvidia)
Provides: %{_cross_os}settings-plugin(aws-k8s-1.29-nvidia)
Provides: %{_cross_os}settings-plugin(aws-k8s-1.30-nvidia)
Provides: %{_cross_os}settings-plugin(aws-k8s-1.31-nvidia)
Conflicts: %{_cross_os}settings-plugin(any)

%description aws-k8s-nvidia
%{summary}.

%package metal-dev
Summary: Settings plugin for the metal-dev variant
Requires: %{_cross_os}variant(metal-dev)
Expand Down Expand Up @@ -135,13 +146,24 @@ Conflicts: %{_cross_os}settings-plugin(any)
-p settings-plugin-aws-dev \
-p settings-plugin-aws-ecs-1 \
-p settings-plugin-aws-ecs-2 \
-p settings-plugin-aws-k8s \
-p settings-plugin-metal-dev \
-p settings-plugin-metal-k8s \
-p settings-plugin-vmware-dev \
-p settings-plugin-vmware-k8s \
%{nil}

# The settings-plugin-aws-k8s and settings-plugin-aws-k8s-nvidia are compiled independently
# due to the requirement of distinct feature flags. This separation is necessary to prevent
# feature unification, as detailed in the Rust Cargo documentation:
# https://doc.rust-lang.org/cargo/reference/features.html#feature-unification
%cargo_build --manifest-path %{_builddir}/sources/Cargo.toml \
-p settings-plugin-aws-k8s \
%{nil}

%cargo_build --manifest-path %{_builddir}/sources/Cargo.toml \
-p settings-plugin-aws-k8s-nvidia \
%{nil}

%install
install -d %{buildroot}%{_cross_pluginsdir}
install -d %{buildroot}%{_cross_factorydir}%{_cross_sysconfdir}/ld.so.conf.d
Expand All @@ -151,6 +173,7 @@ for plugin in \
aws-dev \
aws-ecs-1 \
aws-ecs-2 \
aws-k8s-nvidia \
aws-k8s \
metal-dev \
metal-k8s \
Expand Down Expand Up @@ -194,6 +217,11 @@ done
%{_cross_factorydir}%{_cross_sysconfdir}/ld.so.conf.d/aws-k8s.conf
%{_cross_tmpfilesdir}/settings-plugin-aws-k8s.conf

%files aws-k8s-nvidia
%{_cross_pluginsdir}/aws-k8s-nvidia/libsettings.so
%{_cross_factorydir}%{_cross_sysconfdir}/ld.so.conf.d/aws-k8s-nvidia.conf
%{_cross_tmpfilesdir}/settings-plugin-aws-k8s-nvidia.conf

%files metal-dev
%{_cross_pluginsdir}/metal-dev/libsettings.so
%{_cross_factorydir}%{_cross_sysconfdir}/ld.so.conf.d/metal-dev.conf
Expand Down
Loading

0 comments on commit 26ec2cc

Please sign in to comment.