d25d482dc2
Publish CLI Package / publish-npm (push) Waiting to run
Publish Python SDK / publish-pypi (push) Waiting to run
Publish TypeScript SDK / publish-npm (push) Waiting to run
CI / Migrate Dev DB (push) Has been skipped
CI / Detect Version (push) Has been cancelled
CI / Migrate DB (push) Has been cancelled
CI / Build Dev ECR (./docker/app.Dockerfile, ECR_APP) (push) Has been cancelled
CI / Build Dev ECR (./docker/db.Dockerfile, ECR_MIGRATIONS) (push) Has been cancelled
CI / Build Dev ECR (./docker/pii.Dockerfile, ECR_PII) (push) Has been cancelled
CI / Build Dev ECR (./docker/realtime.Dockerfile, ECR_REALTIME) (push) Has been cancelled
CI / Deploy Trigger.dev (Dev) (push) Has been cancelled
CI / Build AMD64 (./docker/app.Dockerfile, ECR_APP, ghcr.io/simstudioai/simstudio) (push) Has been cancelled
CI / Build AMD64 (./docker/db.Dockerfile, ECR_MIGRATIONS, ghcr.io/simstudioai/migrations) (push) Has been cancelled
CI / Build AMD64 (./docker/pii.Dockerfile, ECR_PII, ghcr.io/simstudioai/pii) (push) Has been cancelled
CI / Build AMD64 (./docker/realtime.Dockerfile, ECR_REALTIME, ghcr.io/simstudioai/realtime) (push) Has been cancelled
CI / Build ARM64 (GHCR Only) (./docker/app.Dockerfile, ghcr.io/simstudioai/simstudio) (push) Has been cancelled
CI / Build ARM64 (GHCR Only) (./docker/db.Dockerfile, ghcr.io/simstudioai/migrations) (push) Has been cancelled
CI / Build ARM64 (GHCR Only) (./docker/pii.Dockerfile, ghcr.io/simstudioai/pii) (push) Has been cancelled
CI / Build ARM64 (GHCR Only) (./docker/realtime.Dockerfile, ghcr.io/simstudioai/realtime) (push) Has been cancelled
CI / Create GHCR Manifests (ghcr.io/simstudioai/migrations) (push) Has been cancelled
CI / Create GHCR Manifests (ghcr.io/simstudioai/pii) (push) Has been cancelled
CI / Create GHCR Manifests (ghcr.io/simstudioai/realtime) (push) Has been cancelled
CI / Create GHCR Manifests (ghcr.io/simstudioai/simstudio) (push) Has been cancelled
CI / Check Docs Changes (push) Has been cancelled
CI / Process Docs (push) Has been cancelled
CI / Create GitHub Release (push) Has been cancelled
CI / Test and Build (push) Has been cancelled
116 lines
3.4 KiB
YAML
116 lines
3.4 KiB
YAML
{{- if and .Values.ollama.enabled .Values.ollama.gpu.enabled }}
|
|
---
|
|
# 1. ConfigMap for NVIDIA Device Plugin Configuration
|
|
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: {{ include "sim.fullname" . }}-nvidia-device-plugin-config
|
|
namespace: {{ .Release.Namespace }}
|
|
labels:
|
|
{{- include "sim.labels" . | nindent 4 }}
|
|
app.kubernetes.io/component: nvidia-device-plugin
|
|
data:
|
|
config.yaml: |
|
|
version: v1
|
|
flags:
|
|
{{- if eq .Values.ollama.gpu.strategy "mig" }}
|
|
migStrategy: "single"
|
|
{{- else }}
|
|
migStrategy: "none"
|
|
{{- end }}
|
|
failOnInitError: false
|
|
plugin:
|
|
passDeviceSpecs: true
|
|
deviceListStrategy: envvar
|
|
{{- if eq .Values.ollama.gpu.strategy "time-slicing" }}
|
|
sharing:
|
|
timeSlicing:
|
|
resources:
|
|
- name: nvidia.com/gpu
|
|
replicas: {{ .Values.ollama.gpu.timeSlicingReplicas | default 5 }}
|
|
{{- end }}
|
|
---
|
|
# 2. NVIDIA Device Plugin DaemonSet for GPU support
|
|
apiVersion: apps/v1
|
|
kind: DaemonSet
|
|
metadata:
|
|
name: {{ include "sim.fullname" . }}-nvidia-device-plugin
|
|
namespace: {{ .Release.Namespace }}
|
|
labels:
|
|
{{- include "sim.labels" . | nindent 4 }}
|
|
app.kubernetes.io/component: nvidia-device-plugin
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
{{- include "sim.selectorLabels" . | nindent 6 }}
|
|
app.kubernetes.io/component: nvidia-device-plugin
|
|
updateStrategy:
|
|
type: RollingUpdate
|
|
template:
|
|
metadata:
|
|
labels:
|
|
{{- include "sim.selectorLabels" . | nindent 8 }}
|
|
app.kubernetes.io/component: nvidia-device-plugin
|
|
spec:
|
|
tolerations:
|
|
# Allow scheduling on GPU nodes
|
|
- key: nvidia.com/gpu
|
|
operator: Exists
|
|
effect: NoSchedule
|
|
- key: sku
|
|
operator: Equal
|
|
value: gpu
|
|
effect: NoSchedule
|
|
nodeSelector:
|
|
# Only schedule on nodes with NVIDIA GPUs
|
|
accelerator: nvidia
|
|
priorityClassName: system-node-critical
|
|
volumes:
|
|
- name: device-plugin
|
|
hostPath:
|
|
path: /var/lib/kubelet/device-plugins
|
|
- name: dev
|
|
hostPath:
|
|
path: /dev
|
|
- name: sys
|
|
hostPath:
|
|
path: /sys
|
|
# Volume to mount the ConfigMap
|
|
- name: nvidia-device-plugin-config
|
|
configMap:
|
|
name: {{ include "sim.fullname" . }}-nvidia-device-plugin-config
|
|
containers:
|
|
- name: nvidia-device-plugin
|
|
image: nvcr.io/nvidia/k8s-device-plugin:v0.18.2
|
|
imagePullPolicy: Always
|
|
args:
|
|
- "--config-file=/etc/device-plugin/config.yaml"
|
|
{{- if eq .Values.ollama.gpu.strategy "mig" }}
|
|
env:
|
|
- name: NVIDIA_MIG_MONITOR_DEVICES
|
|
value: all
|
|
{{- end }}
|
|
securityContext:
|
|
allowPrivilegeEscalation: false
|
|
capabilities:
|
|
drop: ["ALL"]
|
|
volumeMounts:
|
|
- name: device-plugin
|
|
mountPath: /var/lib/kubelet/device-plugins
|
|
- name: dev
|
|
mountPath: /dev
|
|
- name: sys
|
|
mountPath: /sys
|
|
readOnly: true
|
|
- name: nvidia-device-plugin-config
|
|
mountPath: /etc/device-plugin/
|
|
readOnly: true
|
|
resources:
|
|
requests:
|
|
cpu: 50m
|
|
memory: 20Mi
|
|
limits:
|
|
cpu: 50m
|
|
memory: 50Mi
|
|
{{- end }}
|