diff --git a/utils/helm/speckle-server/templates/preview_service/deployment.yml b/utils/helm/speckle-server/templates/preview_service/deployment.yml index d3cb013a5..2221bd996 100644 --- a/utils/helm/speckle-server/templates/preview_service/deployment.yml +++ b/utils/helm/speckle-server/templates/preview_service/deployment.yml @@ -48,6 +48,9 @@ spec: limits: cpu: {{ .Values.preview_service.limits.cpu }} memory: {{ .Values.preview_service.limits.memory }} + {{- if (and .Values.preview_service.nvidiaGPUEnabled (get .Values.preview_service.limits "nvidia.com/gpu"))}} + nvidia.com/gpu: {{ (get .Values.preview_service.limits "nvidia.com/gpu") }} + {{- end }} securityContext: allowPrivilegeEscalation: false diff --git a/utils/helm/speckle-server/values.schema.json b/utils/helm/speckle-server/values.schema.json index 6d2318c7f..caa81ac53 100644 --- a/utils/helm/speckle-server/values.schema.json +++ b/utils/helm/speckle-server/values.schema.json @@ -1915,6 +1915,11 @@ "description": "Allows using a dedicated redis url for the preview service job queue", "default": false }, + "nvidiaGPUEnabled": { + "type": "boolean", + "description": "If enabled, the Preview Service will be deployed with GPU support. This is only available on Kubernetes clusters with GPU support.", + "default": false + }, "replicas": { "type": "number", "description": "The number of instances of the Preview Service pod to be deployed within the cluster.", diff --git a/utils/helm/speckle-server/values.yaml b/utils/helm/speckle-server/values.yaml index 1cf898736..493485228 100644 --- a/utils/helm/speckle-server/values.yaml +++ b/utils/helm/speckle-server/values.yaml @@ -1123,6 +1123,9 @@ preview_service: ## @param preview_service.dedicatedPreviewsQueue Allows using a dedicated redis url for the preview service job queue ## dedicatedPreviewsQueue: false + ## @param preview_service.nvidiaGPUEnabled If enabled, the Preview Service will be deployed with GPU support. This is only available on Kubernetes clusters with GPU support. + ## + nvidiaGPUEnabled: false ## @param preview_service.replicas The number of instances of the Preview Service pod to be deployed within the cluster. ## replicas: 1 @@ -1171,6 +1174,9 @@ preview_service: ## ref: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ ## memory: 4Gi + ## @param preview_service.limits.nvidia.com/gpu The maximum number of GPUs that will be made available to the Preview Service Pod. Ignored if preview_service.nvidiaGPUEnabled is false. + ## If this limit is exceeded, processes within the pod that request additional GPUs may be paused. + nvidia.com/gpu: 1 autoscaling: ## @param preview_service.autoscaling.enabled ## @descriptionStart