Skip to content

Commit 735d2fb

Browse files
izphi78cilindrox
andauthored
feat: add support for custom NVIDIA GPU device selection and capabilities (#161)
* Add support for custom NVIDIA GPU device selection and capabilities Allow users to specify custom GPU devices and driver capabilities for NVIDIA GPU workloads instead of using hardcoded defaults. Changes: - Add optional `pms.gpu.nvidia.devices` field (default: "all") Supports GPU indices, UUIDs, or "all" for all GPUs - Add optional `pms.gpu.nvidia.capabilities` field (default: "compute,video,utility") - Add documentation links to NVIDIA Container Toolkit docs - Use Helm default function for cleaner template syntax Users can now specify specific GPUs (e.g., "0,1" or by UUID) and customize driver capabilities (compute, video, utility, graphics, etc.) according to their workload requirements. References: - GPU enumeration: https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/docker-specialized.html#gpu-enumeration - Driver capabilities: https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/docker-specialized.html#driver-capabilities * docs: add NVIDIA GPU configuration options to README Document new configurable fields for NVIDIA GPU support: - pms.gpu.nvidia.devices: GPU device selection - pms.gpu.nvidia.capabilities: Driver capabilities configuration Include links to official NVIDIA Container Toolkit documentation for GPU enumeration and driver capabilities. Bump chart version. * docs: update pms.nvidia values description --------- Signed-off-by: Gaston Festari <[email protected]> Co-authored-by: Gaston Festari <[email protected]>
1 parent d07f469 commit 735d2fb

File tree

4 files changed

+14
-4
lines changed

4 files changed

+14
-4
lines changed

charts/plex-media-server/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ type: application
2222
# This is the chart version. This version number should be incremented each time you make changes
2323
# to the chart and its templates, including the app version.
2424
# Versions are expected to follow Semantic Versioning (https://semver.org/)
25-
version: 1.2.0
25+
version: 1.3.0
2626

2727
# This is the version number of the application being deployed. This version number should be
2828
# incremented each time you make changes to the application. Versions are not expected to

charts/plex-media-server/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# plex-media-server
22

3-
![Version: 1.2.0](https://img.shields.io/badge/Version-1.2.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.42.2](https://img.shields.io/badge/AppVersion-1.42.2-informational?style=flat-square)
3+
![Version: 1.3.0](https://img.shields.io/badge/Version-1.3.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.42.2](https://img.shields.io/badge/AppVersion-1.42.2-informational?style=flat-square)
44

55
**Homepage:** <https://www.plex.tv>
66

@@ -129,6 +129,8 @@ Before contributing, please read the [Code of Conduct](../../CODE_OF_CONDUCT.md)
129129
| pms.claimSecret.name | string | `""` | |
130130
| pms.configExistingClaim | string | `""` | Name of an existing `PersistentVolumeClaim` for the PMS database NOTE: When set, 'configStorage' and 'storageClassName' are ignored. |
131131
| pms.configStorage | string | `"2Gi"` | The volume size to provision for the PMS database |
132+
| pms.gpu.nvidia.capabilities | string | `"compute,video,utility"` | Optional: NVIDIA driver capabilities. Available values are: `compute`, `compat32`, `graphics`, `utility`, `video`, `display`. See [NVIDIA docs](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/docker-specialized.html#driver-capabilities) |
133+
| pms.gpu.nvidia.devices | string | `"all"` | Optional: NVIDIA GPU devices by index or UUID. Examples: "0,1", "GPU-uuid1,GPU-uuid2", or "all". See [NVIDIA docs](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/docker-specialized.html#gpu-enumeration) |
132134
| pms.gpu.nvidia.enabled | bool | `false` | |
133135
| pms.livenessProbe | object | `{}` | Add kubernetes liveness probe to pms container. |
134136
| pms.readinessProbe | object | `{}` | Add kubernetes readiness probe to pms container. |

charts/plex-media-server/templates/statefulset.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,9 @@ spec:
139139
{{- end }}
140140
{{- if .Values.pms.gpu.nvidia.enabled }}
141141
- name: NVIDIA_VISIBLE_DEVICES
142-
value: all
142+
value: {{ .Values.pms.gpu.nvidia.devices | default "all" | quote }}
143143
- name: NVIDIA_DRIVER_CAPABILITIES
144-
value: compute,video,utility
144+
value: {{ .Values.pms.gpu.nvidia.capabilities | default "compute,video,utility" | quote }}
145145
{{- end }}
146146
{{- with .Values.pms.livenessProbe }}
147147
livenessProbe:

charts/plex-media-server/values.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,14 @@ pms:
6868
gpu:
6969
nvidia:
7070
enabled: false
71+
# -- Optional: NVIDIA GPU devices by index or UUID.
72+
# Examples: "0,1", "GPU-uuid1,GPU-uuid2", or "all".
73+
# See [NVIDIA docs](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/docker-specialized.html#gpu-enumeration)
74+
devices: "all"
75+
# -- Optional: NVIDIA driver capabilities.
76+
# Available values are: `compute`, `compat32`, `graphics`, `utility`, `video`, `display`.
77+
# See [NVIDIA docs](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/docker-specialized.html#driver-capabilities)
78+
capabilities: "compute,video,utility"
7179

7280
resources: {}
7381
# We usually recommend not to specify default resources and to leave this as a conscious

0 commit comments

Comments
 (0)