Files
OpenShell/deploy/kube/gpu-manifests/nvidia-device-plugin-helmchart.yaml
Drew NewberryandPiotr Mlocek d94d4e1166 feat(cluster): add NVIDIA GPU passthrough support for gateway start (#234)
Add --gpu flag to 'openshell gateway start' that enables NVIDIA GPU
access inside the cluster container. When enabled, the Docker container
receives GPU device requests via bollard, k3s auto-detects the NVIDIA
runtime, and the NVIDIA k8s-device-plugin is deployed via HelmChart CR
so Kubernetes workloads can request nvidia.com/gpu resources.

- Add GPU device request to Docker container creation (bollard DeviceRequest)
- Set GPU_ENABLED=true env var to gate GPU manifest deployment
- Multi-stage Dockerfile build to bundle NVIDIA Container Toolkit binaries
- Conditional GPU manifest copy in cluster entrypoint
- HelmChart CR for nvidia-device-plugin v0.18.2 with GFD and NFD enabled
- Thread gpu bool through DeployOptions, CLI flag, and run dispatch

---------

Co-authored-by: Piotr Mlocek <pmlocek@nvidia.com>
2026-03-11 16:53:24 -07:00

33 lines
1.1 KiB
YAML

# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
# HelmChart CR for auto-deploying the NVIDIA k8s-device-plugin via k3s Helm controller.
# This manifest is conditionally copied into /var/lib/rancher/k3s/server/manifests/
# by the cluster entrypoint when GPU_ENABLED=true.
#
# The chart installs:
# - NVIDIA device plugin DaemonSet (advertises nvidia.com/gpu resources)
# - GPU Feature Discovery (labels nodes with GPU properties)
# - Node Feature Discovery (dependency for GFD)
#
# k3s auto-detects nvidia-container-runtime on PATH and registers the "nvidia"
# RuntimeClass automatically, so no manual RuntimeClass manifest is needed.
apiVersion: helm.cattle.io/v1
kind: HelmChart
metadata:
name: nvidia-device-plugin
namespace: kube-system
spec:
repo: https://nvidia.github.io/k8s-device-plugin
chart: nvidia-device-plugin
version: "0.18.2"
targetNamespace: nvidia-device-plugin
createNamespace: true
valuesContent: |-
runtimeClassName: nvidia
gfd:
enabled: true
nfd:
enabled: true