You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Derive the GPU accelerator SKU without nvidia-smi, then remove the SMI collector entirely. This lets the snapshot/agent image drop its CUDA base (nvcr.io/nvidia/cuda) and ship as a pure-Go static image built with ko, eliminating the recurring CUDA-image CVE surface.
Motivation / Context
The only data the rest of AICR consumes from the SMI collector is the GPU product name → accelerator SKU (gpu.smi.gpu.model, pkg/fingerprint/from_measurements.go#L41). Driver/CUDA/vbios/MIG/memory fields are collected but consumed by nothing (no fingerprint dimension, no validator code, no recipe constraint).
The SKU is already obtainable without SMI:
GFD node labelnvidia.com/gpu.product (set by GPU Feature Discovery / GPU Operator) is already captured by the topology collector and already feeds reconcileAccelerator (from_measurements.go#L102). In the motivating OKE L40S snapshot, SMI returned 0 GPUs yet the fingerprint still resolved an accelerator from this label.
PCI device ID is already discovered by the NFD PCI source — extractHardwareInfo iterates the device instances and reads vendor/class (pkg/collector/gpu/nfd.go#L113-L119) but discards dev.Attributes["device"], the device ID needed to identify the SKU driver-free.
nvidia-smi never covered the day-0 case anyway (no driver image ⇒ no nvidia-smi); PCI enumeration is the genuinely driver-free path. So removing SMI in favor of label + PCI is strictly better for AICR's pre-deployment use case, and removes a heavy, CVE-prone base image.
The CUDA dependency is wired into the build, not just the agent pod:
Make the GFD label the primary SKU source and remove the SMI collector (collectSMI, the NVSMIDevice XML model, and the nvidia-smi exec in pkg/collector/gpu). Fingerprint precedence becomes: GFD label → PCI device-ID → unknown-sku.
Drop the CUDA base image. Flip .ko.yaml / .goreleaser.yaml base to distroless/static, remove snapshot_agent_cuda_image, and build the agent/server image with ko like aicr.
Open decisions (call out before implementation)
Device-ID table ownership / freshness. Where it lives and how it's kept current (CI check vs periodic review). New device IDs fail safe to unknown-sku until added; NVIDIA-employee maintainers have launch visibility. AICR's enum is coarse (~7 buckets), so the table maps device-ID → bucket, not exact marketing names.
GFD availability assumption.nvidia.com/gpu.product requires GPU Operator/GFD to have labeled the node. The PCI path is the fallback for nodes before that.
Residual host access. PCI/module detection still needs host /sys (+ /proc) mounts (pkg/snapshotter/doc.go#L195). Removing SMI drops the driver / CUDA image / --runtime-class nvidia requirement, not the sysfs mount.
Acceptance criteria
extractHardwareInfo maps PCI device IDs to the accelerator enum; covered by a table-driven test for every supported SKU's known device IDs, with unknown IDs → unknown-sku.
Fingerprint resolves the SKU with nvidia-smi absent, on both a GFD-labeled node (label path) and an unlabeled node (PCI path).
SMI collector code removed; no remaining consumers of SMI-only fields.
Image base switched to static/distroless; nvidia-smi and the CUDA base no longer required to fingerprint; grype scan no longer surfaces CUDA-image CVEs.
Docs updated (pkg/collector/gpu/doc.go, snapshotter agent docs, any image/runtime-class guidance).
Type of Change
New feature / enhancement (driver-free SKU detection; dependency removal)
Bug fix
Risk Assessment
Low
Medium — touches GPU collection, fingerprint precedence, and image build; phased and reversible (SMI removal is the last, gated step).
Summary
Derive the GPU accelerator SKU without
nvidia-smi, then remove the SMI collector entirely. This lets the snapshot/agent image drop its CUDA base (nvcr.io/nvidia/cuda) and ship as a pure-Go static image built withko, eliminating the recurring CUDA-image CVE surface.Motivation / Context
The only data the rest of AICR consumes from the SMI collector is the GPU product name → accelerator SKU (
gpu.smi.gpu.model,pkg/fingerprint/from_measurements.go#L41). Driver/CUDA/vbios/MIG/memory fields are collected but consumed by nothing (no fingerprint dimension, no validator code, no recipe constraint).The SKU is already obtainable without SMI:
nvidia.com/gpu.product(set by GPU Feature Discovery / GPU Operator) is already captured by the topology collector and already feedsreconcileAccelerator(from_measurements.go#L102). In the motivating OKE L40S snapshot, SMI returned 0 GPUs yet the fingerprint still resolved an accelerator from this label.extractHardwareInfoiterates thedeviceinstances and readsvendor/class(pkg/collector/gpu/nfd.go#L113-L119) but discardsdev.Attributes["device"], the device ID needed to identify the SKU driver-free.nvidia-sminever covered the day-0 case anyway (no driver image ⇒ nonvidia-smi); PCI enumeration is the genuinely driver-free path. So removing SMI in favor of label + PCI is strictly better for AICR's pre-deployment use case, and removes a heavy, CVE-prone base image.The CUDA dependency is wired into the build, not just the agent pod:
Fixes: N/A
Related: #1349, #1350 (token-boundary SKU matching — prerequisite; the PCI/label paths must reuse that same normalization +
unknown-skulogic)Proposed approach (phased)
unknown-sku.extractHardwareInfo, readdev.Attributes["device"], map it to the AICR accelerator enum via a curated device-ID table, and surface it onHardwareInfo(pkg/collector/gpu/hardware.go#L30) + thehardwaresubtype. Add a fingerprint source for it. Reuse fix(fingerprint): match GPU SKUs on token boundaries not substrings #1350's normalization; unknown device IDs →unknown-sku.collectSMI, theNVSMIDeviceXML model, and thenvidia-smiexec inpkg/collector/gpu). Fingerprint precedence becomes: GFD label → PCI device-ID →unknown-sku..ko.yaml/.goreleaser.yamlbase to distroless/static, removesnapshot_agent_cuda_image, and build the agent/server image withkolikeaicr.Open decisions (call out before implementation)
unknown-skuuntil added; NVIDIA-employee maintainers have launch visibility. AICR's enum is coarse (~7 buckets), so the table maps device-ID → bucket, not exact marketing names.nvidia.com/gpu.productrequires GPU Operator/GFD to have labeled the node. The PCI path is the fallback for nodes before that./sys(+/proc) mounts (pkg/snapshotter/doc.go#L195). Removing SMI drops the driver / CUDA image /--runtime-class nvidiarequirement, not the sysfs mount.Acceptance criteria
extractHardwareInfomaps PCI device IDs to the accelerator enum; covered by a table-driven test for every supported SKU's known device IDs, with unknown IDs →unknown-sku.nvidia-smiabsent, on both a GFD-labeled node (label path) and an unlabeled node (PCI path).nvidia-smiand the CUDA base no longer required to fingerprint;grypescan no longer surfaces CUDA-image CVEs.pkg/collector/gpu/doc.go, snapshotter agent docs, any image/runtime-class guidance).Type of Change
Risk Assessment