Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable using PV as model cache directory #290

Merged
merged 1 commit into from
Aug 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions helm-charts/common/speecht5/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ spec:
hostPath:
path: {{ .Values.global.modelUseHostPath }}
type: Directory
{{- else if .Values.global.modelUsePV }}
persistentVolumeClaim:
claimName: {{ .Values.global.modelUsePV }}
{{- else }}
emptyDir: {}
{{- end }}
Expand Down
6 changes: 6 additions & 0 deletions helm-charts/common/speecht5/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,10 @@ global:
http_proxy: ""
https_proxy: ""
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
3 changes: 3 additions & 0 deletions helm-charts/common/tei/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ spec:
hostPath:
path: {{ .Values.global.modelUseHostPath }}
type: Directory
{{- else if .Values.global.modelUsePV }}
persistentVolumeClaim:
claimName: {{ .Values.global.modelUsePV }}
{{- else }}
emptyDir: {}
{{- end }}
Expand Down
8 changes: 6 additions & 2 deletions helm-charts/common/tei/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ global:
http_proxy: ""
https_proxy: ""
no_proxy: ""
# set modelUseHostPath to host directory if you want to use hostPath volume for model storage
# comment out modeluseHostPath if you want to download the model from huggingface

# 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
3 changes: 3 additions & 0 deletions helm-charts/common/teirerank/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ spec:
hostPath:
path: {{ .Values.global.modelUseHostPath }}
type: Directory
{{- else if .Values.global.modelUsePV }}
persistentVolumeClaim:
claimName: {{ .Values.global.modelUsePV }}
{{- else }}
emptyDir: {}
{{- end }}
Expand Down
8 changes: 6 additions & 2 deletions helm-charts/common/teirerank/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ global:
http_proxy: ""
https_proxy: ""
no_proxy: ""
# set modelUseHostPath to host directory if you want to use hostPath volume for model storage
# comment out modeluseHostPath if you want to download the model from huggingface

# 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
3 changes: 3 additions & 0 deletions helm-charts/common/tgi/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ spec:
hostPath:
path: {{ .Values.global.modelUseHostPath }}
type: Directory
{{- else if .Values.global.modelUsePV }}
persistentVolumeClaim:
claimName: {{ .Values.global.modelUsePV }}
{{- else }}
emptyDir: {}
{{- end }}
Expand Down
8 changes: 6 additions & 2 deletions helm-charts/common/tgi/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ global:
https_proxy: ""
no_proxy: ""
HUGGINGFACEHUB_API_TOKEN: "insert-your-huggingface-token-here"
# set modelUseHostPath to host directory if you want to use hostPath volume for model storage
# comment out modeluseHostPath if you want to download the model from huggingface

# 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
3 changes: 3 additions & 0 deletions helm-charts/common/whisper/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ spec:
hostPath:
path: {{ .Values.global.modelUseHostPath }}
type: Directory
{{- else if .Values.global.modelUsePV }}
persistentVolumeClaim:
claimName: {{ .Values.global.modelUsePV }}
{{- else }}
emptyDir: {}
{{- end }}
Expand Down
6 changes: 6 additions & 0 deletions helm-charts/common/whisper/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,10 @@ global:
http_proxy: ""
https_proxy: ""
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