Skip to content

Commit

Permalink
Merge pull request #1311 from porter-dev/ym/hf_llm_health
Browse files Browse the repository at this point in the history
health checks for hf-llm addons and other minor modifications
  • Loading branch information
yosefmih authored Jun 18, 2024
2 parents ab65310 + 1fa88b2 commit 40f7740
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 12 deletions.
22 changes: 16 additions & 6 deletions addons/hf-llm-models/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@ apiVersion: apps/v1
kind: Deployment
metadata:
labels:
llm-model: {{ .Release.Name }}
llm-model: {{ .Release.Name }}-hf-llm
annotations:
porter.run/hf-llm-model-version: "{{ .Chart.Version }}"
name: {{ .Release.Name }}-workload
name: {{ .Release.Name }}-hf-llm
spec:
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
llm-model: {{ .Release.Name }}
llm-model: {{ .Release.Name }}-hf-llm
template:
metadata:
labels:
llm-model: {{ .Release.Name }}
llm-model: {{ .Release.Name }}-hf-llm
spec:
tolerations:
- key: "removable"
Expand Down Expand Up @@ -49,14 +49,24 @@ spec:
- --max-model-len={{ .Values.maxModelLen }}
{{- end }}
image: {{ .Values.vllmImage }}
imagePullPolicy: Always
imagePullPolicy: IfNotPresent
env:
- name: HF_TOKEN
value: {{ .Values.huggingFaceToken }}
ports:
- containerPort: 8000
protocol: TCP
name: https
readinessProbe:
failureThreshold: 3
httpGet:
path: /health
port: 8000
scheme: HTTP
initialDelaySeconds: 15
periodSeconds: 15
successThreshold: 1
timeoutSeconds: 2
resources:
requests:
{{- if .Values.resources.requests.cpu }}
Expand Down Expand Up @@ -88,4 +98,4 @@ spec:
volumes:
- name: model-volume
persistentVolumeClaim:
claimName: "{{ .Release.Name }}-model-pvc"
claimName: "{{ .Release.Name }}-hf-llm"
4 changes: 2 additions & 2 deletions addons/hf-llm-models/templates/pvc.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ .Release.Name }}-model-pvc
name: {{ .Release.Name }}-hf-llm
spec:
accessModes:
- ReadWriteMany
storageClassName: efs-{{ .Release.Name }}
storageClassName: efs-{{ .Release.Name }}-hf-llm
resources:
requests:
storage: 20Gi
6 changes: 3 additions & 3 deletions addons/hf-llm-models/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ apiVersion: v1
kind: Service
metadata:
labels:
llm-model: {{ .Release.Name }}
name: {{ .Release.Name }}
llm-model: {{ .Release.Name }}-hf-llm
name: {{ .Release.Name }}-hf-llm
spec:
ports:
- name: https
port: 8000
targetPort: https
selector:
llm-model: {{ .Release.Name }}
llm-model: {{ .Release.Name }}-hf-llm
2 changes: 1 addition & 1 deletion addons/hf-llm-models/templates/storageclass.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: efs-{{ .Release.Name }}
name: efs-{{ .Release.Name }}-hf-llm
provisioner: efs.csi.aws.com
parameters:
provisioningMode: efs-ap
Expand Down

0 comments on commit 40f7740

Please sign in to comment.