diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8ebc70f0..9a4e1f0b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -13,12 +13,14 @@ repos: - id: requirements-txt-fixer - id: trailing-whitespace files: (.*\.(py|rst|cmake|yaml|yml|json|ts|js|html|svelte|sh))$ + exclude: (microservices-connector/config/manifests/.*\.yaml)$ - repo: https://github.com/Lucas-C/pre-commit-hooks rev: v1.5.5 hooks: - id: insert-license files: (.*\.(py|yaml|yml|sh))$ + exclude: (microservices-connector/config/manifests/.*\.yaml)$ args: [ --license-filepath=.github/license_template.txt, diff --git a/helm-charts/common/gpt-sovits/values.yaml b/helm-charts/common/gpt-sovits/values.yaml index 05b8f828..d685d344 100644 --- a/helm-charts/common/gpt-sovits/values.yaml +++ b/helm-charts/common/gpt-sovits/values.yaml @@ -77,6 +77,6 @@ tolerations: [] affinity: {} global: - gpt-sovits_proxy: "" - gpt-sovitss_proxy: "" + http_proxy: "" + https_proxy: "" no_proxy: "" diff --git a/helm-charts/update_manifests.sh b/helm-charts/update_manifests.sh index d57e09a6..782e693f 100755 --- a/helm-charts/update_manifests.sh +++ b/helm-charts/update_manifests.sh @@ -31,7 +31,7 @@ function generate_yaml { if [[ "$filename" =~ ^variant_.*-values.yaml ]]; then ext=$(echo $filename | sed 's/^variant_//' | sed 's/-values.yaml$//') outputfile="$ext-${chart}.yaml" - releasename=$ext-$chart + releasename=$(echo "${ext}-${chart}" | sed 's/_/-/g') else ext=$(echo $filename | sed 's/-values.yaml$//') outputfile="${chart}_${ext}.yaml" diff --git a/microservices-connector/config/manifests/agent.yaml b/microservices-connector/config/manifests/agent.yaml new file mode 100644 index 00000000..ba5fe88b --- /dev/null +++ b/microservices-connector/config/manifests/agent.yaml @@ -0,0 +1,143 @@ +--- +# Source: agent/templates/configmap.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: v1 +kind: ConfigMap +metadata: + name: agent-config + labels: + helm.sh/chart: agent-1.0.0 + app.kubernetes.io/name: agent + app.kubernetes.io/instance: agent + app.kubernetes.io/version: "v1.0" + app.kubernetes.io/managed-by: Helm +data: + llm_endpoint_url: "http://agent-tgi" + # + model: "meta-llama/Meta-Llama-3.1-70B-Instruct" + RETRIEVAL_TOOL_URL: "http://agent-docretriever:8889/v1/retrievaltool" + CRAG_SERVER: "http://agent-crag:8080" + WORKER_AGENT_URL: "http://agent-worker:9095/v1/chat/completions" + require_human_feedback: "false" + recursion_limit: "15" + llm_engine: "tgi" + strategy: "react_langchain" + max_new_tokens: "4096" + HUGGINGFACEHUB_API_TOKEN: "insert-your-huggingface-token-here" + HF_HOME: "/tmp/.cache/huggingface" + http_proxy: "" + https_proxy: "" + no_proxy: "" + LOGFLAG: "True" +--- +# Source: agent/templates/service.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: v1 +kind: Service +metadata: + name: agent + labels: + helm.sh/chart: agent-1.0.0 + app.kubernetes.io/name: agent + app.kubernetes.io/instance: agent + app.kubernetes.io/version: "v1.0" + app.kubernetes.io/managed-by: Helm +spec: + type: ClusterIP + ports: + - port: 9090 + targetPort: 9090 + protocol: TCP + name: agent + selector: + app.kubernetes.io/name: agent + app.kubernetes.io/instance: agent +--- +# Source: agent/templates/deployment.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: apps/v1 +kind: Deployment +metadata: + name: agent + labels: + helm.sh/chart: agent-1.0.0 + app.kubernetes.io/name: agent + app.kubernetes.io/instance: agent + app.kubernetes.io/version: "v1.0" + app.kubernetes.io/managed-by: Helm +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: agent + app.kubernetes.io/instance: agent + template: + metadata: + labels: + app.kubernetes.io/name: agent + app.kubernetes.io/instance: agent + spec: + securityContext: + {} + containers: + - name: agent + envFrom: + - configMapRef: + name: agent-config + - configMapRef: + name: extra-env-config + optional: true + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + readOnlyRootFilesystem: false + runAsNonRoot: true + runAsUser: 1000 + seccompProfile: + type: RuntimeDefault + image: "opea/agent-langchain:latest" + imagePullPolicy: IfNotPresent + ports: + - name: agent + containerPort: 9090 + protocol: TCP + volumeMounts: + - mountPath: /tmp + name: tmp + livenessProbe: + failureThreshold: 24 + httpGet: + path: v1/health_check + port: agent + initialDelaySeconds: 5 + periodSeconds: 5 + readinessProbe: + httpGet: + path: v1/health_check + port: agent + initialDelaySeconds: 5 + periodSeconds: 5 + startupProbe: + failureThreshold: 120 + httpGet: + path: v1/health_check + port: agent + initialDelaySeconds: 5 + periodSeconds: 5 + resources: + {} + volumes: + - name: tmp + emptyDir: {} +--- +# Source: agent/templates/servicemonitor.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 diff --git a/microservices-connector/config/manifests/agent_gaudi.yaml b/microservices-connector/config/manifests/agent_gaudi.yaml new file mode 100644 index 00000000..b3083cd2 --- /dev/null +++ b/microservices-connector/config/manifests/agent_gaudi.yaml @@ -0,0 +1,307 @@ +--- +# Source: agent/charts/tgi/templates/configmap.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: v1 +kind: ConfigMap +metadata: + name: agent-tgi-config + labels: + helm.sh/chart: tgi-1.0.0 + app.kubernetes.io/name: tgi + app.kubernetes.io/instance: agent + app.kubernetes.io/version: "2.1.0" + app.kubernetes.io/managed-by: Helm +data: + MODEL_ID: "meta-llama/Meta-Llama-3.1-70B-Instruct" + PORT: "2080" + HF_TOKEN: "insert-your-huggingface-token-here" + http_proxy: "" + https_proxy: "" + no_proxy: "" + HABANA_LOGS: "/tmp/habana_logs" + NUMBA_CACHE_DIR: "/tmp" + HF_HOME: "/tmp/.cache/huggingface" + MAX_INPUT_LENGTH: "4096" + MAX_TOTAL_TOKENS: "8192" + HF_HUB_DISABLE_PROGRESS_BARS: "1" + HF_HUB_ENABLE_HF_TRANSFER: "0" + # More options for HPU + OMPI_MCA_btl_vader_single_copy_mechanism: "none" + PT_HPU_ENABLE_LAZY_COLLECTIVES: "true" + ENABLE_HPU_GRAPH: "true" + LIMIT_HPU_GRAPH: "true" + USE_FLASH_ATTENTION: "true" + FLASH_ATTENTION_RECOMPUTE: "true" +--- +# Source: agent/templates/configmap.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: v1 +kind: ConfigMap +metadata: + name: agent-config + labels: + helm.sh/chart: agent-1.0.0 + app.kubernetes.io/name: agent + app.kubernetes.io/instance: agent + app.kubernetes.io/version: "v1.0" + app.kubernetes.io/managed-by: Helm +data: + llm_endpoint_url: "http://agent-tgi" + # + model: "meta-llama/Meta-Llama-3.1-70B-Instruct" + RETRIEVAL_TOOL_URL: "http://agent-docretriever:8889/v1/retrievaltool" + CRAG_SERVER: "http://agent-crag:8080" + WORKER_AGENT_URL: "http://agent-worker:9095/v1/chat/completions" + require_human_feedback: "false" + recursion_limit: "15" + llm_engine: "tgi" + strategy: "react_langchain" + max_new_tokens: "4096" + HUGGINGFACEHUB_API_TOKEN: "insert-your-huggingface-token-here" + HF_HOME: "/tmp/.cache/huggingface" + http_proxy: "" + https_proxy: "" + no_proxy: "" + LOGFLAG: "True" +--- +# Source: agent/charts/tgi/templates/service.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: v1 +kind: Service +metadata: + name: agent-tgi + labels: + helm.sh/chart: tgi-1.0.0 + app.kubernetes.io/name: tgi + app.kubernetes.io/instance: agent + app.kubernetes.io/version: "2.1.0" + app.kubernetes.io/managed-by: Helm +spec: + type: ClusterIP + ports: + - port: 80 + targetPort: 2080 + protocol: TCP + name: tgi + selector: + app.kubernetes.io/name: tgi + app.kubernetes.io/instance: agent +--- +# Source: agent/templates/service.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: v1 +kind: Service +metadata: + name: agent + labels: + helm.sh/chart: agent-1.0.0 + app.kubernetes.io/name: agent + app.kubernetes.io/instance: agent + app.kubernetes.io/version: "v1.0" + app.kubernetes.io/managed-by: Helm +spec: + type: ClusterIP + ports: + - port: 9090 + targetPort: 9090 + protocol: TCP + name: agent + selector: + app.kubernetes.io/name: agent + app.kubernetes.io/instance: agent +--- +# Source: agent/charts/tgi/templates/deployment.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: apps/v1 +kind: Deployment +metadata: + name: agent-tgi + labels: + helm.sh/chart: tgi-1.0.0 + app.kubernetes.io/name: tgi + app.kubernetes.io/instance: agent + app.kubernetes.io/version: "2.1.0" + app.kubernetes.io/managed-by: Helm +spec: + selector: + matchLabels: + app.kubernetes.io/name: tgi + app.kubernetes.io/instance: agent + template: + metadata: + labels: + app.kubernetes.io/name: tgi + app.kubernetes.io/instance: agent + spec: + securityContext: + {} + containers: + - name: tgi + envFrom: + - configMapRef: + name: agent-tgi-config + - configMapRef: + name: extra-env-config + optional: true + securityContext: + {} + image: "ghcr.io/huggingface/tgi-gaudi:2.0.6" + imagePullPolicy: IfNotPresent + args: + - "--sharded" + - "true" + - "--num-shard" + - "4" + volumeMounts: + - mountPath: /data + name: model-volume + - mountPath: /dev/shm + name: shm + - mountPath: /tmp + name: tmp + ports: + - name: http + containerPort: 2080 + protocol: TCP + livenessProbe: + failureThreshold: 24 + initialDelaySeconds: 5 + periodSeconds: 5 + tcpSocket: + port: http + timeoutSeconds: 1 + readinessProbe: + initialDelaySeconds: 5 + periodSeconds: 5 + tcpSocket: + port: http + timeoutSeconds: 1 + startupProbe: + failureThreshold: 120 + initialDelaySeconds: 5 + periodSeconds: 5 + tcpSocket: + port: http + timeoutSeconds: 1 + resources: + limits: + habana.ai/gaudi: 4 + volumes: + - name: model-volume + hostPath: + path: /mnt/opea-models + type: Directory + - name: shm + emptyDir: + medium: Memory + sizeLimit: 1Gi + - name: tmp + emptyDir: {} +--- +# Source: agent/templates/deployment.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: apps/v1 +kind: Deployment +metadata: + name: agent + labels: + helm.sh/chart: agent-1.0.0 + app.kubernetes.io/name: agent + app.kubernetes.io/instance: agent + app.kubernetes.io/version: "v1.0" + app.kubernetes.io/managed-by: Helm +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: agent + app.kubernetes.io/instance: agent + template: + metadata: + labels: + app.kubernetes.io/name: agent + app.kubernetes.io/instance: agent + spec: + securityContext: + {} + containers: + - name: agent + envFrom: + - configMapRef: + name: agent-config + - configMapRef: + name: extra-env-config + optional: true + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + readOnlyRootFilesystem: false + runAsNonRoot: true + runAsUser: 1000 + seccompProfile: + type: RuntimeDefault + image: "opea/agent-langchain:latest" + imagePullPolicy: IfNotPresent + ports: + - name: agent + containerPort: 9090 + protocol: TCP + volumeMounts: + - mountPath: /tmp + name: tmp + livenessProbe: + failureThreshold: 24 + httpGet: + path: v1/health_check + port: agent + initialDelaySeconds: 5 + periodSeconds: 5 + readinessProbe: + httpGet: + path: v1/health_check + port: agent + initialDelaySeconds: 5 + periodSeconds: 5 + startupProbe: + failureThreshold: 120 + httpGet: + path: v1/health_check + port: agent + initialDelaySeconds: 5 + periodSeconds: 5 + resources: + {} + volumes: + - name: tmp + emptyDir: {} +--- +# Source: agent/charts/tgi/templates/horizontal-pod-autoscaler.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 +--- +# Source: agent/charts/tgi/templates/servicemonitor.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 +# +# Dashboard for the exposed TGI metrics: +# - https://grafana.com/grafana/dashboards/19831-text-generation-inference-dashboard/ +# Metric descriptions: +# - https://github.com/huggingface/text-generation-inference/discussions/1127#discussioncomment-7240527 +--- +# Source: agent/templates/servicemonitor.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 diff --git a/microservices-connector/config/manifests/chatqna_svelte-ui.yaml b/microservices-connector/config/manifests/chatqna_svelte-ui.yaml new file mode 100644 index 00000000..ca55bdeb --- /dev/null +++ b/microservices-connector/config/manifests/chatqna_svelte-ui.yaml @@ -0,0 +1,121 @@ +--- +# Source: ui/templates/configmap.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: v1 +kind: ConfigMap +metadata: + name: chatqna-svelte-ui-config + labels: + helm.sh/chart: ui-1.0.0 + app.kubernetes.io/name: ui + app.kubernetes.io/instance: chatqna-svelte-ui + app.kubernetes.io/version: "v1.0" + app.kubernetes.io/managed-by: Helm +data: + CHAT_BASE_URL: "/v1/chatqna" + UPLOAD_FILE_BASE_URL: "/v1/dataprep" + GET_FILE: "/v1/dataprep/get_file" + DELETE_FILE: "/v1/dataprep/delete_file" +--- +# Source: ui/templates/service.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: v1 +kind: Service +metadata: + name: chatqna-svelte-ui + labels: + helm.sh/chart: ui-1.0.0 + app.kubernetes.io/name: ui + app.kubernetes.io/instance: chatqna-svelte-ui + app.kubernetes.io/version: "v1.0" + app.kubernetes.io/managed-by: Helm +spec: + type: ClusterIP + ports: + - port: 5174 + targetPort: ui + protocol: TCP + name: ui + selector: + app.kubernetes.io/name: ui + app.kubernetes.io/instance: chatqna-svelte-ui +--- +# Source: ui/templates/deployment.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: apps/v1 +kind: Deployment +metadata: + name: chatqna-svelte-ui + labels: + helm.sh/chart: ui-1.0.0 + app.kubernetes.io/name: ui + app.kubernetes.io/instance: chatqna-svelte-ui + app.kubernetes.io/version: "v1.0" + app.kubernetes.io/managed-by: Helm +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: ui + app.kubernetes.io/instance: chatqna-svelte-ui + template: + metadata: + labels: + helm.sh/chart: ui-1.0.0 + app.kubernetes.io/name: ui + app.kubernetes.io/instance: chatqna-svelte-ui + app.kubernetes.io/version: "v1.0" + app.kubernetes.io/managed-by: Helm + spec: + securityContext: + {} + containers: + - name: ui + envFrom: + - configMapRef: + name: chatqna-svelte-ui-config + - configMapRef: + name: extra-env-config + optional: true + securityContext: + {} + image: "opea/chatqna-ui:latest" + imagePullPolicy: IfNotPresent + ports: + - name: ui + containerPort: 5173 + protocol: TCP + livenessProbe: + failureThreshold: 24 + httpGet: + path: / + port: ui + initialDelaySeconds: 5 + periodSeconds: 5 + readinessProbe: + httpGet: + path: / + port: ui + initialDelaySeconds: 5 + periodSeconds: 5 + startupProbe: + failureThreshold: 120 + httpGet: + path: / + port: ui + initialDelaySeconds: 5 + periodSeconds: 5 + resources: + {} + volumeMounts: + - mountPath: /tmp + name: tmp + volumes: + - name: tmp + emptyDir: {} diff --git a/microservices-connector/config/manifests/codegen_react-ui.yaml b/microservices-connector/config/manifests/codegen_react-ui.yaml new file mode 100644 index 00000000..f77be5b4 --- /dev/null +++ b/microservices-connector/config/manifests/codegen_react-ui.yaml @@ -0,0 +1,118 @@ +--- +# Source: ui/templates/configmap.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: v1 +kind: ConfigMap +metadata: + name: codegen-react-ui-config + labels: + helm.sh/chart: ui-1.0.0 + app.kubernetes.io/name: ui + app.kubernetes.io/instance: codegen-react-ui + app.kubernetes.io/version: "v1.0" + app.kubernetes.io/managed-by: Helm +data: + VITE_CODE_GEN_URL: "/v1/codegen" +--- +# Source: ui/templates/service.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: v1 +kind: Service +metadata: + name: codegen-react-ui + labels: + helm.sh/chart: ui-1.0.0 + app.kubernetes.io/name: ui + app.kubernetes.io/instance: codegen-react-ui + app.kubernetes.io/version: "v1.0" + app.kubernetes.io/managed-by: Helm +spec: + type: ClusterIP + ports: + - port: 5174 + targetPort: ui + protocol: TCP + name: ui + selector: + app.kubernetes.io/name: ui + app.kubernetes.io/instance: codegen-react-ui +--- +# Source: ui/templates/deployment.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: apps/v1 +kind: Deployment +metadata: + name: codegen-react-ui + labels: + helm.sh/chart: ui-1.0.0 + app.kubernetes.io/name: ui + app.kubernetes.io/instance: codegen-react-ui + app.kubernetes.io/version: "v1.0" + app.kubernetes.io/managed-by: Helm +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: ui + app.kubernetes.io/instance: codegen-react-ui + template: + metadata: + labels: + helm.sh/chart: ui-1.0.0 + app.kubernetes.io/name: ui + app.kubernetes.io/instance: codegen-react-ui + app.kubernetes.io/version: "v1.0" + app.kubernetes.io/managed-by: Helm + spec: + securityContext: + {} + containers: + - name: ui + envFrom: + - configMapRef: + name: codegen-react-ui-config + - configMapRef: + name: extra-env-config + optional: true + securityContext: + {} + image: "opea/codegen-react-ui:latest" + imagePullPolicy: IfNotPresent + ports: + - name: ui + containerPort: 80 + protocol: TCP + livenessProbe: + failureThreshold: 24 + httpGet: + path: / + port: ui + initialDelaySeconds: 5 + periodSeconds: 5 + readinessProbe: + httpGet: + path: / + port: ui + initialDelaySeconds: 5 + periodSeconds: 5 + startupProbe: + failureThreshold: 120 + httpGet: + path: / + port: ui + initialDelaySeconds: 5 + periodSeconds: 5 + resources: + {} + volumeMounts: + - mountPath: /tmp + name: tmp + volumes: + - name: tmp + emptyDir: {} diff --git a/microservices-connector/config/manifests/codegen_svelte-ui.yaml b/microservices-connector/config/manifests/codegen_svelte-ui.yaml new file mode 100644 index 00000000..f1e71d85 --- /dev/null +++ b/microservices-connector/config/manifests/codegen_svelte-ui.yaml @@ -0,0 +1,118 @@ +--- +# Source: ui/templates/configmap.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: v1 +kind: ConfigMap +metadata: + name: codegen-svelte-ui-config + labels: + helm.sh/chart: ui-1.0.0 + app.kubernetes.io/name: ui + app.kubernetes.io/instance: codegen-svelte-ui + app.kubernetes.io/version: "v1.0" + app.kubernetes.io/managed-by: Helm +data: + BASIC_URL: "/v1/codegen" +--- +# Source: ui/templates/service.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: v1 +kind: Service +metadata: + name: codegen-svelte-ui + labels: + helm.sh/chart: ui-1.0.0 + app.kubernetes.io/name: ui + app.kubernetes.io/instance: codegen-svelte-ui + app.kubernetes.io/version: "v1.0" + app.kubernetes.io/managed-by: Helm +spec: + type: ClusterIP + ports: + - port: 5174 + targetPort: ui + protocol: TCP + name: ui + selector: + app.kubernetes.io/name: ui + app.kubernetes.io/instance: codegen-svelte-ui +--- +# Source: ui/templates/deployment.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: apps/v1 +kind: Deployment +metadata: + name: codegen-svelte-ui + labels: + helm.sh/chart: ui-1.0.0 + app.kubernetes.io/name: ui + app.kubernetes.io/instance: codegen-svelte-ui + app.kubernetes.io/version: "v1.0" + app.kubernetes.io/managed-by: Helm +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: ui + app.kubernetes.io/instance: codegen-svelte-ui + template: + metadata: + labels: + helm.sh/chart: ui-1.0.0 + app.kubernetes.io/name: ui + app.kubernetes.io/instance: codegen-svelte-ui + app.kubernetes.io/version: "v1.0" + app.kubernetes.io/managed-by: Helm + spec: + securityContext: + {} + containers: + - name: ui + envFrom: + - configMapRef: + name: codegen-svelte-ui-config + - configMapRef: + name: extra-env-config + optional: true + securityContext: + {} + image: "opea/codegen-ui:latest" + imagePullPolicy: IfNotPresent + ports: + - name: ui + containerPort: 5173 + protocol: TCP + livenessProbe: + failureThreshold: 24 + httpGet: + path: / + port: ui + initialDelaySeconds: 5 + periodSeconds: 5 + readinessProbe: + httpGet: + path: / + port: ui + initialDelaySeconds: 5 + periodSeconds: 5 + startupProbe: + failureThreshold: 120 + httpGet: + path: / + port: ui + initialDelaySeconds: 5 + periodSeconds: 5 + resources: + {} + volumeMounts: + - mountPath: /tmp + name: tmp + volumes: + - name: tmp + emptyDir: {} diff --git a/microservices-connector/config/manifests/codetrans_svelte-ui.yaml b/microservices-connector/config/manifests/codetrans_svelte-ui.yaml new file mode 100644 index 00000000..d26bbd4d --- /dev/null +++ b/microservices-connector/config/manifests/codetrans_svelte-ui.yaml @@ -0,0 +1,118 @@ +--- +# Source: ui/templates/configmap.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: v1 +kind: ConfigMap +metadata: + name: codetrans-svelte-ui-config + labels: + helm.sh/chart: ui-1.0.0 + app.kubernetes.io/name: ui + app.kubernetes.io/instance: codetrans-svelte-ui + app.kubernetes.io/version: "v1.0" + app.kubernetes.io/managed-by: Helm +data: + BASE_URL: "/v1/codetrans" +--- +# Source: ui/templates/service.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: v1 +kind: Service +metadata: + name: codetrans-svelte-ui + labels: + helm.sh/chart: ui-1.0.0 + app.kubernetes.io/name: ui + app.kubernetes.io/instance: codetrans-svelte-ui + app.kubernetes.io/version: "v1.0" + app.kubernetes.io/managed-by: Helm +spec: + type: ClusterIP + ports: + - port: 5174 + targetPort: ui + protocol: TCP + name: ui + selector: + app.kubernetes.io/name: ui + app.kubernetes.io/instance: codetrans-svelte-ui +--- +# Source: ui/templates/deployment.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: apps/v1 +kind: Deployment +metadata: + name: codetrans-svelte-ui + labels: + helm.sh/chart: ui-1.0.0 + app.kubernetes.io/name: ui + app.kubernetes.io/instance: codetrans-svelte-ui + app.kubernetes.io/version: "v1.0" + app.kubernetes.io/managed-by: Helm +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: ui + app.kubernetes.io/instance: codetrans-svelte-ui + template: + metadata: + labels: + helm.sh/chart: ui-1.0.0 + app.kubernetes.io/name: ui + app.kubernetes.io/instance: codetrans-svelte-ui + app.kubernetes.io/version: "v1.0" + app.kubernetes.io/managed-by: Helm + spec: + securityContext: + {} + containers: + - name: ui + envFrom: + - configMapRef: + name: codetrans-svelte-ui-config + - configMapRef: + name: extra-env-config + optional: true + securityContext: + {} + image: "opea/codetrans-ui:latest" + imagePullPolicy: IfNotPresent + ports: + - name: ui + containerPort: 5173 + protocol: TCP + livenessProbe: + failureThreshold: 24 + httpGet: + path: / + port: ui + initialDelaySeconds: 5 + periodSeconds: 5 + readinessProbe: + httpGet: + path: / + port: ui + initialDelaySeconds: 5 + periodSeconds: 5 + startupProbe: + failureThreshold: 120 + httpGet: + path: / + port: ui + initialDelaySeconds: 5 + periodSeconds: 5 + resources: + {} + volumeMounts: + - mountPath: /tmp + name: tmp + volumes: + - name: tmp + emptyDir: {} diff --git a/microservices-connector/config/manifests/data-prep.yaml b/microservices-connector/config/manifests/data-prep.yaml index c681e93a..2d507af6 100644 --- a/microservices-connector/config/manifests/data-prep.yaml +++ b/microservices-connector/config/manifests/data-prep.yaml @@ -15,11 +15,13 @@ metadata: app.kubernetes.io/managed-by: Helm data: TEI_ENDPOINT: "http://data-prep-tei" - EMBED_MODEL: "" REDIS_URL: "redis://data-prep-redis-vector-db:6379" INDEX_NAME: "rag-redis" KEY_INDEX_NAME: "file-keys" SEARCH_BATCH_SIZE: "10" + MILVUS_HOST: "data-prep-milvus" + MILVUS: "" + MILVUS_PORT: "" HUGGINGFACEHUB_API_TOKEN: "insert-your-huggingface-token-here" HF_HOME: "/tmp/.cache/huggingface" http_proxy: "" diff --git a/microservices-connector/config/manifests/data-prep_milvus.yaml b/microservices-connector/config/manifests/data-prep_milvus.yaml new file mode 100644 index 00000000..e30d2cbb --- /dev/null +++ b/microservices-connector/config/manifests/data-prep_milvus.yaml @@ -0,0 +1,1008 @@ +--- +# Source: data-prep/charts/milvus/charts/minio/templates/serviceaccount.yaml +apiVersion: v1 +kind: ServiceAccount +metadata: + name: "data-prep-minio" + namespace: "default" + labels: + app: minio + chart: minio-8.0.17 + release: "data-prep" +--- +# Source: data-prep/charts/milvus/charts/minio/templates/secrets.yaml +apiVersion: v1 +kind: Secret +metadata: + name: data-prep-minio + labels: + app: minio + chart: minio-8.0.17 + release: data-prep + heritage: Helm +type: Opaque +data: + accesskey: "bWluaW9hZG1pbg==" + secretkey: "bWluaW9hZG1pbg==" +--- +# Source: data-prep/charts/milvus/charts/minio/templates/configmap.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: data-prep-minio + labels: + app: minio + chart: minio-8.0.17 + release: data-prep + heritage: Helm +data: + initialize: |- + #!/bin/sh + set -e ; # Have script exit in the event of a failed command. + MC_CONFIG_DIR="/etc/minio/mc/" + MC="/usr/bin/mc --insecure --config-dir ${MC_CONFIG_DIR}" + + # connectToMinio + # Use a check-sleep-check loop to wait for Minio service to be available + connectToMinio() { + SCHEME=$1 + ATTEMPTS=0 ; LIMIT=29 ; # Allow 30 attempts + set -e ; # fail if we can't read the keys. + ACCESS=$(cat /config/accesskey) ; SECRET=$(cat /config/secretkey) ; + set +e ; # The connections to minio are allowed to fail. + echo "Connecting to Minio server: $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT" ; + MC_COMMAND="${MC} config host add myminio $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT $ACCESS $SECRET" ; + $MC_COMMAND ; + STATUS=$? ; + until [ $STATUS = 0 ] + do + ATTEMPTS=`expr $ATTEMPTS + 1` ; + echo \"Failed attempts: $ATTEMPTS\" ; + if [ $ATTEMPTS -gt $LIMIT ]; then + exit 1 ; + fi ; + sleep 2 ; # 1 second intervals between attempts + $MC_COMMAND ; + STATUS=$? ; + done ; + set -e ; # reset `e` as active + return 0 + } + + # checkBucketExists ($bucket) + # Check if the bucket exists, by using the exit code of `mc ls` + checkBucketExists() { + BUCKET=$1 + CMD=$(${MC} ls myminio/$BUCKET > /dev/null 2>&1) + return $? + } + + # createBucket ($bucket, $policy, $purge) + # Ensure bucket exists, purging if asked to + createBucket() { + BUCKET=$1 + POLICY=$2 + PURGE=$3 + VERSIONING=$4 + + # Purge the bucket, if set & exists + # Since PURGE is user input, check explicitly for `true` + if [ $PURGE = true ]; then + if checkBucketExists $BUCKET ; then + echo "Purging bucket '$BUCKET'." + set +e ; # don't exit if this fails + ${MC} rm -r --force myminio/$BUCKET + set -e ; # reset `e` as active + else + echo "Bucket '$BUCKET' does not exist, skipping purge." + fi + fi + + # Create the bucket if it does not exist + if ! checkBucketExists $BUCKET ; then + echo "Creating bucket '$BUCKET'" + ${MC} mb myminio/$BUCKET + else + echo "Bucket '$BUCKET' already exists." + fi + + + # set versioning for bucket + if [ ! -z $VERSIONING ] ; then + if [ $VERSIONING = true ] ; then + echo "Enabling versioning for '$BUCKET'" + ${MC} version enable myminio/$BUCKET + elif [ $VERSIONING = false ] ; then + echo "Suspending versioning for '$BUCKET'" + ${MC} version suspend myminio/$BUCKET + fi + else + echo "Bucket '$BUCKET' versioning unchanged." + fi + + # At this point, the bucket should exist, skip checking for existence + # Set policy on the bucket + echo "Setting policy of bucket '$BUCKET' to '$POLICY'." + ${MC} policy set $POLICY myminio/$BUCKET + } + + # Try connecting to Minio instance + scheme=http + connectToMinio $scheme +--- +# Source: data-prep/charts/milvus/templates/configmap.yaml +# If customConfigMap is not set, this ConfigMap will be redendered. +apiVersion: v1 +kind: ConfigMap +metadata: + name: data-prep-milvus + namespace: default +data: + default.yaml: |+ + # Copyright (C) 2019-2021 Zilliz. All rights reserved. + # + # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance + # with the License. You may obtain a copy of the License at + # + # http://www.apache.org/licenses/LICENSE-2.0 + # + # Unless required by applicable law or agreed to in writing, software distributed under the License + # is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + # or implied. See the License for the specific language governing permissions and limitations under the License. + + etcd: + endpoints: + - data-prep-etcd-0.data-prep-etcd-headless.default.svc.cluster.local:2379 + + metastore: + type: etcd + + minio: + address: data-prep-minio + port: 9000 + accessKeyID: minioadmin + secretAccessKey: minioadmin + useSSL: false + bucketName: milvus-bucket + rootPath: file + useIAM: false + useVirtualHost: false + + mq: + type: rocksmq + + messageQueue: rocksmq + + rootCoord: + address: localhost + port: 53100 + enableActiveStandby: false # Enable rootcoord active-standby + + proxy: + port: 19530 + internalPort: 19529 + + queryCoord: + address: localhost + port: 19531 + + enableActiveStandby: false # Enable querycoord active-standby + + queryNode: + port: 21123 + enableDisk: true # Enable querynode load disk index, and search on disk index + + indexCoord: + address: localhost + port: 31000 + enableActiveStandby: false # Enable indexcoord active-standby + + indexNode: + port: 21121 + enableDisk: true # Enable index node build disk vector index + + dataCoord: + address: localhost + port: 13333 + enableActiveStandby: false # Enable datacoord active-standby + + dataNode: + port: 21124 + + log: + level: info + file: + rootPath: "" + maxSize: 300 + maxAge: 10 + maxBackups: 20 + format: text + user.yaml: |- + # For example enable rest http for milvus proxy + # proxy: + # http: + # enabled: true + # maxUserNum: 100 + # maxRoleNum: 10 + ## Enable tlsMode and set the tls cert and key + # tls: + # serverPemPath: /etc/milvus/certs/tls.crt + # serverKeyPath: /etc/milvus/certs/tls.key + # common: + # security: + # tlsMode: 1 +--- +# Source: data-prep/charts/tei/templates/configmap.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: v1 +kind: ConfigMap +metadata: + name: data-prep-tei-config + labels: + helm.sh/chart: tei-1.0.0 + app.kubernetes.io/name: tei + app.kubernetes.io/instance: data-prep + app.kubernetes.io/version: "cpu-1.5" + app.kubernetes.io/managed-by: Helm +data: + MODEL_ID: "BAAI/bge-base-en-v1.5" + PORT: "2081" + http_proxy: "" + https_proxy: "" + no_proxy: "" + NUMBA_CACHE_DIR: "/tmp" + TRANSFORMERS_CACHE: "/tmp/transformers_cache" + HF_HOME: "/tmp/.cache/huggingface" + HF_HUB_DISABLE_PROGRESS_BARS: "1" + HF_HUB_ENABLE_HF_TRANSFER: "0" + # More options for HPU +--- +# Source: data-prep/templates/configmap.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: v1 +kind: ConfigMap +metadata: + name: data-prep-config + labels: + helm.sh/chart: data-prep-1.0.0 + app.kubernetes.io/name: data-prep + app.kubernetes.io/instance: data-prep + app.kubernetes.io/version: "v1.0" + app.kubernetes.io/managed-by: Helm +data: + TEI_ENDPOINT: "http://data-prep-tei" + REDIS_URL: "redis://data-prep-redis-vector-db:6379" + INDEX_NAME: "rag-redis" + KEY_INDEX_NAME: "file-keys" + SEARCH_BATCH_SIZE: "10" + MILVUS_HOST: "data-prep-milvus" + MILVUS: "" + MILVUS_PORT: "19530" + COLLECTION_NAME: "rag_milvus" + HUGGINGFACEHUB_API_TOKEN: "insert-your-huggingface-token-here" + HF_HOME: "/tmp/.cache/huggingface" + http_proxy: "" + https_proxy: "" + no_proxy: "" + LOGFLAG: "" +--- +# Source: data-prep/charts/milvus/charts/minio/templates/pvc.yaml +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: data-prep-minio + annotations: + helm.sh/resource-policy: keep + labels: + app: minio + chart: minio-8.0.17 + release: data-prep + heritage: Helm +spec: + accessModes: + - "ReadWriteOnce" + resources: + requests: + storage: "500Gi" +--- +# Source: data-prep/charts/milvus/templates/pvc.yaml +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: data-prep-milvus + namespace: default + annotations: + helm.sh/resource-policy: keep + labels: + helm.sh/chart: milvus-4.2.12 + app.kubernetes.io/name: milvus + app.kubernetes.io/instance: data-prep + app.kubernetes.io/version: "2.4.12" + app.kubernetes.io/managed-by: Helm +spec: + accessModes: + - "ReadWriteOnce" + resources: + requests: + storage: 50Gi +--- +# Source: data-prep/charts/milvus/charts/etcd/templates/svc-headless.yaml +apiVersion: v1 +kind: Service +metadata: + name: data-prep-etcd-headless + namespace: default + labels: + app.kubernetes.io/name: etcd + helm.sh/chart: etcd-6.3.3 + app.kubernetes.io/instance: data-prep + app.kubernetes.io/managed-by: Helm + annotations: + service.alpha.kubernetes.io/tolerate-unready-endpoints: "true" +spec: + type: ClusterIP + clusterIP: None + publishNotReadyAddresses: true + ports: + - name: "client" + port: 2379 + targetPort: client + - name: "peer" + port: 2380 + targetPort: peer + selector: + app.kubernetes.io/name: etcd + app.kubernetes.io/instance: data-prep +--- +# Source: data-prep/charts/milvus/charts/etcd/templates/svc.yaml +apiVersion: v1 +kind: Service +metadata: + name: data-prep-etcd + namespace: default + labels: + app.kubernetes.io/name: etcd + helm.sh/chart: etcd-6.3.3 + app.kubernetes.io/instance: data-prep + app.kubernetes.io/managed-by: Helm + annotations: +spec: + type: ClusterIP + ports: + - name: "client" + port: 2379 + targetPort: client + nodePort: null + - name: "peer" + port: 2380 + targetPort: peer + nodePort: null + selector: + app.kubernetes.io/name: etcd + app.kubernetes.io/instance: data-prep +--- +# Source: data-prep/charts/milvus/charts/minio/templates/service.yaml +apiVersion: v1 +kind: Service +metadata: + name: data-prep-minio + labels: + app: minio + chart: minio-8.0.17 + release: data-prep + heritage: Helm +spec: + type: ClusterIP + ports: + - name: http + port: 9000 + protocol: TCP + targetPort: 9000 + selector: + app: minio + release: data-prep +--- +# Source: data-prep/charts/milvus/templates/service.yaml +apiVersion: v1 +kind: Service +metadata: + name: data-prep-milvus + namespace: default + labels: + helm.sh/chart: milvus-4.2.12 + app.kubernetes.io/name: milvus + app.kubernetes.io/instance: data-prep + app.kubernetes.io/version: "2.4.12" + app.kubernetes.io/managed-by: Helm + component: "standalone" +spec: + type: ClusterIP + ports: + - name: milvus + port: 19530 + protocol: TCP + targetPort: milvus + - name: metrics + protocol: TCP + port: 9091 + targetPort: metrics + selector: + app.kubernetes.io/name: milvus + app.kubernetes.io/instance: data-prep + component: "standalone" +--- +# Source: data-prep/charts/tei/templates/service.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: v1 +kind: Service +metadata: + name: data-prep-tei + labels: + helm.sh/chart: tei-1.0.0 + app.kubernetes.io/name: tei + app.kubernetes.io/instance: data-prep + app.kubernetes.io/version: "cpu-1.5" + app.kubernetes.io/managed-by: Helm +spec: + type: ClusterIP + ports: + - port: 80 + targetPort: 2081 + protocol: TCP + name: tei + selector: + app.kubernetes.io/name: tei + app.kubernetes.io/instance: data-prep +--- +# Source: data-prep/templates/service.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: v1 +kind: Service +metadata: + name: data-prep + labels: + helm.sh/chart: data-prep-1.0.0 + app.kubernetes.io/name: data-prep + app.kubernetes.io/instance: data-prep + app.kubernetes.io/version: "v1.0" + app.kubernetes.io/managed-by: Helm +spec: + type: ClusterIP + ports: + - port: 6007 + targetPort: 6010 + protocol: TCP + name: data-prep + selector: + app.kubernetes.io/name: data-prep + app.kubernetes.io/instance: data-prep +--- +# Source: data-prep/charts/milvus/charts/minio/templates/deployment.yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + name: data-prep-minio + labels: + app: minio + chart: minio-8.0.17 + release: data-prep + heritage: Helm +spec: + strategy: + type: RollingUpdate + rollingUpdate: + maxSurge: 100% + maxUnavailable: 0 + selector: + matchLabels: + app: minio + release: data-prep + template: + metadata: + name: data-prep-minio + labels: + app: minio + release: data-prep + annotations: + checksum/secrets: 77e59ca163a211f00e3b918b8c580644eb84f8351ad2ef2f5023679ebb1e166f + checksum/config: e7c2f210eafb188a3d4d6c1149821983c33cbcc1433c9e04f2fc2648fa07dac7 + spec: + serviceAccountName: "data-prep-minio" + securityContext: + runAsUser: 1000 + runAsGroup: 1000 + fsGroup: 1000 + containers: + - name: minio + image: "minio/minio:RELEASE.2023-03-20T20-16-18Z" + imagePullPolicy: IfNotPresent + command: + - "/bin/sh" + - "-ce" + - "/usr/bin/docker-entrypoint.sh minio -S /etc/minio/certs/ server /export" + volumeMounts: + - name: export + mountPath: /export + ports: + - name: http + containerPort: 9000 + livenessProbe: + httpGet: + path: /minio/health/live + port: http + scheme: HTTP + initialDelaySeconds: 5 + periodSeconds: 5 + timeoutSeconds: 5 + successThreshold: 1 + failureThreshold: 5 + readinessProbe: + tcpSocket: + port: http + initialDelaySeconds: 5 + periodSeconds: 5 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 5 + startupProbe: + tcpSocket: + port: http + initialDelaySeconds: 0 + periodSeconds: 10 + timeoutSeconds: 5 + successThreshold: 1 + failureThreshold: 60 + env: + - name: MINIO_ACCESS_KEY + valueFrom: + secretKeyRef: + name: data-prep-minio + key: accesskey + - name: MINIO_SECRET_KEY + valueFrom: + secretKeyRef: + name: data-prep-minio + key: secretkey + resources: + requests: + memory: 2Gi + volumes: + - name: export + persistentVolumeClaim: + claimName: data-prep-minio + - name: minio-user + secret: + secretName: data-prep-minio +--- +# Source: data-prep/charts/milvus/templates/standalone-deployment.yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + name: data-prep-milvus-standalone + namespace: default + labels: + helm.sh/chart: milvus-4.2.12 + app.kubernetes.io/name: milvus + app.kubernetes.io/instance: data-prep + app.kubernetes.io/version: "2.4.12" + app.kubernetes.io/managed-by: Helm + component: "standalone" + + annotations: + + +spec: + replicas: 1 + strategy: + type: Recreate + selector: + matchLabels: + app.kubernetes.io/name: milvus + app.kubernetes.io/instance: data-prep + component: "standalone" + template: + metadata: + labels: + app.kubernetes.io/name: milvus + app.kubernetes.io/instance: data-prep + component: "standalone" + + annotations: + checksum/config: 660930e599c681cf9f9d24618c811567eb74e12756778654f100b4f16e756d5f + + spec: + serviceAccountName: default + initContainers: + containers: + - name: standalone + image: "milvusdb/milvus:v2.4.12" + imagePullPolicy: IfNotPresent + args: [ "milvus", "run", "standalone" ] + ports: + - name: milvus + containerPort: 19530 + protocol: TCP + - name: metrics + containerPort: 9091 + protocol: TCP + livenessProbe: + httpGet: + path: /healthz + port: metrics + initialDelaySeconds: 90 + periodSeconds: 30 + timeoutSeconds: 5 + successThreshold: 1 + failureThreshold: 5 + readinessProbe: + httpGet: + path: /healthz + port: metrics + initialDelaySeconds: 90 + periodSeconds: 10 + timeoutSeconds: 5 + successThreshold: 1 + failureThreshold: 5 + resources: + {} + env: + volumeMounts: + - mountPath: /milvus/tools + name: tools + - name: milvus-config + mountPath: /milvus/configs/default.yaml + subPath: default.yaml + readOnly: true + - name: milvus-config + mountPath: /milvus/configs/user.yaml + subPath: user.yaml + readOnly: true + - name: milvus-data-disk + mountPath: "/var/lib/milvus" + subPath: + - mountPath: /var/lib/milvus/data + name: disk + + volumes: + - emptyDir: {} + name: tools + - name: milvus-config + configMap: + name: data-prep-milvus + - name: milvus-data-disk + persistentVolumeClaim: + claimName: data-prep-milvus + - name: disk + emptyDir: {} +--- +# Source: data-prep/charts/tei/templates/deployment.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: apps/v1 +kind: Deployment +metadata: + name: data-prep-tei + labels: + helm.sh/chart: tei-1.0.0 + app.kubernetes.io/name: tei + app.kubernetes.io/instance: data-prep + app.kubernetes.io/version: "cpu-1.5" + app.kubernetes.io/managed-by: Helm +spec: + selector: + matchLabels: + app.kubernetes.io/name: tei + app.kubernetes.io/instance: data-prep + template: + metadata: + labels: + app.kubernetes.io/name: tei + app.kubernetes.io/instance: data-prep + spec: + securityContext: + {} + containers: + - name: tei + envFrom: + - configMapRef: + name: data-prep-tei-config + - configMapRef: + name: extra-env-config + optional: true + securityContext: + {} + image: "ghcr.io/huggingface/text-embeddings-inference:cpu-1.5" + imagePullPolicy: IfNotPresent + args: + - "--auto-truncate" + volumeMounts: + - mountPath: /data + name: model-volume + - mountPath: /dev/shm + name: shm + - mountPath: /tmp + name: tmp + ports: + - name: http + containerPort: 2081 + protocol: TCP + livenessProbe: + failureThreshold: 24 + httpGet: + path: /health + port: http + initialDelaySeconds: 5 + periodSeconds: 5 + timeoutSeconds: 2 + readinessProbe: + httpGet: + path: /health + port: http + initialDelaySeconds: 5 + periodSeconds: 5 + timeoutSeconds: 2 + startupProbe: + failureThreshold: 120 + httpGet: + path: /health + port: http + initialDelaySeconds: 5 + periodSeconds: 5 + resources: + {} + volumes: + - name: model-volume + hostPath: + path: /mnt/opea-models + type: Directory + - name: shm + emptyDir: + medium: Memory + sizeLimit: 1Gi + - name: tmp + emptyDir: {} + # extra time to finish processing buffered requests on CPU before pod is forcibly terminated + terminationGracePeriodSeconds: 60 +--- +# Source: data-prep/templates/deployment.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: apps/v1 +kind: Deployment +metadata: + name: data-prep + labels: + helm.sh/chart: data-prep-1.0.0 + app.kubernetes.io/name: data-prep + app.kubernetes.io/instance: data-prep + app.kubernetes.io/version: "v1.0" + app.kubernetes.io/managed-by: Helm +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: data-prep + app.kubernetes.io/instance: data-prep + template: + metadata: + labels: + app.kubernetes.io/name: data-prep + app.kubernetes.io/instance: data-prep + spec: + securityContext: + {} + containers: + - name: data-prep + envFrom: + - configMapRef: + name: data-prep-config + - configMapRef: + name: extra-env-config + optional: true + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + readOnlyRootFilesystem: false + runAsNonRoot: true + runAsUser: 1000 + seccompProfile: + type: RuntimeDefault + image: "opea/dataprep-milvus:latest" + imagePullPolicy: IfNotPresent + ports: + - name: data-prep + containerPort: 6010 + protocol: TCP + volumeMounts: + - mountPath: /tmp + name: tmp + livenessProbe: + failureThreshold: 24 + httpGet: + path: v1/health_check + port: data-prep + initialDelaySeconds: 5 + periodSeconds: 5 + readinessProbe: + httpGet: + path: v1/health_check + port: data-prep + initialDelaySeconds: 5 + periodSeconds: 5 + startupProbe: + failureThreshold: 120 + httpGet: + path: v1/health_check + port: data-prep + initialDelaySeconds: 5 + periodSeconds: 5 + resources: + {} + volumes: + - name: tmp + emptyDir: {} +--- +# Source: data-prep/charts/milvus/charts/etcd/templates/statefulset.yaml +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: data-prep-etcd + namespace: default + labels: + app.kubernetes.io/name: etcd + helm.sh/chart: etcd-6.3.3 + app.kubernetes.io/instance: data-prep + app.kubernetes.io/managed-by: Helm +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: etcd + app.kubernetes.io/instance: data-prep + serviceName: data-prep-etcd-headless + podManagementPolicy: Parallel + updateStrategy: + type: RollingUpdate + template: + metadata: + labels: + app.kubernetes.io/name: etcd + helm.sh/chart: etcd-6.3.3 + app.kubernetes.io/instance: data-prep + app.kubernetes.io/managed-by: Helm + annotations: + spec: + + affinity: + podAffinity: + + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - podAffinityTerm: + labelSelector: + matchLabels: + app.kubernetes.io/name: etcd + app.kubernetes.io/instance: data-prep + namespaces: + - "default" + topologyKey: kubernetes.io/hostname + weight: 1 + nodeAffinity: + + securityContext: + fsGroup: 1001 + serviceAccountName: "default" + containers: + - name: etcd + image: docker.io/milvusdb/etcd:3.5.14-r1 + imagePullPolicy: "IfNotPresent" + securityContext: + runAsNonRoot: true + runAsUser: 1001 + env: + - name: BITNAMI_DEBUG + value: "false" + - name: MY_POD_IP + valueFrom: + fieldRef: + fieldPath: status.podIP + - name: MY_POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: ETCDCTL_API + value: "3" + - name: ETCD_ON_K8S + value: "yes" + - name: ETCD_START_FROM_SNAPSHOT + value: "no" + - name: ETCD_DISASTER_RECOVERY + value: "no" + - name: ETCD_NAME + value: "$(MY_POD_NAME)" + - name: ETCD_DATA_DIR + value: "/bitnami/etcd/data" + - name: ETCD_LOG_LEVEL + value: "info" + - name: ALLOW_NONE_AUTHENTICATION + value: "yes" + - name: ETCD_ADVERTISE_CLIENT_URLS + value: "http://$(MY_POD_NAME).data-prep-etcd-headless.default.svc.cluster.local:2379" + - name: ETCD_LISTEN_CLIENT_URLS + value: "http://0.0.0.0:2379" + - name: ETCD_INITIAL_ADVERTISE_PEER_URLS + value: "http://$(MY_POD_NAME).data-prep-etcd-headless.default.svc.cluster.local:2380" + - name: ETCD_LISTEN_PEER_URLS + value: "http://0.0.0.0:2380" + - name: ETCD_AUTO_COMPACTION_MODE + value: "revision" + - name: ETCD_AUTO_COMPACTION_RETENTION + value: "1000" + - name: ETCD_QUOTA_BACKEND_BYTES + value: "4294967296" + - name: ETCD_HEARTBEAT_INTERVAL + value: "500" + - name: ETCD_ELECTION_TIMEOUT + value: "2500" + envFrom: + ports: + - name: client + containerPort: 2379 + protocol: TCP + - name: peer + containerPort: 2380 + protocol: TCP + livenessProbe: + exec: + command: + - /opt/bitnami/scripts/etcd/healthcheck.sh + initialDelaySeconds: 60 + periodSeconds: 30 + timeoutSeconds: 10 + successThreshold: 1 + failureThreshold: 5 + readinessProbe: + exec: + command: + - /opt/bitnami/scripts/etcd/healthcheck.sh + initialDelaySeconds: 60 + periodSeconds: 20 + timeoutSeconds: 10 + successThreshold: 1 + failureThreshold: 5 + resources: + limits: {} + requests: {} + volumeMounts: + - name: data + mountPath: /bitnami/etcd + volumes: + volumeClaimTemplates: + - metadata: + name: data + spec: + accessModes: + - "ReadWriteOnce" + resources: + requests: + storage: "10Gi" +--- +# Source: data-prep/charts/tei/templates/horizontal-pod-autoscaler.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 +--- +# Source: data-prep/charts/tei/templates/servicemonitor.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 diff --git a/microservices-connector/config/manifests/docsum-llm-uservice.yaml b/microservices-connector/config/manifests/docsum-llm-uservice.yaml index 40e814f9..b19170cc 100644 --- a/microservices-connector/config/manifests/docsum-llm-uservice.yaml +++ b/microservices-connector/config/manifests/docsum-llm-uservice.yaml @@ -15,6 +15,7 @@ metadata: app.kubernetes.io/managed-by: Helm data: TGI_LLM_ENDPOINT: "http://docsum-llm-uservice-tgi" + vLLM_ENDPOINT: "http://docsum-llm-uservice-vllm" HUGGINGFACEHUB_API_TOKEN: "insert-your-huggingface-token-here" HF_HOME: "/tmp/.cache/huggingface" http_proxy: "" @@ -127,3 +128,7 @@ spec: volumes: - name: tmp emptyDir: {} +--- +# Source: llm-uservice/templates/servicemonitor.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 diff --git a/microservices-connector/config/manifests/docsum_react-ui.yaml b/microservices-connector/config/manifests/docsum_react-ui.yaml new file mode 100644 index 00000000..fe9caf76 --- /dev/null +++ b/microservices-connector/config/manifests/docsum_react-ui.yaml @@ -0,0 +1,118 @@ +--- +# Source: ui/templates/configmap.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: v1 +kind: ConfigMap +metadata: + name: docsum-react-ui-config + labels: + helm.sh/chart: ui-1.0.0 + app.kubernetes.io/name: ui + app.kubernetes.io/instance: docsum-react-ui + app.kubernetes.io/version: "v1.0" + app.kubernetes.io/managed-by: Helm +data: + VITE_DOC_SUM_URL: "/v1/docsum" +--- +# Source: ui/templates/service.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: v1 +kind: Service +metadata: + name: docsum-react-ui + labels: + helm.sh/chart: ui-1.0.0 + app.kubernetes.io/name: ui + app.kubernetes.io/instance: docsum-react-ui + app.kubernetes.io/version: "v1.0" + app.kubernetes.io/managed-by: Helm +spec: + type: ClusterIP + ports: + - port: 5174 + targetPort: ui + protocol: TCP + name: ui + selector: + app.kubernetes.io/name: ui + app.kubernetes.io/instance: docsum-react-ui +--- +# Source: ui/templates/deployment.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: apps/v1 +kind: Deployment +metadata: + name: docsum-react-ui + labels: + helm.sh/chart: ui-1.0.0 + app.kubernetes.io/name: ui + app.kubernetes.io/instance: docsum-react-ui + app.kubernetes.io/version: "v1.0" + app.kubernetes.io/managed-by: Helm +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: ui + app.kubernetes.io/instance: docsum-react-ui + template: + metadata: + labels: + helm.sh/chart: ui-1.0.0 + app.kubernetes.io/name: ui + app.kubernetes.io/instance: docsum-react-ui + app.kubernetes.io/version: "v1.0" + app.kubernetes.io/managed-by: Helm + spec: + securityContext: + {} + containers: + - name: ui + envFrom: + - configMapRef: + name: docsum-react-ui-config + - configMapRef: + name: extra-env-config + optional: true + securityContext: + {} + image: "opea/docsum-react-ui:latest" + imagePullPolicy: IfNotPresent + ports: + - name: ui + containerPort: 80 + protocol: TCP + livenessProbe: + failureThreshold: 24 + httpGet: + path: / + port: ui + initialDelaySeconds: 5 + periodSeconds: 5 + readinessProbe: + httpGet: + path: / + port: ui + initialDelaySeconds: 5 + periodSeconds: 5 + startupProbe: + failureThreshold: 120 + httpGet: + path: / + port: ui + initialDelaySeconds: 5 + periodSeconds: 5 + resources: + {} + volumeMounts: + - mountPath: /tmp + name: tmp + volumes: + - name: tmp + emptyDir: {} diff --git a/microservices-connector/config/manifests/docsum_svelte-ui.yaml b/microservices-connector/config/manifests/docsum_svelte-ui.yaml new file mode 100644 index 00000000..a2f81e82 --- /dev/null +++ b/microservices-connector/config/manifests/docsum_svelte-ui.yaml @@ -0,0 +1,118 @@ +--- +# Source: ui/templates/configmap.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: v1 +kind: ConfigMap +metadata: + name: docsum-svelte-ui-config + labels: + helm.sh/chart: ui-1.0.0 + app.kubernetes.io/name: ui + app.kubernetes.io/instance: docsum-svelte-ui + app.kubernetes.io/version: "v1.0" + app.kubernetes.io/managed-by: Helm +data: + DOC_BASE_URL: "/v1/docsum" +--- +# Source: ui/templates/service.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: v1 +kind: Service +metadata: + name: docsum-svelte-ui + labels: + helm.sh/chart: ui-1.0.0 + app.kubernetes.io/name: ui + app.kubernetes.io/instance: docsum-svelte-ui + app.kubernetes.io/version: "v1.0" + app.kubernetes.io/managed-by: Helm +spec: + type: ClusterIP + ports: + - port: 5174 + targetPort: ui + protocol: TCP + name: ui + selector: + app.kubernetes.io/name: ui + app.kubernetes.io/instance: docsum-svelte-ui +--- +# Source: ui/templates/deployment.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: apps/v1 +kind: Deployment +metadata: + name: docsum-svelte-ui + labels: + helm.sh/chart: ui-1.0.0 + app.kubernetes.io/name: ui + app.kubernetes.io/instance: docsum-svelte-ui + app.kubernetes.io/version: "v1.0" + app.kubernetes.io/managed-by: Helm +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: ui + app.kubernetes.io/instance: docsum-svelte-ui + template: + metadata: + labels: + helm.sh/chart: ui-1.0.0 + app.kubernetes.io/name: ui + app.kubernetes.io/instance: docsum-svelte-ui + app.kubernetes.io/version: "v1.0" + app.kubernetes.io/managed-by: Helm + spec: + securityContext: + {} + containers: + - name: ui + envFrom: + - configMapRef: + name: docsum-svelte-ui-config + - configMapRef: + name: extra-env-config + optional: true + securityContext: + {} + image: "opea/docsum-ui:latest" + imagePullPolicy: IfNotPresent + ports: + - name: ui + containerPort: 5173 + protocol: TCP + livenessProbe: + failureThreshold: 24 + httpGet: + path: / + port: ui + initialDelaySeconds: 5 + periodSeconds: 5 + readinessProbe: + httpGet: + path: / + port: ui + initialDelaySeconds: 5 + periodSeconds: 5 + startupProbe: + failureThreshold: 120 + httpGet: + path: / + port: ui + initialDelaySeconds: 5 + periodSeconds: 5 + resources: + {} + volumeMounts: + - mountPath: /tmp + name: tmp + volumes: + - name: tmp + emptyDir: {} diff --git a/microservices-connector/config/manifests/embedding-usvc.yaml b/microservices-connector/config/manifests/embedding-usvc.yaml index c5eefa0c..98823189 100644 --- a/microservices-connector/config/manifests/embedding-usvc.yaml +++ b/microservices-connector/config/manifests/embedding-usvc.yaml @@ -125,3 +125,7 @@ spec: volumes: - name: tmp emptyDir: {} +--- +# Source: embedding-usvc/templates/servicemonitor.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 diff --git a/microservices-connector/config/manifests/faqgen-llm-uservice.yaml b/microservices-connector/config/manifests/faqgen-llm-uservice.yaml index 3b4515e1..34feb9c9 100644 --- a/microservices-connector/config/manifests/faqgen-llm-uservice.yaml +++ b/microservices-connector/config/manifests/faqgen-llm-uservice.yaml @@ -15,6 +15,7 @@ metadata: app.kubernetes.io/managed-by: Helm data: TGI_LLM_ENDPOINT: "http://faqgen-llm-uservice-tgi" + vLLM_ENDPOINT: "http://faqgen-llm-uservice-vllm" HUGGINGFACEHUB_API_TOKEN: "insert-your-huggingface-token-here" HF_HOME: "/tmp/.cache/huggingface" http_proxy: "" @@ -127,3 +128,7 @@ spec: volumes: - name: tmp emptyDir: {} +--- +# Source: llm-uservice/templates/servicemonitor.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 diff --git a/microservices-connector/config/manifests/faqgen_react-ui.yaml b/microservices-connector/config/manifests/faqgen_react-ui.yaml new file mode 100644 index 00000000..4808abf0 --- /dev/null +++ b/microservices-connector/config/manifests/faqgen_react-ui.yaml @@ -0,0 +1,118 @@ +--- +# Source: ui/templates/configmap.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: v1 +kind: ConfigMap +metadata: + name: faqgen-react-ui-config + labels: + helm.sh/chart: ui-1.0.0 + app.kubernetes.io/name: ui + app.kubernetes.io/instance: faqgen-react-ui + app.kubernetes.io/version: "v1.0" + app.kubernetes.io/managed-by: Helm +data: + VITE_FAQ_GEN_URL: "/v1/faqgen" +--- +# Source: ui/templates/service.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: v1 +kind: Service +metadata: + name: faqgen-react-ui + labels: + helm.sh/chart: ui-1.0.0 + app.kubernetes.io/name: ui + app.kubernetes.io/instance: faqgen-react-ui + app.kubernetes.io/version: "v1.0" + app.kubernetes.io/managed-by: Helm +spec: + type: ClusterIP + ports: + - port: 5174 + targetPort: ui + protocol: TCP + name: ui + selector: + app.kubernetes.io/name: ui + app.kubernetes.io/instance: faqgen-react-ui +--- +# Source: ui/templates/deployment.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: apps/v1 +kind: Deployment +metadata: + name: faqgen-react-ui + labels: + helm.sh/chart: ui-1.0.0 + app.kubernetes.io/name: ui + app.kubernetes.io/instance: faqgen-react-ui + app.kubernetes.io/version: "v1.0" + app.kubernetes.io/managed-by: Helm +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: ui + app.kubernetes.io/instance: faqgen-react-ui + template: + metadata: + labels: + helm.sh/chart: ui-1.0.0 + app.kubernetes.io/name: ui + app.kubernetes.io/instance: faqgen-react-ui + app.kubernetes.io/version: "v1.0" + app.kubernetes.io/managed-by: Helm + spec: + securityContext: + {} + containers: + - name: ui + envFrom: + - configMapRef: + name: faqgen-react-ui-config + - configMapRef: + name: extra-env-config + optional: true + securityContext: + {} + image: "opea/faqgen-react-ui:latest" + imagePullPolicy: IfNotPresent + ports: + - name: ui + containerPort: 80 + protocol: TCP + livenessProbe: + failureThreshold: 24 + httpGet: + path: / + port: ui + initialDelaySeconds: 5 + periodSeconds: 5 + readinessProbe: + httpGet: + path: / + port: ui + initialDelaySeconds: 5 + periodSeconds: 5 + startupProbe: + failureThreshold: 120 + httpGet: + path: / + port: ui + initialDelaySeconds: 5 + periodSeconds: 5 + resources: + {} + volumeMounts: + - mountPath: /tmp + name: tmp + volumes: + - name: tmp + emptyDir: {} diff --git a/microservices-connector/config/manifests/faqgen_svelte-ui.yaml b/microservices-connector/config/manifests/faqgen_svelte-ui.yaml new file mode 100644 index 00000000..13885da5 --- /dev/null +++ b/microservices-connector/config/manifests/faqgen_svelte-ui.yaml @@ -0,0 +1,118 @@ +--- +# Source: ui/templates/configmap.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: v1 +kind: ConfigMap +metadata: + name: faqgen-svelte-ui-config + labels: + helm.sh/chart: ui-1.0.0 + app.kubernetes.io/name: ui + app.kubernetes.io/instance: faqgen-svelte-ui + app.kubernetes.io/version: "v1.0" + app.kubernetes.io/managed-by: Helm +data: + FAQ_BASE_URL: "/v1/faqgen" +--- +# Source: ui/templates/service.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: v1 +kind: Service +metadata: + name: faqgen-svelte-ui + labels: + helm.sh/chart: ui-1.0.0 + app.kubernetes.io/name: ui + app.kubernetes.io/instance: faqgen-svelte-ui + app.kubernetes.io/version: "v1.0" + app.kubernetes.io/managed-by: Helm +spec: + type: ClusterIP + ports: + - port: 5174 + targetPort: ui + protocol: TCP + name: ui + selector: + app.kubernetes.io/name: ui + app.kubernetes.io/instance: faqgen-svelte-ui +--- +# Source: ui/templates/deployment.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: apps/v1 +kind: Deployment +metadata: + name: faqgen-svelte-ui + labels: + helm.sh/chart: ui-1.0.0 + app.kubernetes.io/name: ui + app.kubernetes.io/instance: faqgen-svelte-ui + app.kubernetes.io/version: "v1.0" + app.kubernetes.io/managed-by: Helm +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: ui + app.kubernetes.io/instance: faqgen-svelte-ui + template: + metadata: + labels: + helm.sh/chart: ui-1.0.0 + app.kubernetes.io/name: ui + app.kubernetes.io/instance: faqgen-svelte-ui + app.kubernetes.io/version: "v1.0" + app.kubernetes.io/managed-by: Helm + spec: + securityContext: + {} + containers: + - name: ui + envFrom: + - configMapRef: + name: faqgen-svelte-ui-config + - configMapRef: + name: extra-env-config + optional: true + securityContext: + {} + image: "opea/faqgen-ui:latest" + imagePullPolicy: IfNotPresent + ports: + - name: ui + containerPort: 5173 + protocol: TCP + livenessProbe: + failureThreshold: 24 + httpGet: + path: / + port: ui + initialDelaySeconds: 5 + periodSeconds: 5 + readinessProbe: + httpGet: + path: / + port: ui + initialDelaySeconds: 5 + periodSeconds: 5 + startupProbe: + failureThreshold: 120 + httpGet: + path: / + port: ui + initialDelaySeconds: 5 + periodSeconds: 5 + resources: + {} + volumeMounts: + - mountPath: /tmp + name: tmp + volumes: + - name: tmp + emptyDir: {} diff --git a/microservices-connector/config/manifests/gpt-sovits.yaml b/microservices-connector/config/manifests/gpt-sovits.yaml new file mode 100644 index 00000000..21a3a314 --- /dev/null +++ b/microservices-connector/config/manifests/gpt-sovits.yaml @@ -0,0 +1,120 @@ +--- +# Source: gpt-sovits/templates/configmap.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: v1 +kind: ConfigMap +metadata: + name: gpt-sovits-config + labels: + helm.sh/chart: gpt-sovits-1.1.0 + app.kubernetes.io/name: gpt-sovits + app.kubernetes.io/instance: gpt-sovits + app.kubernetes.io/version: "1.0" + app.kubernetes.io/managed-by: Helm +data: + http_proxy: "" + https_proxy: "" + no_proxy: "" + NUMBA_CACHE_DIR: "/tmp/.cache/numba" + HF_HOME: "/tmp/.cache/huggingface" + XDG_CACHE_HOME: "/tmp/.cache" +--- +# Source: gpt-sovits/templates/service.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: v1 +kind: Service +metadata: + name: gpt-sovits + labels: + helm.sh/chart: gpt-sovits-1.1.0 + app.kubernetes.io/name: gpt-sovits + app.kubernetes.io/instance: gpt-sovits + app.kubernetes.io/version: "1.0" + app.kubernetes.io/managed-by: Helm +spec: + type: ClusterIP + ports: + - port: 9880 + targetPort: 9880 + protocol: TCP + name: gpt-sovits + selector: + app.kubernetes.io/name: gpt-sovits + app.kubernetes.io/instance: gpt-sovits +--- +# Source: gpt-sovits/templates/deployment.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: apps/v1 +kind: Deployment +metadata: + name: gpt-sovits + labels: + helm.sh/chart: gpt-sovits-1.1.0 + app.kubernetes.io/name: gpt-sovits + app.kubernetes.io/instance: gpt-sovits + app.kubernetes.io/version: "1.0" + app.kubernetes.io/managed-by: Helm +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: gpt-sovits + app.kubernetes.io/instance: gpt-sovits + template: + metadata: + labels: + app.kubernetes.io/name: gpt-sovits + app.kubernetes.io/instance: gpt-sovits + spec: + securityContext: + {} + containers: + - name: gpt-sovits + envFrom: + - configMapRef: + name: gpt-sovits-config + - configMapRef: + name: extra-env-config + optional: true + securityContext: + {} + image: "opea/gpt-sovits:latest" + imagePullPolicy: IfNotPresent + ports: + - name: gpt-sovits + containerPort: 9880 + protocol: TCP + volumeMounts: + - mountPath: /tmp + name: tmp + livenessProbe: + failureThreshold: 24 + initialDelaySeconds: 5 + periodSeconds: 5 + tcpSocket: + port: gpt-sovits + timeoutSeconds: 4 + readinessProbe: + initialDelaySeconds: 5 + periodSeconds: 5 + tcpSocket: + port: gpt-sovits + timeoutSeconds: 4 + startupProbe: + failureThreshold: 120 + initialDelaySeconds: 10 + periodSeconds: 5 + tcpSocket: + port: gpt-sovits + timeoutSeconds: 2 + resources: + {} + volumes: + - name: tmp + emptyDir: {} diff --git a/microservices-connector/config/manifests/llm-uservice.yaml b/microservices-connector/config/manifests/llm-uservice.yaml index 43f0c64a..9e9275f4 100644 --- a/microservices-connector/config/manifests/llm-uservice.yaml +++ b/microservices-connector/config/manifests/llm-uservice.yaml @@ -15,6 +15,7 @@ metadata: app.kubernetes.io/managed-by: Helm data: TGI_LLM_ENDPOINT: "http://llm-uservice-tgi" + vLLM_ENDPOINT: "http://llm-uservice-vllm" HUGGINGFACEHUB_API_TOKEN: "insert-your-huggingface-token-here" HF_HOME: "/tmp/.cache/huggingface" http_proxy: "" @@ -127,3 +128,7 @@ spec: volumes: - name: tmp emptyDir: {} +--- +# Source: llm-uservice/templates/servicemonitor.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 diff --git a/microservices-connector/config/manifests/llm-uservice_vllm.yaml b/microservices-connector/config/manifests/llm-uservice_vllm.yaml new file mode 100644 index 00000000..7b481892 --- /dev/null +++ b/microservices-connector/config/manifests/llm-uservice_vllm.yaml @@ -0,0 +1,282 @@ +--- +# Source: llm-uservice/charts/vllm/templates/configmap.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: v1 +kind: ConfigMap +metadata: + name: llm-uservice-vllm-config + labels: + helm.sh/chart: vllm-1.0.0 + app.kubernetes.io/name: vllm + app.kubernetes.io/instance: llm-uservice + app.kubernetes.io/version: "0.5" + app.kubernetes.io/managed-by: Helm +data: + HF_TOKEN: "insert-your-huggingface-token-here" + http_proxy: "" + https_proxy: "" + no_proxy: "" + HABANA_LOGS: "/tmp/habana_logs" + NUMBA_CACHE_DIR: "/tmp" + HF_HOME: "/tmp/.cache/huggingface" + # https://github.com/outlines-dev/outlines/blob/main/outlines/caching.py#L14-L29 + OUTLINES_CACHE_DIR: "/tmp/.cache/outlines" +--- +# Source: llm-uservice/templates/configmap.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: v1 +kind: ConfigMap +metadata: + name: llm-uservice-config + labels: + helm.sh/chart: llm-uservice-1.0.0 + app.kubernetes.io/name: llm-uservice + app.kubernetes.io/instance: llm-uservice + app.kubernetes.io/version: "v1.0" + app.kubernetes.io/managed-by: Helm +data: + TGI_LLM_ENDPOINT: "http://llm-uservice-tgi" + vLLM_ENDPOINT: "http://llm-uservice-vllm" + LLM_MODEL: "Intel/neural-chat-7b-v3-3" + HUGGINGFACEHUB_API_TOKEN: "insert-your-huggingface-token-here" + HF_HOME: "/tmp/.cache/huggingface" + http_proxy: "" + https_proxy: "" + no_proxy: "" + LOGFLAG: "" +--- +# Source: llm-uservice/charts/vllm/templates/service.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: v1 +kind: Service +metadata: + name: llm-uservice-vllm + labels: + helm.sh/chart: vllm-1.0.0 + app.kubernetes.io/name: vllm + app.kubernetes.io/instance: llm-uservice + app.kubernetes.io/version: "0.5" + app.kubernetes.io/managed-by: Helm +spec: + type: ClusterIP + ports: + - port: 80 + targetPort: 2080 + protocol: TCP + name: vllm + selector: + app.kubernetes.io/name: vllm + app.kubernetes.io/instance: llm-uservice +--- +# Source: llm-uservice/templates/service.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: v1 +kind: Service +metadata: + name: llm-uservice + labels: + helm.sh/chart: llm-uservice-1.0.0 + app.kubernetes.io/name: llm-uservice + app.kubernetes.io/instance: llm-uservice + app.kubernetes.io/version: "v1.0" + app.kubernetes.io/managed-by: Helm +spec: + type: ClusterIP + ports: + - port: 9000 + targetPort: 9000 + protocol: TCP + name: llm-uservice + selector: + app.kubernetes.io/name: llm-uservice + app.kubernetes.io/instance: llm-uservice +--- +# Source: llm-uservice/charts/vllm/templates/deployment.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: apps/v1 +kind: Deployment +metadata: + name: llm-uservice-vllm + labels: + helm.sh/chart: vllm-1.0.0 + app.kubernetes.io/name: vllm + app.kubernetes.io/instance: llm-uservice + app.kubernetes.io/version: "0.5" + app.kubernetes.io/managed-by: Helm +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: vllm + app.kubernetes.io/instance: llm-uservice + template: + metadata: + labels: + app.kubernetes.io/name: vllm + app.kubernetes.io/instance: llm-uservice + spec: + securityContext: + {} + containers: + - name: vllm + envFrom: + - configMapRef: + name: llm-uservice-vllm-config + - configMapRef: + name: extra-env-config + optional: true + securityContext: + {} + image: "opea/vllm:latest" + imagePullPolicy: IfNotPresent + args: + - "--enforce-eager" + - "--dtype" + - "auto" + - "--model" + - "Intel/neural-chat-7b-v3-3" + - "--host" + - "0.0.0.0" + - "--port" + - "2080" + - "--download-dir" + - "/data" + volumeMounts: + - mountPath: /data + name: model-volume + - mountPath: /dev/shm + name: shm + - mountPath: /tmp + name: tmp + ports: + - name: http + containerPort: 2080 + protocol: TCP + livenessProbe: + failureThreshold: 24 + httpGet: + path: /health + port: http + initialDelaySeconds: 5 + periodSeconds: 5 + readinessProbe: + httpGet: + path: /health + port: http + initialDelaySeconds: 5 + periodSeconds: 5 + startupProbe: + failureThreshold: 120 + httpGet: + path: /health + port: http + initialDelaySeconds: 5 + periodSeconds: 5 + resources: + {} + volumes: + - name: model-volume + hostPath: + path: /mnt/opea-models + type: Directory + - name: shm + emptyDir: + medium: Memory + sizeLimit: 1Gi + - name: tmp + emptyDir: {} +--- +# Source: llm-uservice/templates/deployment.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: apps/v1 +kind: Deployment +metadata: + name: llm-uservice + labels: + helm.sh/chart: llm-uservice-1.0.0 + app.kubernetes.io/name: llm-uservice + app.kubernetes.io/instance: llm-uservice + app.kubernetes.io/version: "v1.0" + app.kubernetes.io/managed-by: Helm +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: llm-uservice + app.kubernetes.io/instance: llm-uservice + template: + metadata: + labels: + app.kubernetes.io/name: llm-uservice + app.kubernetes.io/instance: llm-uservice + spec: + securityContext: + {} + containers: + - name: llm-uservice + envFrom: + - configMapRef: + name: llm-uservice-config + - configMapRef: + name: extra-env-config + optional: true + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + readOnlyRootFilesystem: false + runAsNonRoot: true + runAsUser: 1000 + seccompProfile: + type: RuntimeDefault + image: "opea/llm-vllm:latest" + imagePullPolicy: IfNotPresent + ports: + - name: llm-uservice + containerPort: 9000 + protocol: TCP + volumeMounts: + - mountPath: /tmp + name: tmp + livenessProbe: + failureThreshold: 24 + httpGet: + path: v1/health_check + port: llm-uservice + initialDelaySeconds: 5 + periodSeconds: 5 + readinessProbe: + httpGet: + path: v1/health_check + port: llm-uservice + initialDelaySeconds: 5 + periodSeconds: 5 + startupProbe: + failureThreshold: 120 + httpGet: + path: v1/health_check + port: llm-uservice + initialDelaySeconds: 5 + periodSeconds: 5 + resources: + {} + volumes: + - name: tmp + emptyDir: {} +--- +# Source: llm-uservice/templates/servicemonitor.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 diff --git a/microservices-connector/config/manifests/lvm-uservice.yaml b/microservices-connector/config/manifests/lvm-uservice.yaml new file mode 100644 index 00000000..8f60dbfa --- /dev/null +++ b/microservices-connector/config/manifests/lvm-uservice.yaml @@ -0,0 +1,133 @@ +--- +# Source: lvm-uservice/templates/configmap.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: v1 +kind: ConfigMap +metadata: + name: lvm-uservice-config + labels: + helm.sh/chart: lvm-uservice-1.0.0 + app.kubernetes.io/name: lvm-uservice + app.kubernetes.io/instance: lvm-uservice + app.kubernetes.io/version: "v1.0" + app.kubernetes.io/managed-by: Helm +data: + LVM_ENDPOINT: "http://lvm-uservice-tgi" + HUGGINGFACEHUB_API_TOKEN: "insert-your-huggingface-token-here" + HF_HOME: "/tmp/.cache/huggingface" + http_proxy: "" + https_proxy: "" + no_proxy: "" + LOGFLAG: "" +--- +# Source: lvm-uservice/templates/service.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: v1 +kind: Service +metadata: + name: lvm-uservice + labels: + helm.sh/chart: lvm-uservice-1.0.0 + app.kubernetes.io/name: lvm-uservice + app.kubernetes.io/instance: lvm-uservice + app.kubernetes.io/version: "v1.0" + app.kubernetes.io/managed-by: Helm +spec: + type: ClusterIP + ports: + - port: 9399 + targetPort: 9399 + protocol: TCP + name: lvm-uservice + selector: + app.kubernetes.io/name: lvm-uservice + app.kubernetes.io/instance: lvm-uservice +--- +# Source: lvm-uservice/templates/deployment.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: apps/v1 +kind: Deployment +metadata: + name: lvm-uservice + labels: + helm.sh/chart: lvm-uservice-1.0.0 + app.kubernetes.io/name: lvm-uservice + app.kubernetes.io/instance: lvm-uservice + app.kubernetes.io/version: "v1.0" + app.kubernetes.io/managed-by: Helm +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: lvm-uservice + app.kubernetes.io/instance: lvm-uservice + template: + metadata: + labels: + app.kubernetes.io/name: lvm-uservice + app.kubernetes.io/instance: lvm-uservice + spec: + securityContext: + {} + containers: + - name: lvm-uservice + envFrom: + - configMapRef: + name: lvm-uservice-config + - configMapRef: + name: extra-env-config + optional: true + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + readOnlyRootFilesystem: false + runAsNonRoot: true + runAsUser: 1000 + seccompProfile: + type: RuntimeDefault + image: "opea/lvm-tgi:latest" + imagePullPolicy: IfNotPresent + ports: + - name: lvm-uservice + containerPort: 9399 + protocol: TCP + volumeMounts: + - mountPath: /tmp + name: tmp + livenessProbe: + failureThreshold: 24 + httpGet: + path: v1/health_check + port: lvm-uservice + initialDelaySeconds: 5 + periodSeconds: 5 + readinessProbe: + httpGet: + path: v1/health_check + port: lvm-uservice + initialDelaySeconds: 5 + periodSeconds: 5 + startupProbe: + failureThreshold: 120 + httpGet: + path: v1/health_check + port: lvm-uservice + initialDelaySeconds: 5 + periodSeconds: 5 + resources: + {} + volumes: + - name: tmp + emptyDir: {} +--- +# Source: lvm-uservice/templates/servicemonitor.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 diff --git a/microservices-connector/config/manifests/reranking-usvc.yaml b/microservices-connector/config/manifests/reranking-usvc.yaml index ba1b97be..35b24aed 100644 --- a/microservices-connector/config/manifests/reranking-usvc.yaml +++ b/microservices-connector/config/manifests/reranking-usvc.yaml @@ -125,3 +125,7 @@ spec: volumes: - name: tmp emptyDir: {} +--- +# Source: reranking-usvc/templates/servicemonitor.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 diff --git a/microservices-connector/config/manifests/retriever-usvc.yaml b/microservices-connector/config/manifests/retriever-usvc.yaml index 2c545685..c22b823a 100644 --- a/microservices-connector/config/manifests/retriever-usvc.yaml +++ b/microservices-connector/config/manifests/retriever-usvc.yaml @@ -15,9 +15,11 @@ metadata: app.kubernetes.io/managed-by: Helm data: TEI_EMBEDDING_ENDPOINT: "http://retriever-usvc-tei" - EMBED_MODEL: "" REDIS_URL: "redis://retriever-usvc-redis-vector-db:6379" INDEX_NAME: "rag-redis" + MILVUS_HOST: "retriever-usvc-milvus" + MILVUS: "" + MILVUS_PORT: "" EASYOCR_MODULE_PATH: "/tmp/.EasyOCR" http_proxy: "" https_proxy: "" @@ -131,3 +133,7 @@ spec: volumes: - name: tmp emptyDir: {} +--- +# Source: retriever-usvc/templates/servicemonitor.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 diff --git a/microservices-connector/config/manifests/retriever-usvc_milvus.yaml b/microservices-connector/config/manifests/retriever-usvc_milvus.yaml new file mode 100644 index 00000000..37d0532e --- /dev/null +++ b/microservices-connector/config/manifests/retriever-usvc_milvus.yaml @@ -0,0 +1,1011 @@ +--- +# Source: retriever-usvc/charts/milvus/charts/minio/templates/serviceaccount.yaml +apiVersion: v1 +kind: ServiceAccount +metadata: + name: "retriever-usvc-minio" + namespace: "default" + labels: + app: minio + chart: minio-8.0.17 + release: "retriever-usvc" +--- +# Source: retriever-usvc/charts/milvus/charts/minio/templates/secrets.yaml +apiVersion: v1 +kind: Secret +metadata: + name: retriever-usvc-minio + labels: + app: minio + chart: minio-8.0.17 + release: retriever-usvc + heritage: Helm +type: Opaque +data: + accesskey: "bWluaW9hZG1pbg==" + secretkey: "bWluaW9hZG1pbg==" +--- +# Source: retriever-usvc/charts/milvus/charts/minio/templates/configmap.yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: retriever-usvc-minio + labels: + app: minio + chart: minio-8.0.17 + release: retriever-usvc + heritage: Helm +data: + initialize: |- + #!/bin/sh + set -e ; # Have script exit in the event of a failed command. + MC_CONFIG_DIR="/etc/minio/mc/" + MC="/usr/bin/mc --insecure --config-dir ${MC_CONFIG_DIR}" + + # connectToMinio + # Use a check-sleep-check loop to wait for Minio service to be available + connectToMinio() { + SCHEME=$1 + ATTEMPTS=0 ; LIMIT=29 ; # Allow 30 attempts + set -e ; # fail if we can't read the keys. + ACCESS=$(cat /config/accesskey) ; SECRET=$(cat /config/secretkey) ; + set +e ; # The connections to minio are allowed to fail. + echo "Connecting to Minio server: $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT" ; + MC_COMMAND="${MC} config host add myminio $SCHEME://$MINIO_ENDPOINT:$MINIO_PORT $ACCESS $SECRET" ; + $MC_COMMAND ; + STATUS=$? ; + until [ $STATUS = 0 ] + do + ATTEMPTS=`expr $ATTEMPTS + 1` ; + echo \"Failed attempts: $ATTEMPTS\" ; + if [ $ATTEMPTS -gt $LIMIT ]; then + exit 1 ; + fi ; + sleep 2 ; # 1 second intervals between attempts + $MC_COMMAND ; + STATUS=$? ; + done ; + set -e ; # reset `e` as active + return 0 + } + + # checkBucketExists ($bucket) + # Check if the bucket exists, by using the exit code of `mc ls` + checkBucketExists() { + BUCKET=$1 + CMD=$(${MC} ls myminio/$BUCKET > /dev/null 2>&1) + return $? + } + + # createBucket ($bucket, $policy, $purge) + # Ensure bucket exists, purging if asked to + createBucket() { + BUCKET=$1 + POLICY=$2 + PURGE=$3 + VERSIONING=$4 + + # Purge the bucket, if set & exists + # Since PURGE is user input, check explicitly for `true` + if [ $PURGE = true ]; then + if checkBucketExists $BUCKET ; then + echo "Purging bucket '$BUCKET'." + set +e ; # don't exit if this fails + ${MC} rm -r --force myminio/$BUCKET + set -e ; # reset `e` as active + else + echo "Bucket '$BUCKET' does not exist, skipping purge." + fi + fi + + # Create the bucket if it does not exist + if ! checkBucketExists $BUCKET ; then + echo "Creating bucket '$BUCKET'" + ${MC} mb myminio/$BUCKET + else + echo "Bucket '$BUCKET' already exists." + fi + + + # set versioning for bucket + if [ ! -z $VERSIONING ] ; then + if [ $VERSIONING = true ] ; then + echo "Enabling versioning for '$BUCKET'" + ${MC} version enable myminio/$BUCKET + elif [ $VERSIONING = false ] ; then + echo "Suspending versioning for '$BUCKET'" + ${MC} version suspend myminio/$BUCKET + fi + else + echo "Bucket '$BUCKET' versioning unchanged." + fi + + # At this point, the bucket should exist, skip checking for existence + # Set policy on the bucket + echo "Setting policy of bucket '$BUCKET' to '$POLICY'." + ${MC} policy set $POLICY myminio/$BUCKET + } + + # Try connecting to Minio instance + scheme=http + connectToMinio $scheme +--- +# Source: retriever-usvc/charts/milvus/templates/configmap.yaml +# If customConfigMap is not set, this ConfigMap will be redendered. +apiVersion: v1 +kind: ConfigMap +metadata: + name: retriever-usvc-milvus + namespace: default +data: + default.yaml: |+ + # Copyright (C) 2019-2021 Zilliz. All rights reserved. + # + # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance + # with the License. You may obtain a copy of the License at + # + # http://www.apache.org/licenses/LICENSE-2.0 + # + # Unless required by applicable law or agreed to in writing, software distributed under the License + # is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + # or implied. See the License for the specific language governing permissions and limitations under the License. + + etcd: + endpoints: + - retriever-usvc-etcd-0.retriever-usvc-etcd-headless.default.svc.cluster.local:2379 + + metastore: + type: etcd + + minio: + address: retriever-usvc-minio + port: 9000 + accessKeyID: minioadmin + secretAccessKey: minioadmin + useSSL: false + bucketName: milvus-bucket + rootPath: file + useIAM: false + useVirtualHost: false + + mq: + type: rocksmq + + messageQueue: rocksmq + + rootCoord: + address: localhost + port: 53100 + enableActiveStandby: false # Enable rootcoord active-standby + + proxy: + port: 19530 + internalPort: 19529 + + queryCoord: + address: localhost + port: 19531 + + enableActiveStandby: false # Enable querycoord active-standby + + queryNode: + port: 21123 + enableDisk: true # Enable querynode load disk index, and search on disk index + + indexCoord: + address: localhost + port: 31000 + enableActiveStandby: false # Enable indexcoord active-standby + + indexNode: + port: 21121 + enableDisk: true # Enable index node build disk vector index + + dataCoord: + address: localhost + port: 13333 + enableActiveStandby: false # Enable datacoord active-standby + + dataNode: + port: 21124 + + log: + level: info + file: + rootPath: "" + maxSize: 300 + maxAge: 10 + maxBackups: 20 + format: text + user.yaml: |- + # For example enable rest http for milvus proxy + # proxy: + # http: + # enabled: true + # maxUserNum: 100 + # maxRoleNum: 10 + ## Enable tlsMode and set the tls cert and key + # tls: + # serverPemPath: /etc/milvus/certs/tls.crt + # serverKeyPath: /etc/milvus/certs/tls.key + # common: + # security: + # tlsMode: 1 +--- +# Source: retriever-usvc/charts/tei/templates/configmap.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: v1 +kind: ConfigMap +metadata: + name: retriever-usvc-tei-config + labels: + helm.sh/chart: tei-1.0.0 + app.kubernetes.io/name: tei + app.kubernetes.io/instance: retriever-usvc + app.kubernetes.io/version: "cpu-1.5" + app.kubernetes.io/managed-by: Helm +data: + MODEL_ID: "BAAI/bge-base-en-v1.5" + PORT: "2081" + http_proxy: "" + https_proxy: "" + no_proxy: "" + NUMBA_CACHE_DIR: "/tmp" + TRANSFORMERS_CACHE: "/tmp/transformers_cache" + HF_HOME: "/tmp/.cache/huggingface" + HF_HUB_DISABLE_PROGRESS_BARS: "1" + HF_HUB_ENABLE_HF_TRANSFER: "0" + # More options for HPU +--- +# Source: retriever-usvc/templates/configmap.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: v1 +kind: ConfigMap +metadata: + name: retriever-usvc-config + labels: + helm.sh/chart: retriever-usvc-1.0.0 + app.kubernetes.io/name: retriever-usvc + app.kubernetes.io/instance: retriever-usvc + app.kubernetes.io/version: "v1.0" + app.kubernetes.io/managed-by: Helm +data: + TEI_EMBEDDING_ENDPOINT: "http://retriever-usvc-tei" + REDIS_URL: "redis://retriever-usvc-redis-vector-db:6379" + INDEX_NAME: "rag-redis" + MILVUS_HOST: "retriever-usvc-milvus" + MILVUS: "" + MILVUS_PORT: "19530" + COLLECTION_NAME: "rag_milvus" + EASYOCR_MODULE_PATH: "/tmp/.EasyOCR" + http_proxy: "" + https_proxy: "" + no_proxy: "" + HF_HOME: "/tmp/.cache/huggingface" + HUGGINGFACEHUB_API_TOKEN: "insert-your-huggingface-token-here" + LOGFLAG: "" +--- +# Source: retriever-usvc/charts/milvus/charts/minio/templates/pvc.yaml +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: retriever-usvc-minio + annotations: + helm.sh/resource-policy: keep + labels: + app: minio + chart: minio-8.0.17 + release: retriever-usvc + heritage: Helm +spec: + accessModes: + - "ReadWriteOnce" + resources: + requests: + storage: "500Gi" +--- +# Source: retriever-usvc/charts/milvus/templates/pvc.yaml +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: retriever-usvc-milvus + namespace: default + annotations: + helm.sh/resource-policy: keep + labels: + helm.sh/chart: milvus-4.2.12 + app.kubernetes.io/name: milvus + app.kubernetes.io/instance: retriever-usvc + app.kubernetes.io/version: "2.4.12" + app.kubernetes.io/managed-by: Helm +spec: + accessModes: + - "ReadWriteOnce" + resources: + requests: + storage: 50Gi +--- +# Source: retriever-usvc/charts/milvus/charts/etcd/templates/svc-headless.yaml +apiVersion: v1 +kind: Service +metadata: + name: retriever-usvc-etcd-headless + namespace: default + labels: + app.kubernetes.io/name: etcd + helm.sh/chart: etcd-6.3.3 + app.kubernetes.io/instance: retriever-usvc + app.kubernetes.io/managed-by: Helm + annotations: + service.alpha.kubernetes.io/tolerate-unready-endpoints: "true" +spec: + type: ClusterIP + clusterIP: None + publishNotReadyAddresses: true + ports: + - name: "client" + port: 2379 + targetPort: client + - name: "peer" + port: 2380 + targetPort: peer + selector: + app.kubernetes.io/name: etcd + app.kubernetes.io/instance: retriever-usvc +--- +# Source: retriever-usvc/charts/milvus/charts/etcd/templates/svc.yaml +apiVersion: v1 +kind: Service +metadata: + name: retriever-usvc-etcd + namespace: default + labels: + app.kubernetes.io/name: etcd + helm.sh/chart: etcd-6.3.3 + app.kubernetes.io/instance: retriever-usvc + app.kubernetes.io/managed-by: Helm + annotations: +spec: + type: ClusterIP + ports: + - name: "client" + port: 2379 + targetPort: client + nodePort: null + - name: "peer" + port: 2380 + targetPort: peer + nodePort: null + selector: + app.kubernetes.io/name: etcd + app.kubernetes.io/instance: retriever-usvc +--- +# Source: retriever-usvc/charts/milvus/charts/minio/templates/service.yaml +apiVersion: v1 +kind: Service +metadata: + name: retriever-usvc-minio + labels: + app: minio + chart: minio-8.0.17 + release: retriever-usvc + heritage: Helm +spec: + type: ClusterIP + ports: + - name: http + port: 9000 + protocol: TCP + targetPort: 9000 + selector: + app: minio + release: retriever-usvc +--- +# Source: retriever-usvc/charts/milvus/templates/service.yaml +apiVersion: v1 +kind: Service +metadata: + name: retriever-usvc-milvus + namespace: default + labels: + helm.sh/chart: milvus-4.2.12 + app.kubernetes.io/name: milvus + app.kubernetes.io/instance: retriever-usvc + app.kubernetes.io/version: "2.4.12" + app.kubernetes.io/managed-by: Helm + component: "standalone" +spec: + type: ClusterIP + ports: + - name: milvus + port: 19530 + protocol: TCP + targetPort: milvus + - name: metrics + protocol: TCP + port: 9091 + targetPort: metrics + selector: + app.kubernetes.io/name: milvus + app.kubernetes.io/instance: retriever-usvc + component: "standalone" +--- +# Source: retriever-usvc/charts/tei/templates/service.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: v1 +kind: Service +metadata: + name: retriever-usvc-tei + labels: + helm.sh/chart: tei-1.0.0 + app.kubernetes.io/name: tei + app.kubernetes.io/instance: retriever-usvc + app.kubernetes.io/version: "cpu-1.5" + app.kubernetes.io/managed-by: Helm +spec: + type: ClusterIP + ports: + - port: 80 + targetPort: 2081 + protocol: TCP + name: tei + selector: + app.kubernetes.io/name: tei + app.kubernetes.io/instance: retriever-usvc +--- +# Source: retriever-usvc/templates/service.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: v1 +kind: Service +metadata: + name: retriever-usvc + labels: + helm.sh/chart: retriever-usvc-1.0.0 + app.kubernetes.io/name: retriever-usvc + app.kubernetes.io/instance: retriever-usvc + app.kubernetes.io/version: "v1.0" + app.kubernetes.io/managed-by: Helm +spec: + type: ClusterIP + ports: + - port: 7000 + targetPort: 7000 + protocol: TCP + name: retriever-usvc + selector: + app.kubernetes.io/name: retriever-usvc + app.kubernetes.io/instance: retriever-usvc +--- +# Source: retriever-usvc/charts/milvus/charts/minio/templates/deployment.yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + name: retriever-usvc-minio + labels: + app: minio + chart: minio-8.0.17 + release: retriever-usvc + heritage: Helm +spec: + strategy: + type: RollingUpdate + rollingUpdate: + maxSurge: 100% + maxUnavailable: 0 + selector: + matchLabels: + app: minio + release: retriever-usvc + template: + metadata: + name: retriever-usvc-minio + labels: + app: minio + release: retriever-usvc + annotations: + checksum/secrets: a67e3e6c2d8da15e83e0deeac32445ec2add93a6d3394b8e051de4379538b677 + checksum/config: 00fcd70c298e23f1a7eb32e4d92853e108b72b0b0be203369d5446a4363a2d91 + spec: + serviceAccountName: "retriever-usvc-minio" + securityContext: + runAsUser: 1000 + runAsGroup: 1000 + fsGroup: 1000 + containers: + - name: minio + image: "minio/minio:RELEASE.2023-03-20T20-16-18Z" + imagePullPolicy: IfNotPresent + command: + - "/bin/sh" + - "-ce" + - "/usr/bin/docker-entrypoint.sh minio -S /etc/minio/certs/ server /export" + volumeMounts: + - name: export + mountPath: /export + ports: + - name: http + containerPort: 9000 + livenessProbe: + httpGet: + path: /minio/health/live + port: http + scheme: HTTP + initialDelaySeconds: 5 + periodSeconds: 5 + timeoutSeconds: 5 + successThreshold: 1 + failureThreshold: 5 + readinessProbe: + tcpSocket: + port: http + initialDelaySeconds: 5 + periodSeconds: 5 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 5 + startupProbe: + tcpSocket: + port: http + initialDelaySeconds: 0 + periodSeconds: 10 + timeoutSeconds: 5 + successThreshold: 1 + failureThreshold: 60 + env: + - name: MINIO_ACCESS_KEY + valueFrom: + secretKeyRef: + name: retriever-usvc-minio + key: accesskey + - name: MINIO_SECRET_KEY + valueFrom: + secretKeyRef: + name: retriever-usvc-minio + key: secretkey + resources: + requests: + memory: 2Gi + volumes: + - name: export + persistentVolumeClaim: + claimName: retriever-usvc-minio + - name: minio-user + secret: + secretName: retriever-usvc-minio +--- +# Source: retriever-usvc/charts/milvus/templates/standalone-deployment.yaml +apiVersion: apps/v1 +kind: Deployment +metadata: + name: retriever-usvc-milvus-standalone + namespace: default + labels: + helm.sh/chart: milvus-4.2.12 + app.kubernetes.io/name: milvus + app.kubernetes.io/instance: retriever-usvc + app.kubernetes.io/version: "2.4.12" + app.kubernetes.io/managed-by: Helm + component: "standalone" + + annotations: + + +spec: + replicas: 1 + strategy: + type: Recreate + selector: + matchLabels: + app.kubernetes.io/name: milvus + app.kubernetes.io/instance: retriever-usvc + component: "standalone" + template: + metadata: + labels: + app.kubernetes.io/name: milvus + app.kubernetes.io/instance: retriever-usvc + component: "standalone" + + annotations: + checksum/config: c64f310ccf37a8352d7173b167eb7c35eb173893e0c7141d3fb6a434d0759025 + + spec: + serviceAccountName: default + initContainers: + containers: + - name: standalone + image: "milvusdb/milvus:v2.4.12" + imagePullPolicy: IfNotPresent + args: [ "milvus", "run", "standalone" ] + ports: + - name: milvus + containerPort: 19530 + protocol: TCP + - name: metrics + containerPort: 9091 + protocol: TCP + livenessProbe: + httpGet: + path: /healthz + port: metrics + initialDelaySeconds: 90 + periodSeconds: 30 + timeoutSeconds: 5 + successThreshold: 1 + failureThreshold: 5 + readinessProbe: + httpGet: + path: /healthz + port: metrics + initialDelaySeconds: 90 + periodSeconds: 10 + timeoutSeconds: 5 + successThreshold: 1 + failureThreshold: 5 + resources: + {} + env: + volumeMounts: + - mountPath: /milvus/tools + name: tools + - name: milvus-config + mountPath: /milvus/configs/default.yaml + subPath: default.yaml + readOnly: true + - name: milvus-config + mountPath: /milvus/configs/user.yaml + subPath: user.yaml + readOnly: true + - name: milvus-data-disk + mountPath: "/var/lib/milvus" + subPath: + - mountPath: /var/lib/milvus/data + name: disk + + volumes: + - emptyDir: {} + name: tools + - name: milvus-config + configMap: + name: retriever-usvc-milvus + - name: milvus-data-disk + persistentVolumeClaim: + claimName: retriever-usvc-milvus + - name: disk + emptyDir: {} +--- +# Source: retriever-usvc/charts/tei/templates/deployment.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: apps/v1 +kind: Deployment +metadata: + name: retriever-usvc-tei + labels: + helm.sh/chart: tei-1.0.0 + app.kubernetes.io/name: tei + app.kubernetes.io/instance: retriever-usvc + app.kubernetes.io/version: "cpu-1.5" + app.kubernetes.io/managed-by: Helm +spec: + selector: + matchLabels: + app.kubernetes.io/name: tei + app.kubernetes.io/instance: retriever-usvc + template: + metadata: + labels: + app.kubernetes.io/name: tei + app.kubernetes.io/instance: retriever-usvc + spec: + securityContext: + {} + containers: + - name: tei + envFrom: + - configMapRef: + name: retriever-usvc-tei-config + - configMapRef: + name: extra-env-config + optional: true + securityContext: + {} + image: "ghcr.io/huggingface/text-embeddings-inference:cpu-1.5" + imagePullPolicy: IfNotPresent + args: + - "--auto-truncate" + volumeMounts: + - mountPath: /data + name: model-volume + - mountPath: /dev/shm + name: shm + - mountPath: /tmp + name: tmp + ports: + - name: http + containerPort: 2081 + protocol: TCP + livenessProbe: + failureThreshold: 24 + httpGet: + path: /health + port: http + initialDelaySeconds: 5 + periodSeconds: 5 + timeoutSeconds: 2 + readinessProbe: + httpGet: + path: /health + port: http + initialDelaySeconds: 5 + periodSeconds: 5 + timeoutSeconds: 2 + startupProbe: + failureThreshold: 120 + httpGet: + path: /health + port: http + initialDelaySeconds: 5 + periodSeconds: 5 + resources: + {} + volumes: + - name: model-volume + hostPath: + path: /mnt/opea-models + type: Directory + - name: shm + emptyDir: + medium: Memory + sizeLimit: 1Gi + - name: tmp + emptyDir: {} + # extra time to finish processing buffered requests on CPU before pod is forcibly terminated + terminationGracePeriodSeconds: 60 +--- +# Source: retriever-usvc/templates/deployment.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: apps/v1 +kind: Deployment +metadata: + name: retriever-usvc + labels: + helm.sh/chart: retriever-usvc-1.0.0 + app.kubernetes.io/name: retriever-usvc + app.kubernetes.io/instance: retriever-usvc + app.kubernetes.io/version: "v1.0" + app.kubernetes.io/managed-by: Helm +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: retriever-usvc + app.kubernetes.io/instance: retriever-usvc + template: + metadata: + labels: + app.kubernetes.io/name: retriever-usvc + app.kubernetes.io/instance: retriever-usvc + spec: + securityContext: + {} + containers: + - name: retriever-usvc + envFrom: + - configMapRef: + name: retriever-usvc-config + - configMapRef: + name: extra-env-config + optional: true + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + readOnlyRootFilesystem: true + runAsNonRoot: true + runAsUser: 1000 + seccompProfile: + type: RuntimeDefault + image: "opea/retriever-milvus:latest" + imagePullPolicy: IfNotPresent + ports: + - name: retriever-usvc + containerPort: 7000 + protocol: TCP + volumeMounts: + - mountPath: /tmp + name: tmp + livenessProbe: + failureThreshold: 24 + httpGet: + path: v1/health_check + port: retriever-usvc + initialDelaySeconds: 5 + periodSeconds: 5 + readinessProbe: + httpGet: + path: v1/health_check + port: retriever-usvc + initialDelaySeconds: 5 + periodSeconds: 5 + startupProbe: + failureThreshold: 120 + httpGet: + path: v1/health_check + port: retriever-usvc + initialDelaySeconds: 5 + periodSeconds: 5 + resources: + {} + volumes: + - name: tmp + emptyDir: {} +--- +# Source: retriever-usvc/charts/milvus/charts/etcd/templates/statefulset.yaml +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: retriever-usvc-etcd + namespace: default + labels: + app.kubernetes.io/name: etcd + helm.sh/chart: etcd-6.3.3 + app.kubernetes.io/instance: retriever-usvc + app.kubernetes.io/managed-by: Helm +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: etcd + app.kubernetes.io/instance: retriever-usvc + serviceName: retriever-usvc-etcd-headless + podManagementPolicy: Parallel + updateStrategy: + type: RollingUpdate + template: + metadata: + labels: + app.kubernetes.io/name: etcd + helm.sh/chart: etcd-6.3.3 + app.kubernetes.io/instance: retriever-usvc + app.kubernetes.io/managed-by: Helm + annotations: + spec: + + affinity: + podAffinity: + + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - podAffinityTerm: + labelSelector: + matchLabels: + app.kubernetes.io/name: etcd + app.kubernetes.io/instance: retriever-usvc + namespaces: + - "default" + topologyKey: kubernetes.io/hostname + weight: 1 + nodeAffinity: + + securityContext: + fsGroup: 1001 + serviceAccountName: "default" + containers: + - name: etcd + image: docker.io/milvusdb/etcd:3.5.14-r1 + imagePullPolicy: "IfNotPresent" + securityContext: + runAsNonRoot: true + runAsUser: 1001 + env: + - name: BITNAMI_DEBUG + value: "false" + - name: MY_POD_IP + valueFrom: + fieldRef: + fieldPath: status.podIP + - name: MY_POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: ETCDCTL_API + value: "3" + - name: ETCD_ON_K8S + value: "yes" + - name: ETCD_START_FROM_SNAPSHOT + value: "no" + - name: ETCD_DISASTER_RECOVERY + value: "no" + - name: ETCD_NAME + value: "$(MY_POD_NAME)" + - name: ETCD_DATA_DIR + value: "/bitnami/etcd/data" + - name: ETCD_LOG_LEVEL + value: "info" + - name: ALLOW_NONE_AUTHENTICATION + value: "yes" + - name: ETCD_ADVERTISE_CLIENT_URLS + value: "http://$(MY_POD_NAME).retriever-usvc-etcd-headless.default.svc.cluster.local:2379" + - name: ETCD_LISTEN_CLIENT_URLS + value: "http://0.0.0.0:2379" + - name: ETCD_INITIAL_ADVERTISE_PEER_URLS + value: "http://$(MY_POD_NAME).retriever-usvc-etcd-headless.default.svc.cluster.local:2380" + - name: ETCD_LISTEN_PEER_URLS + value: "http://0.0.0.0:2380" + - name: ETCD_AUTO_COMPACTION_MODE + value: "revision" + - name: ETCD_AUTO_COMPACTION_RETENTION + value: "1000" + - name: ETCD_QUOTA_BACKEND_BYTES + value: "4294967296" + - name: ETCD_HEARTBEAT_INTERVAL + value: "500" + - name: ETCD_ELECTION_TIMEOUT + value: "2500" + envFrom: + ports: + - name: client + containerPort: 2379 + protocol: TCP + - name: peer + containerPort: 2380 + protocol: TCP + livenessProbe: + exec: + command: + - /opt/bitnami/scripts/etcd/healthcheck.sh + initialDelaySeconds: 60 + periodSeconds: 30 + timeoutSeconds: 10 + successThreshold: 1 + failureThreshold: 5 + readinessProbe: + exec: + command: + - /opt/bitnami/scripts/etcd/healthcheck.sh + initialDelaySeconds: 60 + periodSeconds: 20 + timeoutSeconds: 10 + successThreshold: 1 + failureThreshold: 5 + resources: + limits: {} + requests: {} + volumeMounts: + - name: data + mountPath: /bitnami/etcd + volumes: + volumeClaimTemplates: + - metadata: + name: data + spec: + accessModes: + - "ReadWriteOnce" + resources: + requests: + storage: "10Gi" +--- +# Source: retriever-usvc/charts/tei/templates/horizontal-pod-autoscaler.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 +--- +# Source: retriever-usvc/charts/tei/templates/servicemonitor.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 +--- +# Source: retriever-usvc/templates/servicemonitor.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 diff --git a/microservices-connector/config/manifests/tei.yaml b/microservices-connector/config/manifests/tei.yaml index 0354653b..fcc2a389 100644 --- a/microservices-connector/config/manifests/tei.yaml +++ b/microservices-connector/config/manifests/tei.yaml @@ -22,7 +22,9 @@ data: NUMBA_CACHE_DIR: "/tmp" TRANSFORMERS_CACHE: "/tmp/transformers_cache" HF_HOME: "/tmp/.cache/huggingface" - MAX_WARMUP_SEQUENCE_LENGTH: "512" + HF_HUB_DISABLE_PROGRESS_BARS: "1" + HF_HUB_ENABLE_HF_TRANSFER: "0" + # More options for HPU --- # Source: tei/templates/service.yaml # Copyright (C) 2024 Intel Corporation diff --git a/microservices-connector/config/manifests/tei_gaudi.yaml b/microservices-connector/config/manifests/tei_gaudi.yaml index 94cf5f4e..b5bb212f 100644 --- a/microservices-connector/config/manifests/tei_gaudi.yaml +++ b/microservices-connector/config/manifests/tei_gaudi.yaml @@ -22,6 +22,10 @@ data: NUMBA_CACHE_DIR: "/tmp" TRANSFORMERS_CACHE: "/tmp/transformers_cache" HF_HOME: "/tmp/.cache/huggingface" + HF_HUB_DISABLE_PROGRESS_BARS: "1" + HF_HUB_ENABLE_HF_TRANSFER: "0" + # More options for HPU + OMPI_MCA_btl_vader_single_copy_mechanism: "none" MAX_WARMUP_SEQUENCE_LENGTH: "512" --- # Source: tei/templates/service.yaml diff --git a/microservices-connector/config/manifests/teirerank.yaml b/microservices-connector/config/manifests/teirerank.yaml index 639350d5..b0d20bee 100644 --- a/microservices-connector/config/manifests/teirerank.yaml +++ b/microservices-connector/config/manifests/teirerank.yaml @@ -22,6 +22,9 @@ data: NUMBA_CACHE_DIR: "/tmp" TRANSFORMERS_CACHE: "/tmp/transformers_cache" HF_HOME: "/tmp/.cache/huggingface" + HF_HUB_DISABLE_PROGRESS_BARS: "1" + HF_HUB_ENABLE_HF_TRANSFER: "0" + # More options for HPU --- # Source: teirerank/templates/service.yaml # Copyright (C) 2024 Intel Corporation diff --git a/microservices-connector/config/manifests/teirerank_gaudi.yaml b/microservices-connector/config/manifests/teirerank_gaudi.yaml new file mode 100644 index 00000000..e0cd8a4d --- /dev/null +++ b/microservices-connector/config/manifests/teirerank_gaudi.yaml @@ -0,0 +1,151 @@ +--- +# Source: teirerank/templates/configmap.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: v1 +kind: ConfigMap +metadata: + name: teirerank-config + labels: + helm.sh/chart: teirerank-1.0.0 + app.kubernetes.io/name: teirerank + app.kubernetes.io/instance: teirerank + app.kubernetes.io/version: "cpu-1.5" + app.kubernetes.io/managed-by: Helm +data: + MODEL_ID: "BAAI/bge-reranker-base" + PORT: "2082" + http_proxy: "" + https_proxy: "" + no_proxy: "" + NUMBA_CACHE_DIR: "/tmp" + TRANSFORMERS_CACHE: "/tmp/transformers_cache" + HF_HOME: "/tmp/.cache/huggingface" + HF_HUB_DISABLE_PROGRESS_BARS: "1" + HF_HUB_ENABLE_HF_TRANSFER: "0" + # More options for HPU + OMPI_MCA_btl_vader_single_copy_mechanism: "none" + MAX_WARMUP_SEQUENCE_LENGTH: "512" +--- +# Source: teirerank/templates/service.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: v1 +kind: Service +metadata: + name: teirerank + labels: + helm.sh/chart: teirerank-1.0.0 + app.kubernetes.io/name: teirerank + app.kubernetes.io/instance: teirerank + app.kubernetes.io/version: "cpu-1.5" + app.kubernetes.io/managed-by: Helm +spec: + type: ClusterIP + ports: + - port: 80 + targetPort: 2082 + protocol: TCP + name: teirerank + selector: + app.kubernetes.io/name: teirerank + app.kubernetes.io/instance: teirerank +--- +# Source: teirerank/templates/deployment.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: apps/v1 +kind: Deployment +metadata: + name: teirerank + labels: + helm.sh/chart: teirerank-1.0.0 + app.kubernetes.io/name: teirerank + app.kubernetes.io/instance: teirerank + app.kubernetes.io/version: "cpu-1.5" + app.kubernetes.io/managed-by: Helm +spec: + selector: + matchLabels: + app.kubernetes.io/name: teirerank + app.kubernetes.io/instance: teirerank + template: + metadata: + labels: + app.kubernetes.io/name: teirerank + app.kubernetes.io/instance: teirerank + spec: + securityContext: + {} + containers: + - name: teirerank + envFrom: + - configMapRef: + name: teirerank-config + - configMapRef: + name: extra-env-config + optional: true + securityContext: + {} + image: "ghcr.io/huggingface/tei-gaudi:1.5.0" + imagePullPolicy: IfNotPresent + args: + - "--auto-truncate" + volumeMounts: + - mountPath: /data + name: model-volume + - mountPath: /dev/shm + name: shm + - mountPath: /tmp + name: tmp + ports: + - name: http + containerPort: 2082 + protocol: TCP + livenessProbe: + failureThreshold: 24 + httpGet: + path: /health + port: http + initialDelaySeconds: 8 + periodSeconds: 8 + timeoutSeconds: 1 + readinessProbe: + httpGet: + path: /health + port: http + initialDelaySeconds: 8 + periodSeconds: 8 + timeoutSeconds: 1 + startupProbe: + failureThreshold: 120 + httpGet: + path: /health + port: http + initialDelaySeconds: 5 + periodSeconds: 5 + resources: + limits: + habana.ai/gaudi: 1 + volumes: + - name: model-volume + hostPath: + path: /mnt/opea-models + type: Directory + - name: shm + emptyDir: + medium: Memory + sizeLimit: 1Gi + - name: tmp + emptyDir: {} +--- +# Source: teirerank/templates/horizontal-pod-autoscaler.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 +--- +# Source: teirerank/templates/servicemonitor.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 diff --git a/microservices-connector/config/manifests/tgi.yaml b/microservices-connector/config/manifests/tgi.yaml index d5b8e237..8f2da5e2 100644 --- a/microservices-connector/config/manifests/tgi.yaml +++ b/microservices-connector/config/manifests/tgi.yaml @@ -24,6 +24,9 @@ data: NUMBA_CACHE_DIR: "/tmp" HF_HOME: "/tmp/.cache/huggingface" CUDA_GRAPHS: "0" + HF_HUB_DISABLE_PROGRESS_BARS: "1" + HF_HUB_ENABLE_HF_TRANSFER: "0" + # More options for HPU --- # Source: tgi/templates/service.yaml # Copyright (C) 2024 Intel Corporation diff --git a/microservices-connector/config/manifests/tgi_gaudi.yaml b/microservices-connector/config/manifests/tgi_gaudi.yaml index cad97ad6..802bc670 100644 --- a/microservices-connector/config/manifests/tgi_gaudi.yaml +++ b/microservices-connector/config/manifests/tgi_gaudi.yaml @@ -25,6 +25,14 @@ data: HF_HOME: "/tmp/.cache/huggingface" MAX_INPUT_LENGTH: "1024" MAX_TOTAL_TOKENS: "2048" + HF_HUB_DISABLE_PROGRESS_BARS: "1" + HF_HUB_ENABLE_HF_TRANSFER: "0" + # More options for HPU + OMPI_MCA_btl_vader_single_copy_mechanism: "none" + ENABLE_HPU_GRAPH: "true" + LIMIT_HPU_GRAPH: "true" + USE_FLASH_ATTENTION: "true" + FLASH_ATTENTION_RECOMPUTE: "true" --- # Source: tgi/templates/service.yaml # Copyright (C) 2024 Intel Corporation diff --git a/microservices-connector/config/manifests/tgi_nv.yaml b/microservices-connector/config/manifests/tgi_nv.yaml index 2917e9ee..f3a80dfd 100644 --- a/microservices-connector/config/manifests/tgi_nv.yaml +++ b/microservices-connector/config/manifests/tgi_nv.yaml @@ -23,6 +23,9 @@ data: HABANA_LOGS: "/tmp/habana_logs" NUMBA_CACHE_DIR: "/tmp" HF_HOME: "/tmp/.cache/huggingface" + HF_HUB_DISABLE_PROGRESS_BARS: "1" + HF_HUB_ENABLE_HF_TRANSFER: "0" + # More options for HPU --- # Source: tgi/templates/service.yaml # Copyright (C) 2024 Intel Corporation diff --git a/microservices-connector/config/manifests/ui.yaml b/microservices-connector/config/manifests/ui.yaml index a19957c5..4a9394f8 100644 --- a/microservices-connector/config/manifests/ui.yaml +++ b/microservices-connector/config/manifests/ui.yaml @@ -16,15 +16,8 @@ metadata: data: APP_BACKEND_SERVICE_ENDPOINT: "/v1/chatqna" APP_DATA_PREP_SERVICE_URL: "/v1/dataprep" - CHAT_BASE_URL: "/v1/chatqna" - UPLOAD_FILE_BASE_URL: "/v1/dataprep" - GET_FILE: "/v1/dataprep/get_file" - DELETE_FILE: "/v1/dataprep/delete_file" - BASE_URL: "/v1/chatqna" - DOC_BASE_URL: "/v1/chatqna" - BASIC_URL: "/v1/chatqna" - VITE_CODE_GEN_URL: "/v1/chatqna" - VITE_DOC_SUM_URL: "/v1/chatqna" + APP_DATA_PREP_GET_FILE_URL: "/v1/dataprep/get_file" + APP_DATA_PREP_DELETE_FILE_URL: "/v1/dataprep/delete_file" --- # Source: ui/templates/service.yaml # Copyright (C) 2024 Intel Corporation @@ -98,6 +91,26 @@ spec: - name: ui containerPort: 80 protocol: TCP + livenessProbe: + failureThreshold: 24 + httpGet: + path: / + port: ui + initialDelaySeconds: 5 + periodSeconds: 5 + readinessProbe: + httpGet: + path: / + port: ui + initialDelaySeconds: 5 + periodSeconds: 5 + startupProbe: + failureThreshold: 120 + httpGet: + path: / + port: ui + initialDelaySeconds: 5 + periodSeconds: 5 resources: {} volumeMounts: diff --git a/microservices-connector/config/manifests/visualqna_svelte-ui.yaml b/microservices-connector/config/manifests/visualqna_svelte-ui.yaml new file mode 100644 index 00000000..f605e90c --- /dev/null +++ b/microservices-connector/config/manifests/visualqna_svelte-ui.yaml @@ -0,0 +1,118 @@ +--- +# Source: ui/templates/configmap.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: v1 +kind: ConfigMap +metadata: + name: visualqna-svelte-ui-config + labels: + helm.sh/chart: ui-1.0.0 + app.kubernetes.io/name: ui + app.kubernetes.io/instance: visualqna-svelte-ui + app.kubernetes.io/version: "v1.0" + app.kubernetes.io/managed-by: Helm +data: + BACKEND_BASE_URL: "/v1/visualqna" +--- +# Source: ui/templates/service.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: v1 +kind: Service +metadata: + name: visualqna-svelte-ui + labels: + helm.sh/chart: ui-1.0.0 + app.kubernetes.io/name: ui + app.kubernetes.io/instance: visualqna-svelte-ui + app.kubernetes.io/version: "v1.0" + app.kubernetes.io/managed-by: Helm +spec: + type: ClusterIP + ports: + - port: 5174 + targetPort: ui + protocol: TCP + name: ui + selector: + app.kubernetes.io/name: ui + app.kubernetes.io/instance: visualqna-svelte-ui +--- +# Source: ui/templates/deployment.yaml +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +apiVersion: apps/v1 +kind: Deployment +metadata: + name: visualqna-svelte-ui + labels: + helm.sh/chart: ui-1.0.0 + app.kubernetes.io/name: ui + app.kubernetes.io/instance: visualqna-svelte-ui + app.kubernetes.io/version: "v1.0" + app.kubernetes.io/managed-by: Helm +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: ui + app.kubernetes.io/instance: visualqna-svelte-ui + template: + metadata: + labels: + helm.sh/chart: ui-1.0.0 + app.kubernetes.io/name: ui + app.kubernetes.io/instance: visualqna-svelte-ui + app.kubernetes.io/version: "v1.0" + app.kubernetes.io/managed-by: Helm + spec: + securityContext: + {} + containers: + - name: ui + envFrom: + - configMapRef: + name: visualqna-svelte-ui-config + - configMapRef: + name: extra-env-config + optional: true + securityContext: + {} + image: "opea/visualqna-ui:latest" + imagePullPolicy: IfNotPresent + ports: + - name: ui + containerPort: 5173 + protocol: TCP + livenessProbe: + failureThreshold: 24 + httpGet: + path: / + port: ui + initialDelaySeconds: 5 + periodSeconds: 5 + readinessProbe: + httpGet: + path: / + port: ui + initialDelaySeconds: 5 + periodSeconds: 5 + startupProbe: + failureThreshold: 120 + httpGet: + path: / + port: ui + initialDelaySeconds: 5 + periodSeconds: 5 + resources: + {} + volumeMounts: + - mountPath: /tmp + name: tmp + volumes: + - name: tmp + emptyDir: {} diff --git a/microservices-connector/config/manifests/vllm_gaudi.yaml b/microservices-connector/config/manifests/vllm_gaudi.yaml index 64f9f094..3683b4bc 100644 --- a/microservices-connector/config/manifests/vllm_gaudi.yaml +++ b/microservices-connector/config/manifests/vllm_gaudi.yaml @@ -23,7 +23,7 @@ data: HF_HOME: "/tmp/.cache/huggingface" # https://github.com/outlines-dev/outlines/blob/main/outlines/caching.py#L14-L29 OUTLINES_CACHE_DIR: "/tmp/.cache/outlines" - VLLM_CPU_KVCACHE_SPACE: "40" + OMPI_MCA_btl_vader_single_copy_mechanism: "none" --- # Source: vllm/templates/service.yaml # Copyright (C) 2024 Intel Corporation @@ -88,12 +88,18 @@ spec: optional: true securityContext: {} - image: "opea/llm-vllm-hpu:latest" + image: "opea/vllm-hpu:latest" imagePullPolicy: IfNotPresent args: - - "/bin/bash" - - "-c" - - "python3 -m vllm.entrypoints.openai.api_server --enforce-eager --model Intel/neural-chat-7b-v3-3 --tensor-parallel-size 1 --host 0.0.0.0 --port 2080 --download-dir /data --block-size 128 --max-num-seqs 256 --max-seq_len-to-capture 2048" + - "--enforce-eager" + - "--tensor-parallel-size" + - "1" + - "--block-size" + - "128" + - "--max-num-seqs" + - "256" + - "--max-seq_len-to-capture" + - "2048" - "--model" - "Intel/neural-chat-7b-v3-3" - "--host"