From 466a7a2d22a0c7a777068f293e8b3fabad76b270 Mon Sep 17 00:00:00 2001 From: Dolpher Du Date: Mon, 12 Aug 2024 07:19:40 +0000 Subject: [PATCH] Set model-volume default to tmp volume Set default value for model-volume to tmp volume. Change modelUsePV to modelUsePVC as this is PVC. Make modelUsePVC high priority than modelUseHostPath. Signed-off-by: Dolpher Du --- .../common/speecht5/templates/deployment.yaml | 8 ++++---- helm-charts/common/speecht5/values.yaml | 13 ++++++++----- helm-charts/common/tei/templates/deployment.yaml | 8 ++++---- helm-charts/common/tei/values.yaml | 13 ++++++++----- .../common/teirerank/templates/deployment.yaml | 8 ++++---- helm-charts/common/teirerank/values.yaml | 13 ++++++++----- helm-charts/common/tgi/templates/deployment.yaml | 8 ++++---- helm-charts/common/tgi/values.yaml | 13 ++++++++----- .../common/whisper/templates/deployment.yaml | 8 ++++---- helm-charts/common/whisper/values.yaml | 13 ++++++++----- 10 files changed, 60 insertions(+), 45 deletions(-) diff --git a/helm-charts/common/speecht5/templates/deployment.yaml b/helm-charts/common/speecht5/templates/deployment.yaml index 475a99b89..dd7187288 100644 --- a/helm-charts/common/speecht5/templates/deployment.yaml +++ b/helm-charts/common/speecht5/templates/deployment.yaml @@ -70,13 +70,13 @@ spec: {{- toYaml .Values.resources | nindent 12 }} volumes: - name: model-volume - {{- if .Values.global.modelUseHostPath }} + {{- if .Values.global.modelUsePVC }} + persistentVolumeClaim: + claimName: {{ .Values.global.modelUsePVC }} + {{- else if .Values.global.modelUseHostPath }} hostPath: path: {{ .Values.global.modelUseHostPath }} type: Directory - {{- else if .Values.global.modelUsePV }} - persistentVolumeClaim: - claimName: {{ .Values.global.modelUsePV }} {{- else }} emptyDir: {} {{- end }} diff --git a/helm-charts/common/speecht5/values.yaml b/helm-charts/common/speecht5/values.yaml index 9e614f737..f6abcc0c5 100644 --- a/helm-charts/common/speecht5/values.yaml +++ b/helm-charts/common/speecht5/values.yaml @@ -86,8 +86,11 @@ global: no_proxy: "" # Choose where to save your downloaded models - # modelUseHostPath: Host directory path, this is good for one node test. - # modelUsePV: PersistentVolumeClaim(PVC) name, which is suitable for multinode deployment - # comment out both will not have model cache directory and download the model from huggingface. - modelUseHostPath: /mnt/opea-models - # modelUsePV: model-volume + # Set modelUseHostPath for local directory, this is good for one node test. Example: + # modelUseHostPath: /mnt/opea-models + # Set modelUsePVC for PersistentVolumeClaim(PVC), which is suitable for multinode deployment. Example: + # modelUsePVC: model-volume + # You can only set one of the following var, the behavior is not defined is both are set. + # By default, both var are set to empty, the model will be downloaded and saved to a tmp volume. + modelUseHostPath: "" + modelUsePVC: "" diff --git a/helm-charts/common/tei/templates/deployment.yaml b/helm-charts/common/tei/templates/deployment.yaml index cbb2e3cad..7467b9ab0 100644 --- a/helm-charts/common/tei/templates/deployment.yaml +++ b/helm-charts/common/tei/templates/deployment.yaml @@ -74,13 +74,13 @@ spec: {{- toYaml .Values.resources | nindent 12 }} volumes: - name: model-volume - {{- if .Values.global.modelUseHostPath }} + {{- if .Values.global.modelUsePVC }} + persistentVolumeClaim: + claimName: {{ .Values.global.modelUsePVC }} + {{- else if .Values.global.modelUseHostPath }} hostPath: path: {{ .Values.global.modelUseHostPath }} type: Directory - {{- else if .Values.global.modelUsePV }} - persistentVolumeClaim: - claimName: {{ .Values.global.modelUsePV }} {{- else }} emptyDir: {} {{- end }} diff --git a/helm-charts/common/tei/values.yaml b/helm-charts/common/tei/values.yaml index 9ce013fdb..a9edda93e 100644 --- a/helm-charts/common/tei/values.yaml +++ b/helm-charts/common/tei/values.yaml @@ -84,8 +84,11 @@ global: no_proxy: "" # Choose where to save your downloaded models - # modelUseHostPath: Host directory path, this is good for one node test. - # modelUsePV: PersistentVolumeClaim(PVC) name, which is suitable for multinode deployment - # comment out both will not have model cache directory and download the model from huggingface. - modelUseHostPath: /mnt/opea-models - # modelUsePV: model-volume + # Set modelUseHostPath for local directory, this is good for one node test. Example: + # modelUseHostPath: /mnt/opea-models + # Set modelUsePVC for PersistentVolumeClaim(PVC), which is suitable for multinode deployment. Example: + # modelUsePVC: model-volume + # You can only set one of the following var, the behavior is not defined is both are set. + # By default, both var are set to empty, the model will be downloaded and saved to a tmp volume. + modelUseHostPath: "" + modelUsePVC: "" diff --git a/helm-charts/common/teirerank/templates/deployment.yaml b/helm-charts/common/teirerank/templates/deployment.yaml index 3a75f8772..4a85b7fc6 100644 --- a/helm-charts/common/teirerank/templates/deployment.yaml +++ b/helm-charts/common/teirerank/templates/deployment.yaml @@ -74,13 +74,13 @@ spec: {{- toYaml .Values.resources | nindent 12 }} volumes: - name: model-volume - {{- if .Values.global.modelUseHostPath }} + {{- if .Values.global.modelUsePVC }} + persistentVolumeClaim: + claimName: {{ .Values.global.modelUsePVC }} + {{- else if .Values.global.modelUseHostPath }} hostPath: path: {{ .Values.global.modelUseHostPath }} type: Directory - {{- else if .Values.global.modelUsePV }} - persistentVolumeClaim: - claimName: {{ .Values.global.modelUsePV }} {{- else }} emptyDir: {} {{- end }} diff --git a/helm-charts/common/teirerank/values.yaml b/helm-charts/common/teirerank/values.yaml index 2b8e90fc8..80a4cf73a 100644 --- a/helm-charts/common/teirerank/values.yaml +++ b/helm-charts/common/teirerank/values.yaml @@ -84,8 +84,11 @@ global: no_proxy: "" # Choose where to save your downloaded models - # modelUseHostPath: Host directory path, this is good for one node test. - # modelUsePV: PersistentVolumeClaim(PVC) name, which is suitable for multinode deployment - # comment out both will not have model cache directory and download the model from huggingface. - modelUseHostPath: /mnt/opea-models - # modelUsePV: model-volume + # Set modelUseHostPath for local directory, this is good for one node test. Example: + # modelUseHostPath: /mnt/opea-models + # Set modelUsePVC for PersistentVolumeClaim(PVC), which is suitable for multinode deployment. Example: + # modelUsePVC: model-volume + # You can only set one of the following var, the behavior is not defined is both are set. + # By default, both var are set to empty, the model will be downloaded and saved to a tmp volume. + modelUseHostPath: "" + modelUsePVC: "" diff --git a/helm-charts/common/tgi/templates/deployment.yaml b/helm-charts/common/tgi/templates/deployment.yaml index 9dea3dc15..2ef224b59 100644 --- a/helm-charts/common/tgi/templates/deployment.yaml +++ b/helm-charts/common/tgi/templates/deployment.yaml @@ -70,13 +70,13 @@ spec: {{- toYaml .Values.resources | nindent 12 }} volumes: - name: model-volume - {{- if .Values.global.modelUseHostPath }} + {{- if .Values.global.modelUsePVC }} + persistentVolumeClaim: + claimName: {{ .Values.global.modelUsePVC }} + {{- else if .Values.global.modelUseHostPath }} hostPath: path: {{ .Values.global.modelUseHostPath }} type: Directory - {{- else if .Values.global.modelUsePV }} - persistentVolumeClaim: - claimName: {{ .Values.global.modelUsePV }} {{- else }} emptyDir: {} {{- end }} diff --git a/helm-charts/common/tgi/values.yaml b/helm-charts/common/tgi/values.yaml index 26893ecd5..0222c75bb 100644 --- a/helm-charts/common/tgi/values.yaml +++ b/helm-charts/common/tgi/values.yaml @@ -108,8 +108,11 @@ global: HUGGINGFACEHUB_API_TOKEN: "insert-your-huggingface-token-here" # Choose where to save your downloaded models - # modelUseHostPath: Host directory path, this is good for one node test. - # modelUsePV: PersistentVolumeClaim(PVC) name, which is suitable for multinode deployment - # comment out both will not have model cache directory and download the model from huggingface. - modelUseHostPath: /mnt/opea-models - # modelUsePV: model-volume + # Set modelUseHostPath for local directory, this is good for one node test. Example: + # modelUseHostPath: /mnt/opea-models + # Set modelUsePVC for PersistentVolumeClaim(PVC), which is suitable for multinode deployment. Example: + # modelUsePVC: model-volume + # You can only set one of the following var, the behavior is not defined is both are set. + # By default, both var are set to empty, the model will be downloaded and saved to a tmp volume. + modelUseHostPath: "" + modelUsePVC: "" diff --git a/helm-charts/common/whisper/templates/deployment.yaml b/helm-charts/common/whisper/templates/deployment.yaml index 8a9c1a1f9..1e1860ac3 100644 --- a/helm-charts/common/whisper/templates/deployment.yaml +++ b/helm-charts/common/whisper/templates/deployment.yaml @@ -70,13 +70,13 @@ spec: {{- toYaml .Values.resources | nindent 12 }} volumes: - name: model-volume - {{- if .Values.global.modelUseHostPath }} + {{- if .Values.global.modelUsePVC }} + persistentVolumeClaim: + claimName: {{ .Values.global.modelUsePVC }} + {{- else if .Values.global.modelUseHostPath }} hostPath: path: {{ .Values.global.modelUseHostPath }} type: Directory - {{- else if .Values.global.modelUsePV }} - persistentVolumeClaim: - claimName: {{ .Values.global.modelUsePV }} {{- else }} emptyDir: {} {{- end }} diff --git a/helm-charts/common/whisper/values.yaml b/helm-charts/common/whisper/values.yaml index 8c207fb8a..2d72d8864 100644 --- a/helm-charts/common/whisper/values.yaml +++ b/helm-charts/common/whisper/values.yaml @@ -85,8 +85,11 @@ global: no_proxy: "" # Choose where to save your downloaded models - # modelUseHostPath: Host directory path, this is good for one node test. - # modelUsePV: PersistentVolumeClaim(PVC) name, which is suitable for multinode deployment - # comment out both will not have model cache directory and download the model from huggingface. - modelUseHostPath: /mnt/opea-models - # modelUsePV: model-volume + # Set modelUseHostPath for local directory, this is good for one node test. Example: + # modelUseHostPath: /mnt/opea-models + # Set modelUsePVC for PersistentVolumeClaim(PVC), which is suitable for multinode deployment. Example: + # modelUsePVC: model-volume + # You can only set one of the following var, the behavior is not defined is both are set. + # By default, both var are set to empty, the model will be downloaded and saved to a tmp volume. + modelUseHostPath: "" + modelUsePVC: ""