mirror of
https://github.com/kata-containers/kata-containers.git
synced 2026-04-12 23:04:33 +00:00
kata-deploy: Add qemu-nvidia-gpu-runtime-rs shim
Register the Rust NVIDIA GPU runtime as a kata-deploy shim so it gets installed and configured alongside the existing Go-based qemu-nvidia-gpu shim. Add qemu-nvidia-gpu-runtime-rs to the RUST_SHIMS list and the default enabled shims, create its RuntimeClass entry in the Helm chart, and include it in the try-kata-nvidia-gpu values overlay. The kata-deploy installer will now copy the runtime-rs configuration and create the containerd runtime entry for it. Signed-off-by: Fabiano Fidêncio <ffidencio@nvidia.com> Signed-off-by: Alex Lyn <alex.lyn@antgroup.com>
This commit is contained in:
@@ -30,6 +30,7 @@ const ALL_SHIMS: &[&str] = &[
|
||||
"qemu-coco-dev",
|
||||
"qemu-coco-dev-runtime-rs",
|
||||
"qemu-nvidia-gpu",
|
||||
"qemu-nvidia-gpu-runtime-rs",
|
||||
"qemu-nvidia-gpu-snp",
|
||||
"qemu-nvidia-gpu-tdx",
|
||||
"qemu-runtime-rs",
|
||||
@@ -1055,6 +1056,7 @@ mod tests {
|
||||
#[case("qemu-coco-dev", "qemu")]
|
||||
#[case("qemu-cca", "qemu")]
|
||||
#[case("qemu-nvidia-gpu", "qemu")]
|
||||
#[case("qemu-nvidia-gpu-runtime-rs", "qemu")]
|
||||
#[case("qemu-nvidia-gpu-tdx", "qemu")]
|
||||
#[case("qemu-nvidia-gpu-snp", "qemu")]
|
||||
#[case("qemu-runtime-rs", "qemu")]
|
||||
|
||||
@@ -718,8 +718,8 @@ fn parse_custom_runtimes() -> Result<Vec<CustomRuntime>> {
|
||||
/// Returns only shims that are supported for that architecture
|
||||
fn get_default_shims_for_arch(arch: &str) -> &'static str {
|
||||
match arch {
|
||||
"x86_64" => "clh cloud-hypervisor dragonball fc qemu qemu-coco-dev qemu-coco-dev-runtime-rs qemu-runtime-rs qemu-nvidia-gpu qemu-nvidia-gpu-snp qemu-nvidia-gpu-tdx qemu-snp qemu-snp-runtime-rs qemu-tdx qemu-tdx-runtime-rs",
|
||||
"aarch64" => "clh cloud-hypervisor dragonball fc qemu qemu-runtime-rs qemu-nvidia-gpu qemu-cca",
|
||||
"x86_64" => "clh cloud-hypervisor dragonball fc qemu qemu-coco-dev qemu-coco-dev-runtime-rs qemu-runtime-rs qemu-nvidia-gpu qemu-nvidia-gpu-runtime-rs qemu-nvidia-gpu-snp qemu-nvidia-gpu-tdx qemu-snp qemu-snp-runtime-rs qemu-tdx qemu-tdx-runtime-rs",
|
||||
"aarch64" => "clh cloud-hypervisor dragonball fc qemu qemu-runtime-rs qemu-nvidia-gpu qemu-nvidia-gpu-runtime-rs qemu-cca",
|
||||
"s390x" => "qemu qemu-runtime-rs qemu-se qemu-se-runtime-rs qemu-coco-dev qemu-coco-dev-runtime-rs",
|
||||
"ppc64le" => "qemu",
|
||||
_ => "qemu", // Fallback to qemu for unknown architectures
|
||||
|
||||
@@ -10,6 +10,7 @@ pub const RUST_SHIMS: &[&str] = &[
|
||||
"cloud-hypervisor",
|
||||
"dragonball",
|
||||
"qemu-runtime-rs",
|
||||
"qemu-nvidia-gpu-runtime-rs",
|
||||
"qemu-coco-dev-runtime-rs",
|
||||
"qemu-se-runtime-rs",
|
||||
"qemu-snp-runtime-rs",
|
||||
|
||||
@@ -109,6 +109,7 @@ scheduling:
|
||||
"qemu-tdx" (dict "memory" "2048Mi" "cpu" "1.0")
|
||||
"qemu-tdx-runtime-rs" (dict "memory" "2048Mi" "cpu" "1.0")
|
||||
"qemu-nvidia-gpu" (dict "memory" "10240Mi" "cpu" "1.0")
|
||||
"qemu-nvidia-gpu-runtime-rs" (dict "memory" "10240Mi" "cpu" "1.0")
|
||||
"qemu-nvidia-gpu-snp" (dict "memory" "10240Mi" "cpu" "1.0")
|
||||
"qemu-nvidia-gpu-tdx" (dict "memory" "10240Mi" "cpu" "1.0")
|
||||
"qemu-cca" (dict "memory" "2048Mi" "cpu" "1.0")
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Example values file to enable NVIDIA GPU shims
|
||||
# This includes all NVIDIA GPU-enabled shims: qemu-nvidia-gpu, qemu-nvidia-gpu-snp, qemu-nvidia-gpu-tdx
|
||||
# This includes all NVIDIA GPU-enabled shims: qemu-nvidia-gpu, qemu-nvidia-gpu-runtime-rs, qemu-nvidia-gpu-snp, qemu-nvidia-gpu-tdx
|
||||
#
|
||||
# Usage:
|
||||
# helm install kata-deploy oci://ghcr.io/kata-containers/kata-deploy-charts/kata-deploy \
|
||||
@@ -31,6 +31,20 @@ shims:
|
||||
nodeSelector:
|
||||
nvidia.com/cc.ready.state: "false"
|
||||
|
||||
qemu-nvidia-gpu-runtime-rs:
|
||||
enabled: true
|
||||
supportedArches:
|
||||
- amd64
|
||||
- arm64
|
||||
allowedHypervisorAnnotations: []
|
||||
containerd:
|
||||
snapshotter: ""
|
||||
runtimeClass:
|
||||
# This label is automatically added by gpu-operator. Override it
|
||||
# if you want to use a different label.
|
||||
nodeSelector:
|
||||
nvidia.com/cc.ready.state: "false"
|
||||
|
||||
qemu-nvidia-gpu-snp:
|
||||
enabled: true
|
||||
supportedArches:
|
||||
|
||||
@@ -147,6 +147,20 @@ shims:
|
||||
nodeSelector:
|
||||
nvidia.com/cc.ready.state: "false"
|
||||
|
||||
qemu-nvidia-gpu-runtime-rs:
|
||||
enabled: ~
|
||||
supportedArches:
|
||||
- amd64
|
||||
- arm64
|
||||
allowedHypervisorAnnotations: []
|
||||
containerd:
|
||||
snapshotter: ""
|
||||
runtimeClass:
|
||||
# This label is automatically added by gpu-operator. Override it
|
||||
# if you want to use a different label.
|
||||
nodeSelector:
|
||||
nvidia.com/cc.ready.state: "false"
|
||||
|
||||
qemu-nvidia-gpu-snp:
|
||||
enabled: ~
|
||||
supportedArches:
|
||||
|
||||
Reference in New Issue
Block a user