Skip to content

Commit

Permalink
Merge branch 'opea-project:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
kkrishTa authored Jan 9, 2025
2 parents 484bfac + d9e5ed0 commit 3f135a8
Show file tree
Hide file tree
Showing 64 changed files with 780 additions and 1,007 deletions.
2 changes: 1 addition & 1 deletion .github/license_template.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Copyright (C) 2024 Intel Corporation
Copyright (C) 2025 Intel Corporation
SPDX-License-Identifier: Apache-2.0
4 changes: 4 additions & 0 deletions .github/workflows/pr-chart-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ jobs:
- name: Get test matrix
id: get-test-matrix
run: |
if grep -r '^version: ' `find helm-charts/ -name "Chart.yaml"` | grep -v "0-latest"; then
echo "Version check failed, main branch should always use version 0-latest"
exit 1
fi
base_commit=${{ github.event.pull_request.base.sha }}
merged_commit=$(git log -1 --format='%H')
e2e_charts=$(git diff --name-only ${base_commit} ${merged_commit} | \
Expand Down
66 changes: 66 additions & 0 deletions .github/workflows/releasedevhelm.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Copyright (C) 2025 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

name: Update the helm charts 0-latest

on:
pull_request:
branches:
- main
types: [closed]
paths:
- helm-charts/**
env:
CHARTS_DIR: "helm-charts"

jobs:
run-on-merge:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest

steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.ref }}

- name: Get the modified charts list
run: |
echo "This job runs after a PR is merged!"
if grep -r '^version: ' `find helm-charts/ -name "Chart.yaml"` | grep -v "0-latest"; then
echo "Version check failed, only update 0-latest"
exit 1
fi
base_commit=${{ github.event.pull_request.base.sha }}
merged_commit=$(git log -1 --format='%H')
# Update components
common_charts=$(git diff --name-only ${base_commit} ${merged_commit} | \
grep "^$CHARTS_DIR/common" | \
grep -vE 'README.md|*.sh' | \
cut -d'/' -f3 | sort -u )
echo "Charts to be updated: $common_charts"
echo "${{ secrets.ACTION_TOKEN }}" | helm registry login ghcr.io -u opea --password-stdin
pushd $CHARTS_DIR/common
for chart in ${common_charts}; do
echo "Updating $chart"
helm dependency update ${chart}
helm package $chart
helm push ${chart}-0-latest.tgz oci://ghcr.io/opea-project/charts
done
popd
# Update Examples
e2e_charts=$(git diff --name-only ${base_commit} ${merged_commit} | \
grep -v "common" | \
grep -vE 'README.md|*.sh' | \
cut -d'/' -f2 | sort -u )
echo "Charts to be updated: $e2e_charts"
echo "${{ secrets.ACTION_TOKEN }}" | helm registry login ghcr.io -u opea --password-stdin
pushd $CHARTS_DIR
for chart in ${e2e_charts}; do
echo "Updating $chart"
helm dependency update ${chart}
helm package $chart
helm push ${chart}-0-latest.tgz oci://ghcr.io/opea-project/charts
done
popd
12 changes: 3 additions & 9 deletions helm-charts/audioqna/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,21 @@ name: audioqna
description: The Helm chart to deploy AudioQnA
type: application
dependencies:
- name: asr
version: 0-latest
repository: "file://../common/asr"
- name: whisper
version: 0-latest
repository: "file://../common/whisper"
- name: tts
version: 0-latest
repository: "file://../common/tts"
- name: speecht5
version: 0-latest
repository: "file://../common/speecht5"
- name: tgi
version: 0-latest
repository: "file://../common/tgi"
- name: llm-uservice
version: 0-latest
repository: "file://../common/llm-uservice"
- name: ui
version: 0-latest
repository: "file://../common/ui"
alias: audioqna-ui
- name: nginx
version: 0-latest
repository: "file://../common/nginx"
version: 0-latest
appVersion: "1.1"
6 changes: 6 additions & 0 deletions helm-charts/audioqna/gaudi-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ tgi:
MAX_INPUT_LENGTH: "1024"
MAX_TOTAL_TOKENS: "2048"
CUDA_GRAPHS: ""
HF_HUB_DISABLE_PROGRESS_BARS: 1
HF_HUB_ENABLE_HF_TRANSFER: 0
ENABLE_HPU_GRAPH: true
LIMIT_HPU_GRAPH: true
USE_FLASH_ATTENTION: true
FLASH_ATTENTION_RECOMPUTE: true
livenessProbe:
initialDelaySeconds: 5
periodSeconds: 5
Expand Down
24 changes: 12 additions & 12 deletions helm-charts/audioqna/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,18 @@ spec:
containers:
- name: {{ .Release.Name }}
env:
- name: LLM_SERVICE_HOST_IP
value: {{ include "llm-uservice.fullname" (index .Subcharts "llm-uservice") }}
- name: LLM_SERVICE_PORT
value: {{ index .Values "llm-uservice" "service" "port" | quote }}
- name: ASR_SERVICE_HOST_IP
value: {{ include "asr.fullname" (index .Subcharts "asr") }}
- name: ASR_SERVICE_PORT
value: {{ index .Values "asr" "service" "port" | quote }}
- name: TTS_SERVICE_HOST_IP
value: {{ include "tts.fullname" (index .Subcharts "tts") }}
- name: TTS_SERVICE_PORT
value: {{ index .Values "tts" "service" "port" | quote }}
- name: LLM_SERVER_HOST_IP
value: {{ include "tgi.fullname" (index .Subcharts "tgi") }}
- name: LLM_SERVER_PORT
value: "80"
- name: WHISPER_SERVER_HOST_IP
value: {{ include "whisper.fullname" (index .Subcharts "whisper") }}
- name: WHISPER_SERVER_PORT
value: {{ index .Values "whisper" "service" "port" | quote }}
- name: SPEECHT5_SERVER_HOST_IP
value: {{ include "speecht5.fullname" (index .Subcharts "speecht5") }}
- name: SPEECHT5_SERVER_PORT
value: {{ index .Values "speecht5" "service" "port" | quote }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
Expand Down
107 changes: 0 additions & 107 deletions helm-charts/audioqna/templates/nginx-deployment.yaml

This file was deleted.

15 changes: 15 additions & 0 deletions helm-charts/audioqna/templates/nginx.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

apiVersion: v1
kind: ConfigMap
metadata:
name: {{ .Release.Name }}-nginx-config
labels:
{{- include "audioqna.labels" . | nindent 4 }}
data:
FRONTEND_SERVICE_IP: {{ include "ui.fullname" (index .Subcharts "audioqna-ui") | quote }}
FRONTEND_SERVICE_PORT: {{ index .Values "audioqna-ui" "service" "port" | quote }}
BACKEND_SERVICE_NAME: audioqna
BACKEND_SERVICE_IP: {{ include "audioqna.fullname" . | quote }}
BACKEND_SERVICE_PORT: {{ .Values.service.port | quote }}
8 changes: 4 additions & 4 deletions helm-charts/audioqna/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,6 @@ service:
type: ClusterIP
port: 3008

nginx:
service:
type: NodePort

nodeSelector: {}

tolerations: []
Expand All @@ -64,6 +60,10 @@ affinity: {}
tgi:
LLM_MODEL_ID: Intel/neural-chat-7b-v3-3

nginx:
service:
type: NodePort

audioqna-ui:
image:
repository: opea/audioqna-ui
Expand Down
19 changes: 18 additions & 1 deletion helm-charts/chatqna/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ dependencies:
version: 0-latest
alias: tgi-guardrails
repository: "file://../common/tgi"
condition: guardrails-usvc.enabled
condition: tgi-guardrails.enabled
- name: guardrails-usvc
version: 0-latest
repository: "file://../common/guardrails-usvc"
Expand All @@ -23,15 +23,29 @@ dependencies:
version: 0-latest
repository: "file://../common/vllm"
condition: vllm.enabled
- name: llm-uservice
version: 0-latest
repository: "file://../common/llm-uservice"
condition: llm-uservice.enabled
- name: tei
version: 0-latest
repository: "file://../common/tei"
- name: embedding-usvc
version: 0-latest
repository: "file://../common/embedding-usvc"
condition: embedding-usvc.enabled
- name: teirerank
version: 0-latest
repository: "file://../common/teirerank"
condition: teirerank.enabled
- name: reranking-usvc
version: 0-latest
repository: "file://../common/reranking-usvc"
condition: reranking-usvc.enabled
- name: redis-vector-db
version: 0-latest
repository: "file://../common/redis-vector-db"
condition: redis-vector-db.enabled
- name: retriever-usvc
version: 0-latest
repository: "file://../common/retriever-usvc"
Expand All @@ -42,5 +56,8 @@ dependencies:
alias: chatqna-ui
version: 0-latest
repository: "file://../common/ui"
- name: nginx
version: 0-latest
repository: "file://../common/nginx"
version: 0-latest
appVersion: "v1.0"
1 change: 1 addition & 0 deletions helm-charts/chatqna/guardrails-gaudi-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ tgi:
failureThreshold: 120

tgi-guardrails:
enabled: true
accelDevice: "gaudi"
LLM_MODEL_ID: "meta-llama/Meta-Llama-Guard-2-8B"
image:
Expand Down
1 change: 1 addition & 0 deletions helm-charts/chatqna/guardrails-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ guardrails-usvc:
# SAFETY_GUARD_ENDPOINT: "http://{{ .Release.Name }}-tgi-guardrails"
SAFETY_GUARD_MODEL_ID: "meta-llama/Meta-Llama-Guard-2-8B"
tgi-guardrails:
enabled: true
LLM_MODEL_ID: "meta-llama/Meta-Llama-Guard-2-8B"
11 changes: 11 additions & 0 deletions helm-charts/chatqna/norerank-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

# Accelerate inferencing in heaviest components to improve performance
# by overriding their subchart values

image:
repository: opea/chatqna-without-rerank

teirerank:
enabled: false
12 changes: 12 additions & 0 deletions helm-charts/chatqna/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,18 @@ spec:
value: {{ .Release.Name }}-guardrails-usvc
- name: GUARDRAIL_SERVICE_PORT
value: "9090"
- name: LLM_SERVICE_HOST_IP
value: {{ .Release.Name }}-llm-uservice
- name: LLM_SERVICE_PORT
value: "9000"
- name: RERANK_SERVICE_HOST_IP
value: {{ .Release.Name }}-reranking-usvc
- name: RERANK_SERVICE_PORT
value: "8000"
- name: EMBEDDING_SERVICE_HOST_IP
value: {{ .Release.Name }}-embedding-usvc
- name: EMBEDDING_SERVICE_PORT
value: "6000"
{{- if .Values.LOGFLAG }}
- name: LOGFLAG
value: {{ .Values.LOGFLAG | quote }}
Expand Down
Loading

0 comments on commit 3f135a8

Please sign in to comment.