-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[castai-hosted-model] add node placement job
- Loading branch information
Showing
4 changed files
with
83 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
{{- if .Values.placementJob.enabled }} | ||
{{- $nodeTemplateName := required "placementJob.nodeTemplateName is required" .Values.placementJob.nodeTemplateName }} | ||
apiVersion: batch/v1 | ||
kind: Job | ||
metadata: | ||
name: {{ .Release.Name }}-placement-job | ||
labels: | ||
app.kubernetes.io/name: {{ .Chart.Name }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
app.kubernetes.io/component: placement-job | ||
spec: | ||
backoffLimit: 0 | ||
template: | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: {{ .Chart.Name }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
app.kubernetes.io/component: placement-job | ||
spec: | ||
restartPolicy: Never | ||
affinity: | ||
nodeAffinity: | ||
requiredDuringSchedulingIgnoredDuringExecution: | ||
nodeSelectorTerms: | ||
- matchExpressions: | ||
- key: nvidia.com/gpu.total-memory | ||
operator: Gt | ||
values: | ||
- "{{ required "placementJob.requiredGPUTotalMemoryMiB is required" .Values.placementJob.requiredGPUTotalMemoryMiB }}" | ||
preferredDuringSchedulingIgnoredDuringExecution: | ||
- weight: 1 | ||
preference: | ||
matchExpressions: | ||
- key: scheduling.cast.ai/spot | ||
operator: Exists | ||
containers: | ||
- name: placement-job | ||
image: "{{ .Values.placementJob.image.repository }}:{{ .Values.placementJob.image.tag }}" | ||
imagePullPolicy: {{ .Values.placementJob.image.pullPolicy | quote }} | ||
command: ["/bin/sh", "-c", "echo Node placement job finished."] | ||
resources: | ||
{{- toYaml .Values.routerResources | nindent 12 }} | ||
nodeSelector: | ||
scheduling.cast.ai/node-template: "{{ $nodeTemplateName }}" | ||
tolerations: | ||
- key: scheduling.cast.ai/node-template | ||
value: "{{ $nodeTemplateName }}" | ||
operator: Equal | ||
effect: NoSchedule | ||
- key: scheduling.cast.ai/spot | ||
operator: Exists | ||
- key: nvidia.com/gpu | ||
effect: NoSchedule | ||
operator: Exists | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,23 @@ | ||
ollama: | ||
# -- Specifies if Ollama model should be deployed | ||
enabled: true | ||
vllm: | ||
# -- Specifies if vLLM model should be deployed | ||
enabled: false | ||
placementJob: | ||
# -- Specifies if a node placement job should be deployed | ||
enabled: false | ||
|
||
# -- Total GPU memory MiB (GPU count * GPU memory MiB) of the node that should be provisioned for this job | ||
requiredGPUTotalMemoryMiB: | ||
|
||
image: | ||
# -- The image to use for the job | ||
repository: busybox | ||
# -- The image tag | ||
tag: "1.37.0" | ||
# -- Image pull policy | ||
pullPolicy: IfNotPresent | ||
|
||
# -- Resources for the job | ||
resources: {} | ||