Skip to content

Commit

Permalink
Set model-volume default to tmp volume
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
yongfengdu committed Aug 12, 2024
1 parent c0d2ba6 commit 466a7a2
Show file tree
Hide file tree
Showing 10 changed files with 60 additions and 45 deletions.
8 changes: 4 additions & 4 deletions helm-charts/common/speecht5/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
13 changes: 8 additions & 5 deletions helm-charts/common/speecht5/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: ""
8 changes: 4 additions & 4 deletions helm-charts/common/tei/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
13 changes: 8 additions & 5 deletions helm-charts/common/tei/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: ""
8 changes: 4 additions & 4 deletions helm-charts/common/teirerank/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
13 changes: 8 additions & 5 deletions helm-charts/common/teirerank/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: ""
8 changes: 4 additions & 4 deletions helm-charts/common/tgi/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
13 changes: 8 additions & 5 deletions helm-charts/common/tgi/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: ""
8 changes: 4 additions & 4 deletions helm-charts/common/whisper/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
13 changes: 8 additions & 5 deletions helm-charts/common/whisper/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: ""

0 comments on commit 466a7a2

Please sign in to comment.