forked from open-webui/open-webui
Added nodeSelectors for allocating GPU nodePools in the cloud and configured volumes for WebUI
This commit is contained in:
parent
02ce0c47f4
commit
b42b2e7890
6 changed files with 64 additions and 13 deletions
|
@ -19,15 +19,32 @@ spec:
|
|||
image: {{ .Values.ollama.image }}
|
||||
ports:
|
||||
- containerPort: {{ .Values.ollama.servicePort }}
|
||||
resources:
|
||||
limits:
|
||||
cpu: {{ .Values.ollama.resources.limits.cpu }}
|
||||
memory: {{ .Values.ollama.resources.limits.memory }}
|
||||
nvidia.com/gpu: {{ .Values.ollama.resources.limits.gpu }}
|
||||
env:
|
||||
{{- if .Values.ollama.gpu.enabled }}
|
||||
- name: PATH
|
||||
value: /usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||
- name: LD_LIBRARY_PATH
|
||||
value: /usr/local/nvidia/lib:/usr/local/nvidia/lib64
|
||||
- name: NVIDIA_DRIVER_CAPABILITIES
|
||||
value: compute,utility
|
||||
{{- end}}
|
||||
{{- if .Values.ollama.resources }}
|
||||
resources: {{- toYaml .Values.ollama.resources | nindent 10 }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
- name: ollama-volume
|
||||
mountPath: /root/.ollama
|
||||
tty: true
|
||||
{{- with .Values.ollama.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
tolerations:
|
||||
{{- if .Values.ollama.gpu.enabled }}
|
||||
- key: nvidia.com/gpu
|
||||
operator: Exists
|
||||
effect: NoSchedule
|
||||
{{- end }}
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: ollama-volume
|
||||
|
@ -35,4 +52,4 @@ spec:
|
|||
accessModes: [ "ReadWriteOnce" ]
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
||||
storage: {{ .Values.ollama.volumeSize }}
|
Loading…
Add table
Add a link
Reference in a new issue