Skip to content
Open
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
131861f
Optimize path and link validity check. (#462)
ZePan110 Oct 9, 2024
7cd488a
🚨 linter and pre-commit check fixes
krish918 Oct 16, 2024
1f121e9
✅ Added helm tests for all services | linting fixes
krish918 Oct 16, 2024
418edb7
✏ typo fix
krish918 Oct 17, 2024
24b4e3f
🛂 running vdms as root to fix errors
krish918 Oct 22, 2024
880e406
✅ updated tests for vdms-vector-db | typo fix
krish918 Oct 22, 2024
0110b85
⚡Updated and fixed several tests, values during integration
krish918 Oct 24, 2024
56afc63
🔥 removed hardcoded extraArgs for some comps
krish918 Oct 24, 2024
1a5f762
🔥 removed hardcoded extraArgs for some comps
krish918 Oct 24, 2024
5fbfe85
Merge branch 'main' into helm/videoqna
krish918 Oct 24, 2024
3bb015d
🩹 fixes for request going to nginx instead of videoqna
krish918 Oct 27, 2024
a29691b
🔨 passed nginx proxy endpoints to UI using templates
krish918 Oct 28, 2024
e8f58bb
🔨 passed nginx proxy endpoints to UI using templates
krish918 Oct 28, 2024
a8cbdbf
💚 added symbolic links to values files for CI
krish918 Oct 28, 2024
63bf7f6
💚 added symbolic links to values files for CI
krish918 Oct 28, 2024
cf4360f
📝 Added readme files for videoqna charts and subcharts
krish918 Oct 28, 2024
2d02cf9
💚 Added missing symbolic links for some values files
krish918 Oct 28, 2024
d03a52f
Merge branch 'main' into helm/videoqna
krish918 Oct 29, 2024
1e5eea1
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 29, 2024
6e832ea
💚 added variant prefix to all videoqna values file
krish918 Oct 29, 2024
fc17e30
💚 Added several CI fixes
krish918 Oct 30, 2024
5ee3dc0
updated videoqna-ui vars and configmap
krish918 Oct 30, 2024
ea180a5
Merge branch 'main' into helm/videoqna
krish918 Oct 30, 2024
ef695c8
🩹 Fixes in reranking values for enabling data-prep
krish918 Oct 31, 2024
7be67a1
🩹 fixes in chart.yaml | updates in UI configmap
krish918 Nov 1, 2024
3cf4f29
updated videoqna-ui values filename
krish918 Nov 1, 2024
0e37189
Merge branch 'main' into helm/videoqna
krish918 Nov 1, 2024
d13bdcb
🔥 Updates based on lvm-uservice from visualqna
krish918 Nov 4, 2024
c932c31
Merge branch 'main' into helm/videoqna
krish918 Nov 4, 2024
a993f1a
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Nov 4, 2024
773922e
🩹 fix videoqna new dependency values for lvm-uservice
krish918 Nov 4, 2024
4bd8b04
lvm-serving rename | replaced cachedir with modeldir
krish918 Nov 6, 2024
91f96ec
reverted to INDEX_NAME key
krish918 Nov 6, 2024
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
4 changes: 4 additions & 0 deletions helm-charts/common/data-prep/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ dependencies:
version: 1.0.0
repository: file://../redis-vector-db
condition: redis-vector-db.enabled
- name: vdms-vector-db
version: 1.0.0
repository: file://../vdms-vector-db
condition: vdms.enabled
- name: milvus
version: 4.2.12
repository: https://zilliztech.github.io/milvus-helm/
Expand Down
12 changes: 10 additions & 2 deletions helm-charts/common/data-prep/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@ metadata:
labels:
{{- include "data-prep.labels" . | nindent 4 }}
data:
{{- if .Values.vdmsHost }}
VDMS_HOST: {{ .Values.vdmsHost | quote }}
{{- else }}
VDMS_HOST: "{{ .Release.Name }}-vdms-vector-db"
{{- end }}
{{- if .Values.vdmsPort }}
VDMS_PORT: {{ .Values.vdmsPort | quote }}
{{- end }}
{{- if .Values.MOSEC_EMBEDDING_ENDPOINT }}
MOSEC_EMBEDDING_ENDPOINT: {{ .Values.MOSEC_EMBEDDING_ENDPOINT | quote}}
MOSEC_EMBEDDING_MODEL: {{ .Values.MOSEC_EMBEDDING_MODEL | quote}}
Expand All @@ -26,7 +34,7 @@ data:
{{- else }}
REDIS_URL: "redis://{{ .Release.Name }}-redis-vector-db:6379"
{{- end }}
INDEX_NAME: {{ .Values.INDEX_NAME | quote }}
INDEX_NAME: {{ .Values.indexName | quote }}
KEY_INDEX_NAME: {{ .Values.KEY_INDEX_NAME | quote }}
SEARCH_BATCH_SIZE: {{ .Values.SEARCH_BATCH_SIZE | quote }}
{{- if .Values.MILVUS_HOST }}
Expand All @@ -47,7 +55,7 @@ data:
http_proxy: {{ .Values.global.http_proxy | quote }}
https_proxy: {{ .Values.global.https_proxy | quote }}
{{- if and (not .Values.REDIS_URL) (and (not .Values.TEI_EMBEDDING_ENDPOINT) (or .Values.global.http_proxy .Values.global.https_proxy)) }}
no_proxy: "{{ .Release.Name }}-tei,{{ .Release.Name }}-redis-vector-db,{{ .Values.global.no_proxy }}"
no_proxy: "{{ .Release.Name }}-tei,{{ .Release.Name }}-redis-vector-db,{{ .Release.Name }}-vdms-vector-db,{{ .Values.global.no_proxy }}"
{{- else }}
no_proxy: {{ .Values.global.no_proxy | quote }}
{{- end }}
Expand Down
25 changes: 24 additions & 1 deletion helm-charts/common/data-prep/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,28 @@ spec:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if .Values.entryCommand }}
command: {{ .Values.entryCommand }}
{{- end }}
{{- if .Values.extraArgs }}
args:
{{- range .Values.extraArgs }}
- {{ . | quote }}
{{- end }}
{{- end }}
ports:
- name: data-prep
containerPort: {{ .Values.port }}
containerPort: {{ .Values.service.containerPort }}
protocol: TCP
volumeMounts:
{{- if .Values.global.cacheUseHostPath }}
- mountPath: /home/user/.cache/clip
Comment thread
yongfengdu marked this conversation as resolved.
name: cache-volume
subPath: clip
- mountPath: /home/user/.cache/huggingface/hub
Comment thread
yongfengdu marked this conversation as resolved.
name: cache-volume
subPath: huggingface/hub
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When using model-volume, the subPath is not necessary.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agree, not necessary. But I suppose, as same volume is being re-used to mount different paths from different pod/containers, having a subPath helps to have a proper directory hierarchy inside model-volume and helps with what is coming from which container path instead of dumping everything in the root of model-volume.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The model-volume was used to save the models downloaded from huggingface hub, which is the HUGGINGFACE_HUB_CACHE here https://huggingface.co/docs/text-generation-inference/en/reference/launcher#huggingfacehubcache

{{- end }}
- mountPath: /tmp
name: tmp
{{- if .Values.livenessProbe }}
Expand All @@ -63,6 +80,12 @@ spec:
resources:
{{- toYaml .Values.resources | nindent 12 }}
volumes:
{{- if .Values.global.cacheUseHostPath }}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comment above.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

- name: cache-volume
hostPath:
path: {{ .Values.global.cacheUseHostPath }}
type: Directory
{{- end }}
- name: tmp
emptyDir: {}
{{- with .Values.nodeSelector }}
Expand Down
2 changes: 1 addition & 1 deletion helm-charts/common/data-prep/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
targetPort: {{ .Values.port }}
targetPort: {{ .Values.service.containerPort }}
protocol: TCP
name: data-prep
selector:
Expand Down
16 changes: 16 additions & 0 deletions helm-charts/common/data-prep/templates/tests/test-pod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,21 @@ spec:
- name: curl
image: python:3.10.14
command: ['bash', '-c']
{{- if contains "dataprep-multimodal-vdms" .Values.image.repository }}
args:
- |
https_proxy={{ .Values.global.https_proxy }} curl -svLO "https://github.com/opea-project/GenAIExamples/raw/refs/heads/main/VideoQnA/docker_compose/intel/cpu/xeon/data/op_1_0320241830.mp4"
max_retry=5
for ((i=1; i<=max_retry; i++)); do
curl http://{{ include "data-prep.fullname" . }}:{{ .Values.service.port }}/v1/dataprep -sS --fail-with-body \
-X POST \
-H "Content-Type: multipart/form-data" \
-F "files=@./op_1_0320241830.mp4" && break;
curlcode=$?
if [[ $curlcode -eq 7 ]]; then sleep 10; else echo "curl failed with code $curlcode"; exit 1; fi;
done;
if [ $i -gt $max_retry ]; then echo "test failed with maximum retry"; exit 1; fi
{{- else }}
args:
- |
echo "test file" > /tmp/file1.txt;
Expand All @@ -32,4 +47,5 @@ spec:
-H "Content-Type: application/json" \
-d '{"file_path": "file1.txt"}';
if [ $i -gt $max_retry ]; then echo "test failed with maximum retry"; exit 1; fi
{{- end }}
restartPolicy: Never
6 changes: 5 additions & 1 deletion helm-charts/common/data-prep/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ milvus:
redis-vector-db:
enabled: false

vdms:
enabled: false

replicaCount: 1

image:
Expand Down Expand Up @@ -44,6 +47,7 @@ port: 6007
service:
type: ClusterIP
port: 6007
containerPort: 6007

resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
Expand Down Expand Up @@ -96,7 +100,7 @@ LOCAL_EMBEDDING_MODEL: ""

# redis DB service URL, e.g. redis://<service-name>:<port>
REDIS_URL: ""
INDEX_NAME: "rag-redis"
indexName: "rag-redis"
Comment thread
yongfengdu marked this conversation as resolved.
Outdated
KEY_INDEX_NAME: "file-keys"
SEARCH_BATCH_SIZE: 10

Expand Down
18 changes: 18 additions & 0 deletions helm-charts/common/data-prep/vdms-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright (C) 2024 Intel Corporation
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to change the file name vdms-values.yaml to variant_vdms-values.yaml so the update_manifest.sh can automatically pick this to generate manifests files for GMC. Please see llm_uservice as example

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

# SPDX-License-Identifier: Apache-2.0

image:
repository: opea/dataprep-multimodal-vdms
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: "latest"

indexName: "mega-videoqna"
vdmsHost: ""
vdmsPort: "8001"
entryCommand: ["/bin/sh"]
extraArgs: ["-c", "sleep 15 && python ingest_videos.py"]

# Set cacheUseHostPath to for caching encoding/embedding models and other related data
global:
cacheUseHostPath: ""
13 changes: 12 additions & 1 deletion helm-charts/common/embedding-usvc/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,14 @@ spec:
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: embedding-usvc
containerPort: 6000
containerPort: {{ .Values.service.containerPort }}
protocol: TCP
volumeMounts:
{{- if .Values.global.cacheUseHostPath }}
- mountPath: /home/user/.cache/huggingface/hub
name: cache-volume
subPath: huggingface/hub
{{- end }}
- mountPath: /tmp
name: tmp
{{- if .Values.livenessProbe }}
Expand All @@ -63,6 +68,12 @@ spec:
resources:
{{- toYaml .Values.resources | nindent 12 }}
volumes:
{{- if .Values.global.cacheUseHostPath }}
- name: cache-volume
hostPath:
path: {{ .Values.global.cacheUseHostPath }}
type: Directory
{{- end }}
- name: tmp
emptyDir: {}
{{- with .Values.nodeSelector }}
Expand Down
2 changes: 1 addition & 1 deletion helm-charts/common/embedding-usvc/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
targetPort: 6000
targetPort: {{ .Values.service.containerPort }}
protocol: TCP
name: embedding-usvc
selector:
Expand Down
1 change: 1 addition & 0 deletions helm-charts/common/embedding-usvc/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ service:
type: ClusterIP
# The default port for embedding service is 9000
port: 6000
containerPort: 6000

resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
Expand Down
15 changes: 15 additions & 0 deletions helm-charts/common/embedding-usvc/vdms-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright (C) 2024 Intel Corporation
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

again, please change use the variant_vdms-values.yaml as the file names so update_manifest.sh can pick it up automatically.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

# SPDX-License-Identifier: Apache-2.0

image:
repository: opea/embedding-multimodal-clip
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: "latest"

securityContext:
readOnlyRootFilesystem: false

# Set cacheUseHostPath to for caching encoding/embedding models and other related data
global:
cacheUseHostPath: ""
23 changes: 23 additions & 0 deletions helm-charts/common/lvm-serving/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
9 changes: 9 additions & 0 deletions helm-charts/common/lvm-serving/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

apiVersion: v2
name: lvm-serving
Comment thread
yongfengdu marked this conversation as resolved.
Outdated
description: A Helm chart for serving LVM
type: application
version: 1.0.0
appVersion: "v1.0"
62 changes: 62 additions & 0 deletions helm-charts/common/lvm-serving/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "lvm-serving.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "lvm-serving.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.nameOverride }}
{{- if contains $name .Release.Name }}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- end }}
{{- end }}

{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "lvm-serving.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Common labels
*/}}
{{- define "lvm-serving.labels" -}}
helm.sh/chart: {{ include "lvm-serving.chart" . }}
{{ include "lvm-serving.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}

{{/*
Selector labels
*/}}
{{- define "lvm-serving.selectorLabels" -}}
app.kubernetes.io/name: {{ include "lvm-serving.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Create the name of the service account to use
*/}}
{{- define "lvm-serving.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "lvm-serving.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}
14 changes: 14 additions & 0 deletions helm-charts/common/lvm-serving/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "lvm-serving.fullname" . }}-config
labels:
{{- include "lvm-serving.labels" . | nindent 4 }}
data:
llm_download: {{ .Values.llmDownload | quote | title }}
http_proxy: {{ .Values.global.http_proxy | quote }}
https_proxy: {{ .Values.global.https_proxy | quote }}
no_proxy: {{ .Values.global.no_proxy | quote }}
Loading