Skip to content

Commit

Permalink
ai-prio-class
Browse files Browse the repository at this point in the history
  • Loading branch information
rwlove committed Jan 12, 2025
1 parent d531feb commit 4710193
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions kubernetes/main/apps/ai/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ./priority-class.yaml
- ./k8sgpt/ks.yaml
- ./ollama/ks.yaml
- ./stable-diffusion/ks.yaml
Expand Down
2 changes: 2 additions & 0 deletions kubernetes/main/apps/ai/ollama/app/helmrelease.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ spec:

runtimeClassName: nvidia

priorityClassName: ai-gpu-critical

securityContext:
privileged: true

Expand Down
8 changes: 8 additions & 0 deletions kubernetes/main/apps/ai/priority-class.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
apiVersion: scheduling.k8s.io/v1
description: Used for pods that must run on a node with a GPU.
kind: PriorityClass
metadata:
name: ai-gpu-critical
preemptionPolicy: PreemptLowerPriority
value: 100040
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ spec:
pod:
runtimeClassName: nvidia

priorityClassName: ai-gpu-critical

affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
Expand Down
2 changes: 2 additions & 0 deletions kubernetes/main/apps/media/immich/app/helmrelease.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ spec:
machine-learning:
runtimeClassName: nvidia

priorityClassName: ai-gpu-critical

securityContext:
privileged: true

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ spec:
nodeSelector:
nvidia.com/gpu.present: "true"
runtimeClassName: nvidia
priorityClassName: ai-gpu-critical
resources:
limits:
nvidia.com/gpu: 1
Expand Down

0 comments on commit 4710193

Please sign in to comment.