Skip to content

Latest commit

 

History

History
66 lines (52 loc) · 2.63 KB

File metadata and controls

66 lines (52 loc) · 2.63 KB

nvml-mock

Mock NVIDIA driver infrastructure for Kubernetes testing. Simulate GPUs on any Linux system -- no hardware required.

Components

Component Description Status
Mock NVML (libnvidia-ml.so) 400 NVML C API exports (111 with configurable behavior, 289 stubs), YAML-configurable GPU profiles Production
Mock CUDA (libcuda.so) 15 CUDA functions -- init, device, memory management Early
nvidia-smi Real binary with RPATH patch, backed by mock NVML Production
Helm Chart DaemonSet deployment with 6 GPU profiles Production
CDI Injection Container Device Interface specs for GPU Operator Production

GPU Profiles

Profile GPU Name VRAM Architecture
a100 A100-SXM4-40GB 40 GiB Ampere
h100 H100 80GB HBM3 80 GiB Hopper
b200 B200 192 GiB Blackwell
gb200 GB200 192 GiB Blackwell
gb300 GB300 NVL 288 GiB Blackwell Ultra
l40s L40S 48 GiB Ada Lovelace
t4 Tesla T4 16 GiB Turing

Quick Start

kind create cluster --name test
docker pull ghcr.io/nvidia/nvml-mock:latest
kind load docker-image ghcr.io/nvidia/nvml-mock:latest --name test
helm install nvml-mock oci://ghcr.io/nvidia/k8s-test-infra/chart/nvml-mock

See Helm Chart README for full walkthrough.

Documentation

Document Description
Quick Start Get up and running in 5 minutes
Architecture System design and component overview
Configuration Reference Complete YAML configuration guide
Runtime Control (nvml-mock-ctl) Change simulated GPU state on a running node
CUDA Mock Mock CUDA driver library details
Development Guide Contributing and extending the project
Examples Common usage patterns and scenarios
Troubleshooting Common issues and solutions

Integrations

Integration Description
fake-gpu-operator Run:ai's K8s-level GPU simulation + nvml-mock driver fidelity

Tested Consumers

Consumer Role Status
NVIDIA Device Plugin nvidia.com/gpu extended resources Tested
NVIDIA DRA Driver Dynamic Resource Allocation Tested
NVIDIA GPU Operator Full stack device plugin + GFD + validator Tested
GPU Feature Discovery Node labeling from NVML Tested