From c2a13d171485da0fe77a10590f9a682b05a0e53b Mon Sep 17 00:00:00 2001 From: Rui Zang Date: Tue, 20 Aug 2024 16:31:12 +0800 Subject: [PATCH 1/2] Initial commit for Intel Gaudi Base Operator (#311) * Initial commit for Intel Gaudi Base Operator Signed-off-by: Rui Zang --- README.md | 2 ++ kubernetes-addons/Intel-Gaudi-Base-Operator/README.md | 9 +++++++++ 2 files changed, 11 insertions(+) create mode 100644 kubernetes-addons/Intel-Gaudi-Base-Operator/README.md diff --git a/README.md b/README.md index d9ce5cba..5b1bb9be 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,8 @@ NOTE: Please make sure you configure the appropriate container runtime based on 4. [Install Intel Gaudi device plugin for Kubernetes](https://docs.habana.ai/en/latest/Orchestration/Gaudi_Kubernetes/Device_Plugin_for_Kubernetes.html). +Alternatively, Intel provides a base operator to manage the Gaudi software stack. Please refer to [this file](kubernetes-addons/Intel-Gaudi-Base-Operator/README.md) for details. + ## Usages ### Use GenAI Microservices Connector (GMC) to deploy and adjust GenAIExamples diff --git a/kubernetes-addons/Intel-Gaudi-Base-Operator/README.md b/kubernetes-addons/Intel-Gaudi-Base-Operator/README.md new file mode 100644 index 00000000..e04fb9d5 --- /dev/null +++ b/kubernetes-addons/Intel-Gaudi-Base-Operator/README.md @@ -0,0 +1,9 @@ +# Intel® Gaudi® Base Operator for Kubernetes + +Instead of installing Intel Gaudi software stack (drivers, container runtime, device plugin and etc.) manually, Intel Habana provides the [Intel® Gaudi® Base Operator for Kubernetes](https://docs.habana.ai/en/latest/Orchestration/Gaudi_Kubernetes/Intel_Gaudi_Base_Operator_for_Kubernetes.html) to ease the task. + +Intel® Gaudi® Base Operator for Kubernetes automates the management of all necessary Intel Gaudi software components on a Kubernetes cluster. These include drivers, Kubernetes device plugin, container runtime, feature discovery, and monitoring tools. + +[Here](https://docs.habana.ai/en/latest/Support_Matrix/Support_Matrix.html#support-matrix) is the support matrix for Kubernetes versions. + +For more detailded information and steps to proceed, please refer to the [Intel® Gaudi® Base Operator for Kubernetes](https://docs.habana.ai/en/latest/Orchestration/Gaudi_Kubernetes/Intel_Gaudi_Base_Operator_for_Kubernetes.html) manual page. From b1182c41229af8803d9d5888ac55c5e52780e2bd Mon Sep 17 00:00:00 2001 From: Lianhao Lu Date: Tue, 20 Aug 2024 19:14:46 +0800 Subject: [PATCH 2/2] misc changes (#324) * update_manifest.sh: Support specify image version * Rename chatqna-ui helm chart name to chatqna-ui Signed-off-by: Lianhao Lu --- helm-charts/common/chatqna-ui/Chart.yaml | 2 +- helm-charts/update_manifests.sh | 7 ++-- .../config/manifests/chatqna-ui.yaml | 33 +++++++++---------- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/helm-charts/common/chatqna-ui/Chart.yaml b/helm-charts/common/chatqna-ui/Chart.yaml index fe0cc078..755fc5a4 100644 --- a/helm-charts/common/chatqna-ui/Chart.yaml +++ b/helm-charts/common/chatqna-ui/Chart.yaml @@ -2,7 +2,7 @@ # SPDX-License-Identifier: Apache-2.0 apiVersion: v2 -name: ui +name: chatqna-ui description: A Helm chart to the UI for chatQnA workload type: application version: 0.8.0 diff --git a/helm-charts/update_manifests.sh b/helm-charts/update_manifests.sh index 42ee9b5c..2c1ad074 100755 --- a/helm-charts/update_manifests.sh +++ b/helm-charts/update_manifests.sh @@ -7,6 +7,7 @@ CUR_DIR=$(cd $(dirname "$0") && pwd) OUTPUTDIR=${CUR_DIR}/../microservices-connector/config/manifests MODELPATH="/mnt/opea-models" +NEWTAG="${NEWTAG:-latest}" # # generate_yaml # @@ -16,7 +17,7 @@ function generate_yaml { local extraparams="" if [[ $(grep -c 'tag: ""' ./common/$chart/values.yaml) != 0 ]]; then - extraparams="--set image.tag=latest" + extraparams="--set image.tag=$NEWTAG" fi helm template $chart ./common/$chart --skip-tests --values ./common/$chart/values.yaml --set global.extraEnvConfig=extra-env-config,global.modelUseHostPath=$MODELPATH,noProbe=true $extraparams > ${outputdir}/$chart.yaml @@ -25,7 +26,7 @@ function generate_yaml { ext=$(basename $f | cut -d'-' -f1) extraparams="" if [[ $(grep -c 'tag: ""' $f) != 0 ]]; then - extraparams="--set image.tag=latest" + extraparams="--set image.tag=$NEWTAG" fi helm template $chart ./common/$chart --skip-tests --values ${f} --set global.extraEnvConfig=extra-env-config,global.modelUseHostPath=$MODELPATH,noProbe=true $extraparams > ${outputdir}/${chart}_${ext}.yaml done @@ -43,4 +44,4 @@ done # we need special version of docsum-llm-uservice echo "Update manifest for docsum-llm-uservice..." -helm template docsum ./common/llm-uservice --skip-tests --set global.extraEnvConfig=extra-env-config,global.modelUseHostPath=$MODELPATH,noProbe=true,image.repository=opea/llm-docsum-tgi,image.tag=latest> ${OUTPUTDIR}/docsum-llm-uservice.yaml +helm template docsum ./common/llm-uservice --skip-tests --set global.extraEnvConfig=extra-env-config,global.modelUseHostPath=$MODELPATH,noProbe=true,image.repository=opea/llm-docsum-tgi,image.tag=$NEWTAG> ${OUTPUTDIR}/docsum-llm-uservice.yaml diff --git a/microservices-connector/config/manifests/chatqna-ui.yaml b/microservices-connector/config/manifests/chatqna-ui.yaml index 01a5c854..bf9fc340 100644 --- a/microservices-connector/config/manifests/chatqna-ui.yaml +++ b/microservices-connector/config/manifests/chatqna-ui.yaml @@ -1,5 +1,5 @@ --- -# Source: ui/templates/configmap.yaml +# Source: chatqna-ui/templates/configmap.yaml # Copyright (C) 2024 Intel Corporation # SPDX-License-Identifier: Apache-2.0 @@ -8,8 +8,8 @@ kind: ConfigMap metadata: name: chatqna-ui-config labels: - helm.sh/chart: ui-0.8.0 - app.kubernetes.io/name: ui + helm.sh/chart: chatqna-ui-0.8.0 + app.kubernetes.io/name: chatqna-ui app.kubernetes.io/instance: chatqna-ui app.kubernetes.io/version: "v0.8" app.kubernetes.io/managed-by: Helm @@ -17,15 +17,14 @@ data: http_proxy: "" https_proxy: "" no_proxy: "" - BACKEND_SERVICE_ENDPOINT: "" - DATAPREP_SERVICE_ENDPOINT: "" - DATAPREP_GET_FILE_ENDPOINT: "" + APP_BACKEND_SERVICE_ENDPOINT: "" + APP_DATA_PREP_SERVICE_URL: "" CHAT_BASE_URL: "" UPLOAD_FILE_BASE_URL: "" GET_FILE: "" DELETE_FILE: "" --- -# Source: ui/templates/service.yaml +# Source: chatqna-ui/templates/service.yaml # Copyright (C) 2024 Intel Corporation # SPDX-License-Identifier: Apache-2.0 @@ -34,8 +33,8 @@ kind: Service metadata: name: chatqna-ui labels: - helm.sh/chart: ui-0.8.0 - app.kubernetes.io/name: ui + helm.sh/chart: chatqna-ui-0.8.0 + app.kubernetes.io/name: chatqna-ui app.kubernetes.io/instance: chatqna-ui app.kubernetes.io/version: "v0.8" app.kubernetes.io/managed-by: Helm @@ -47,10 +46,10 @@ spec: protocol: TCP name: ui selector: - app.kubernetes.io/name: ui + app.kubernetes.io/name: chatqna-ui app.kubernetes.io/instance: chatqna-ui --- -# Source: ui/templates/deployment.yaml +# Source: chatqna-ui/templates/deployment.yaml # Copyright (C) 2024 Intel Corporation # SPDX-License-Identifier: Apache-2.0 @@ -59,8 +58,8 @@ kind: Deployment metadata: name: chatqna-ui labels: - helm.sh/chart: ui-0.8.0 - app.kubernetes.io/name: ui + helm.sh/chart: chatqna-ui-0.8.0 + app.kubernetes.io/name: chatqna-ui app.kubernetes.io/instance: chatqna-ui app.kubernetes.io/version: "v0.8" app.kubernetes.io/managed-by: Helm @@ -68,13 +67,13 @@ spec: replicas: 1 selector: matchLabels: - app.kubernetes.io/name: ui + app.kubernetes.io/name: chatqna-ui app.kubernetes.io/instance: chatqna-ui template: metadata: labels: - helm.sh/chart: ui-0.8.0 - app.kubernetes.io/name: ui + helm.sh/chart: chatqna-ui-0.8.0 + app.kubernetes.io/name: chatqna-ui app.kubernetes.io/instance: chatqna-ui app.kubernetes.io/version: "v0.8" app.kubernetes.io/managed-by: Helm @@ -82,7 +81,7 @@ spec: securityContext: {} containers: - - name: ui + - name: chatqna-ui envFrom: - configMapRef: name: chatqna-ui-config