Skip to content

Commit

Permalink
helm: Update helm manifest to address user raised issues (#267)
Browse files Browse the repository at this point in the history
* helm: Update helm manifest to address user raised issues
Signed-off-by: Lianhao Lu <[email protected]>
  • Loading branch information
lianhao authored Aug 7, 2024
1 parent 9dbe550 commit 4319660
Show file tree
Hide file tree
Showing 118 changed files with 428 additions and 340 deletions.
2 changes: 1 addition & 1 deletion helm-charts/chatqna/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ dependencies:
version: 0.8.0
repository: "file://../common/data-prep"
version: 0.8.0
appVersion: "1.0.0"
appVersion: "v0.8"
2 changes: 1 addition & 1 deletion helm-charts/chatqna/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ curl http://localhost:8888/v1/chatqna \

| Key | Type | Default | Description |
| ------------------------------- | ------ | ----------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| image.repository | string | `"opea/chatqna:latest"` | |
| image.repository | string | `"opea/chatqna"` | |
| service.port | string | `"8888"` | |
| global.HUGGINGFACEHUB_API_TOKEN | string | `""` | Your own Hugging Face API token |
| global.modelUseHostPath | string | `"/mnt/opea-models"` | Cached models directory, tgi will not download if the model is cached here. The host path "modelUseHostPath" will be mounted to container as /data directory. Set this to empty/null will force it to download models every time. |
Expand Down
41 changes: 0 additions & 41 deletions helm-charts/chatqna/nv-values.yaml
Original file line number Diff line number Diff line change
@@ -1,52 +1,11 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

# Default values for chatqna.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

replicaCount: 1

image:
repository: opea/chatqna:latest
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
# tag: "1.0"

port: 8888
service:
type: ClusterIP
port: 8888

securityContext:
readOnlyRootFilesystem: true
allowPrivilegeEscalation: false
runAsNonRoot: true
runAsUser: 1000
capabilities:
drop:
- ALL
seccompProfile:
type: RuntimeDefault

# To override values in subchart tgi
tgi:
LLM_MODEL_ID: Intel/neural-chat-7b-v3-3
# LLM_MODEL_ID: /data/OpenCodeInterpreter-DS-6.7B
image:
repository: ghcr.io/huggingface/text-generation-inference
tag: "2.0"
resources:
limits:
nvidia.com/gpu: 1

global:
http_proxy:
https_proxy:
no_proxy:
HUGGINGFACEHUB_API_TOKEN: "insert-your-huggingface-token-here"
LANGCHAIN_TRACING_V2: false
LANGCHAIN_API_KEY: "insert-your-langchain-key-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
modelUseHostPath: /mnt/opea-models
2 changes: 1 addition & 1 deletion helm-charts/chatqna/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ spec:
value: {{ .Release.Name }}-embedding-usvc
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}"
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
volumeMounts:
- mountPath: /tmp
Expand Down
17 changes: 11 additions & 6 deletions helm-charts/chatqna/templates/tests/test-pod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,17 @@ metadata:
spec:
containers:
- name: curl
image: alpine/curl
#image: python:3.10.14
command: ['sh', '-c']
image: python:3.10.14
command: ['bash', '-c']
args:
- |
curl http://{{ include "chatqna.fullname" . }}:{{ .Values.service.port }}/v1/chatqna -sS --fail-with-body \
-d '{"messages": "What is the revenue of Nike in 2023?"}' \
-H 'Content-Type: application/json'
max_retry=20;
for ((i=1; i<=max_retry; i++)); do
curl http://{{ include "chatqna.fullname" . }}:{{ .Values.service.port }}/v1/chatqna -sS --fail-with-body \
-d '{"messages": "What is the machine learning?"}' \
-H 'Content-Type: application/json' && 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
restartPolicy: Never
11 changes: 8 additions & 3 deletions helm-charts/chatqna/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
replicaCount: 1

image:
repository: opea/chatqna:latest
repository: opea/chatqna
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
# tag: "1.0"
tag: ""

port: 8888
service:
Expand All @@ -29,10 +29,15 @@ securityContext:
seccompProfile:
type: RuntimeDefault

nodeSelector: {}

tolerations: []

affinity: {}

# To override values in subchart tgi
tgi:
LLM_MODEL_ID: Intel/neural-chat-7b-v3-3
# LLM_MODEL_ID: /data/OpenCodeInterpreter-DS-6.7B

global:
http_proxy:
Expand Down
2 changes: 1 addition & 1 deletion helm-charts/codegen/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ dependencies:
version: 0.8.0
repository: "file://../common/llm-uservice"
version: 0.8.0
appVersion: "1.0.0"
appVersion: "v0.8"
2 changes: 1 addition & 1 deletion helm-charts/codegen/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ curl http://localhost:7778/v1/codegen \

| Key | Type | Default | Description |
| ------------------------------- | ------ | ------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| image.repository | string | `"opea/codegen:latest"` | |
| image.repository | string | `"opea/codegen"` | |
| service.port | string | `"7778"` | |
| global.HUGGINGFACEHUB_API_TOKEN | string | `""` | Your own Hugging Face API token |
| global.modelUseHostPath | string | `"/mnt/opea-models"` | Cached models directory, tgi will not download if the model is cached here. The host path "modelUseHostPath" will be mounted to container as /data directory. Set this to empty/null will force it to download models every time. |
Expand Down
2 changes: 1 addition & 1 deletion helm-charts/codegen/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ spec:
# value: {{ .Values.port }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}"
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
volumeMounts:
- mountPath: /tmp
Expand Down
15 changes: 10 additions & 5 deletions helm-charts/codegen/templates/tests/test-pod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,17 @@ metadata:
spec:
containers:
- name: curl
image: alpine/curl
#image: python:3.10.14
command: ['sh', '-c']
image: python:3.10.14
command: ['bash', '-c']
args:
- |
curl http://{{ include "codegen.fullname" . }}:{{ .Values.service.port }}/v1/codegen -sS --fail-with-body \
max_retry=20;
for ((i=1; i<=max_retry; i++)); do
curl http://{{ include "codegen.fullname" . }}:{{ .Values.service.port }}/v1/codegen -sS --fail-with-body \
-d '{"messages": "def print_hello_world():"}' \
-H 'Content-Type: application/json'
-H 'Content-Type: application/json' && 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
restartPolicy: Never
16 changes: 8 additions & 8 deletions helm-charts/codegen/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
replicaCount: 1

image:
repository: opea/codegen:latest
repository: opea/codegen
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
# tag: "1.0"
tag: ""

port: 7778
service:
Expand All @@ -29,12 +29,12 @@ securityContext:
seccompProfile:
type: RuntimeDefault

# To override values in subchart llm-uservice
llm-uservice:
image:
repository: opea/llm-tgi:latest
service:
port: 9000
nodeSelector: {}

tolerations: []

affinity: {}

# To override values in subchart tgi
tgi:
LLM_MODEL_ID: meta-llama/CodeLlama-7b-hf
Expand Down
2 changes: 1 addition & 1 deletion helm-charts/codetrans/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ dependencies:
version: 0.8.0
repository: "file://../common/llm-uservice"
version: 0.8.0
appVersion: "1.0.0"
appVersion: "v0.8"
2 changes: 1 addition & 1 deletion helm-charts/codetrans/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ curl http://localhost:7777/v1/codetrans \

| Key | Type | Default | Description |
| ------------------------------- | ------ | --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| image.repository | string | `"opea/codetrans:latest"` | |
| image.repository | string | `"opea/codetrans"` | |
| service.port | string | `"7777"` | |
| global.HUGGINGFACEHUB_API_TOKEN | string | `""` | Your own Hugging Face API token |
| global.modelUseHostPath | string | `"/mnt/opea-models"` | Cached models directory, tgi will not download if the model is cached here. The host path "modelUseHostPath" will be mounted to container as /data directory |
Expand Down
2 changes: 1 addition & 1 deletion helm-charts/codetrans/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ spec:
# value: {{ .Values.port }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}"
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
volumeMounts:
- mountPath: /tmp
Expand Down
15 changes: 10 additions & 5 deletions helm-charts/codetrans/templates/tests/test-pod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,17 @@ metadata:
spec:
containers:
- name: curl
image: alpine/curl
#image: python:3.10.14
command: ['sh', '-c']
image: python:3.10.14
command: ['bash', '-c']
args:
- |
curl http://{{ include "codetrans.fullname" . }}:{{ .Values.service.port }}/v1/codetrans -sS --fail-with-body \
max_retry=20;
for ((i=1; i<=max_retry; i++)); do
curl http://{{ include "codetrans.fullname" . }}:{{ .Values.service.port }}/v1/codetrans -sS --fail-with-body \
-H 'Content-Type: application/json' \
-d '{"language_from": "Golang","language_to": "Python","source_code": "package main\n\nimport \"fmt\"\nfunc main() {\n fmt.Println(\"Hello, World!\");\n}"}'
-d '{"language_from": "Golang","language_to": "Python","source_code": "package main\n\nimport \"fmt\"\nfunc main() {\n fmt.Println(\"Hello, World!\");\n}"}' && 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
restartPolicy: Never
17 changes: 8 additions & 9 deletions helm-charts/codetrans/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ replicaCount: 1
LLM_SERVICE_HOST_IP: ""

image:
repository: opea/codetrans:latest
repository: opea/codetrans
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
# tag: "1.0"
tag: ""

port: 7777
service:
Expand All @@ -30,16 +30,15 @@ securityContext:
seccompProfile:
type: RuntimeDefault

# To override values in subchart llm-uservice
llm-uservice:
image:
repository: opea/llm-tgi:latest
service:
port: 9000
nodeSelector: {}

tolerations: []

affinity: {}

# To override values in subchart tgi
tgi:
LLM_MODEL_ID: HuggingFaceH4/mistral-7b-grok
# LLM_MODEL_ID: /data/OpenCodeInterpreter-DS-6.7B

global:
http_proxy: ""
Expand Down
2 changes: 1 addition & 1 deletion helm-charts/common/asr/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: The Helm chart for deploying asr as microservice
type: application
version: 0.8.0
# The asr microservice server version
appVersion: "1.0.0"
appVersion: "v0.8"
dependencies:
- name: whisper
version: 0.8.0
Expand Down
10 changes: 5 additions & 5 deletions helm-charts/common/asr/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ curl http://localhost:9099/v1/audio/transcriptions \

## Values

| Key | Type | Default | Description |
| ---------------- | ------ | ------------------- | ----------- |
| image.repository | string | `"opea/asr:latest"` | |
| service.port | string | `"9099"` | |
| ASR_ENDPOINT | string | `""` | |
| Key | Type | Default | Description |
| ---------------- | ------ | ------------ | ----------- |
| image.repository | string | `"opea/asr"` | |
| service.port | string | `"9099"` | |
| ASR_ENDPOINT | string | `""` | |
4 changes: 4 additions & 0 deletions helm-charts/common/asr/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,8 @@ data:
{{- end }}
http_proxy: {{ .Values.global.http_proxy | quote }}
https_proxy: {{ .Values.global.https_proxy | quote }}
{{- if and (not .Values.ASR_ENDPOINT) (or .Values.global.http_proxy .Values.global.https_proxy) }}
no_proxy: "{{ .Release.Name }}-whisper,{{ .Values.global.no_proxy }}"
{{- else }}
no_proxy: {{ .Values.global.no_proxy | quote }}
{{- end }}
2 changes: 1 addition & 1 deletion helm-charts/common/asr/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ spec:
{{- end }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}"
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: asr
Expand Down
15 changes: 10 additions & 5 deletions helm-charts/common/asr/templates/tests/test-pod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,18 @@ metadata:
spec:
containers:
- name: curl
image: alpine/curl
#image: python:3.10.14
command: ['sh', '-c']
image: python:3.10.14
command: ['bash', '-c']
args:
- |
curl -sS --fail-with-body http://{{ include "asr.fullname" . }}:{{ .Values.service.port }}/v1/audio/transcriptions \
max_retry=20;
for ((i=1; i<=max_retry; i++)); do
curl -sS --fail-with-body http://{{ include "asr.fullname" . }}:{{ .Values.service.port }}/v1/audio/transcriptions \
-XPOST \
-d '{"byte_str": "UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA"}' \
-H 'Content-Type: application/json'
-H 'Content-Type: application/json' && 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
restartPolicy: Never
4 changes: 2 additions & 2 deletions helm-charts/common/asr/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ replicaCount: 1
ASR_ENDPOINT: ""

image:
repository: opea/asr:latest
repository: opea/asr
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
# tag: "1.0"
tag: ""

imagePullSecrets: []
nameOverride: ""
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ name: ui
description: A Helm chart to the UI for chatQnA workload
type: application
version: 0.8.0
appVersion: "1.0.0"
appVersion: "v0.8"
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ spec:
{{- end }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}"
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: ui
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
replicaCount: 1

image:
repository: opea/chatqna-conversation-ui:latest
repository: opea/chatqna-conversation-ui
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
# tag: ""
tag: ""

imagePullSecrets: []
nameOverride: ""
Expand Down
Loading

0 comments on commit 4319660

Please sign in to comment.