From 883c28a21d4987855f14345553632f9c76ca53f2 Mon Sep 17 00:00:00 2001
From: dmsuehir <dina.s.jones@intel.com>
Date: Wed, 14 Aug 2024 13:55:25 -0700
Subject: [PATCH 01/57] Fix the CodeGen Kubernetes ConfigMap 'nil' proxy var
 error

Signed-off-by: dmsuehir <dina.s.jones@intel.com>
---
 CodeGen/kubernetes/manifests/README.md         |  5 +++--
 CodeGen/kubernetes/manifests/xeon/codegen.yaml | 12 ++++++------
 2 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/CodeGen/kubernetes/manifests/README.md b/CodeGen/kubernetes/manifests/README.md
index f6a0763726..1fc3db5105 100644
--- a/CodeGen/kubernetes/manifests/README.md
+++ b/CodeGen/kubernetes/manifests/README.md
@@ -6,7 +6,7 @@
 
 > You can also customize the "MODEL_ID" if needed.
 
-> You need to make sure you have created the directory `/mnt/opea-models` to save the cached model on the node where the CodeGEn workload is running. Otherwise, you need to modify the `codegen.yaml` file to change the `model-volume` to a directory that exists on the node.
+> You need to make sure you have created the directory `/mnt/opea-models` to save the cached model on the node where the CodeGen workload is running. Otherwise, you need to modify the `codegen.yaml` file to change the `model-volume` to a directory that exists on the node.
 
 ## Deploy On Xeon
 
@@ -30,7 +30,7 @@ kubectl apply -f codegen.yaml
 
 To verify the installation, run the command `kubectl get pod` to make sure all pods are running.
 
-Then run the command `kubectl port-forward svc/codegen 7778:7778` to expose the CodeGEn service for access.
+Then run the command `kubectl port-forward svc/codegen 7778:7778` to expose the CodeGen service for access.
 
 Open another terminal and run the following command to verify the service if working:
 
@@ -40,3 +40,4 @@ curl http://localhost:7778/v1/codegen -H "Content-Type: application/json" -d '{
      "messages": "Implement a high-level API for a TODO list application. The API takes as input an operation request and updates the TODO list in place. If the request is invalid, raise an exception."
      }'
 ```
+
diff --git a/CodeGen/kubernetes/manifests/xeon/codegen.yaml b/CodeGen/kubernetes/manifests/xeon/codegen.yaml
index 06b8a75445..9edadc88c0 100644
--- a/CodeGen/kubernetes/manifests/xeon/codegen.yaml
+++ b/CodeGen/kubernetes/manifests/xeon/codegen.yaml
@@ -17,9 +17,9 @@ data:
   TGI_LLM_ENDPOINT: "http://codegen-tgi"
   HUGGINGFACEHUB_API_TOKEN: "insert-your-huggingface-token-here"
   HF_HOME: "/tmp/.cache/huggingface"
-  http_proxy:
-  https_proxy:
-  no_proxy:
+  http_proxy: ""
+  https_proxy: ""
+  no_proxy: ""
   LANGCHAIN_TRACING_V2: "false"
   LANGCHAIN_API_KEY: insert-your-langchain-key-here
   LANGCHAIN_PROJECT: "opea-llm-uservice"
@@ -45,9 +45,9 @@ data:
   HF_TOKEN: "insert-your-huggingface-token-here"
   MAX_INPUT_TOKENS: "1024"
   MAX_TOTAL_TOKENS: "4096"
-  http_proxy:
-  https_proxy:
-  no_proxy:
+  http_proxy: ""
+  https_proxy: ""
+  no_proxy: ""
   HABANA_LOGS: "/tmp/habana_logs"
   NUMBA_CACHE_DIR: "/tmp"
   TRANSFORMERS_CACHE: "/tmp/transformers_cache"

From ab57d04f0e6480d3aa059020d62538394bad7e7f Mon Sep 17 00:00:00 2001
From: dmsuehir <dina.s.jones@intel.com>
Date: Wed, 14 Aug 2024 14:48:07 -0700
Subject: [PATCH 02/57] Updates after running on Gaudi to add
 hugepages-2Mi/memory resources

Signed-off-by: dmsuehir <dina.s.jones@intel.com>
---
 CodeGen/kubernetes/manifests/README.md          |  4 ++++
 CodeGen/kubernetes/manifests/gaudi/codegen.yaml | 14 ++++++++------
 2 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/CodeGen/kubernetes/manifests/README.md b/CodeGen/kubernetes/manifests/README.md
index 1fc3db5105..a2cf126397 100644
--- a/CodeGen/kubernetes/manifests/README.md
+++ b/CodeGen/kubernetes/manifests/README.md
@@ -7,6 +7,7 @@
 > You can also customize the "MODEL_ID" if needed.
 
 > You need to make sure you have created the directory `/mnt/opea-models` to save the cached model on the node where the CodeGen workload is running. Otherwise, you need to modify the `codegen.yaml` file to change the `model-volume` to a directory that exists on the node.
+> Alternatively, you can change the `codegen.yaml` to use a different type of volume, such as a persistent volume claim.
 
 ## Deploy On Xeon
 
@@ -34,6 +35,9 @@ Then run the command `kubectl port-forward svc/codegen 7778:7778` to expose the
 
 Open another terminal and run the following command to verify the service if working:
 
+> Note that it may take a couple of minutes for the service to be ready. If the `curl` command below fails, you
+> can check the logs of the codegen-tgi pod to see it's status or check for errors.
+
 ```
 kubectl get pods
 curl http://localhost:7778/v1/codegen -H "Content-Type: application/json" -d '{
diff --git a/CodeGen/kubernetes/manifests/gaudi/codegen.yaml b/CodeGen/kubernetes/manifests/gaudi/codegen.yaml
index 810c90f360..1471faf131 100644
--- a/CodeGen/kubernetes/manifests/gaudi/codegen.yaml
+++ b/CodeGen/kubernetes/manifests/gaudi/codegen.yaml
@@ -17,9 +17,9 @@ data:
   TGI_LLM_ENDPOINT: "http://codegen-tgi"
   HUGGINGFACEHUB_API_TOKEN: "insert-your-huggingface-token-here"
   HF_HOME: "/tmp/.cache/huggingface"
-  http_proxy:
-  https_proxy:
-  no_proxy:
+  http_proxy: ""
+  https_proxy: ""
+  no_proxy: ""
   LANGCHAIN_TRACING_V2: "false"
   LANGCHAIN_API_KEY: insert-your-langchain-key-here
   LANGCHAIN_PROJECT: "opea-llm-uservice"
@@ -45,9 +45,9 @@ data:
   HF_TOKEN: "insert-your-huggingface-token-here"
   MAX_INPUT_TOKENS: "1024"
   MAX_TOTAL_TOKENS: "4096"
-  http_proxy:
-  https_proxy:
-  no_proxy:
+  http_proxy: ""
+  https_proxy: ""
+  no_proxy: ""
   HABANA_LOGS: "/tmp/habana_logs"
   NUMBA_CACHE_DIR: "/tmp"
   TRANSFORMERS_CACHE: "/tmp/transformers_cache"
@@ -243,6 +243,8 @@ spec:
           resources:
             limits:
               habana.ai/gaudi: 1
+              memory: 64Gi
+              hugepages-2Mi: 4400Mi
       volumes:
         - name: model-volume
           hostPath:

From 08c0f97ce2b04dea4abd0416962e51a08941fbb8 Mon Sep 17 00:00:00 2001
From: dmsuehir <dina.s.jones@intel.com>
Date: Wed, 14 Aug 2024 14:50:37 -0700
Subject: [PATCH 03/57] Fix typo

Signed-off-by: dmsuehir <dina.s.jones@intel.com>
---
 CodeGen/kubernetes/manifests/README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/CodeGen/kubernetes/manifests/README.md b/CodeGen/kubernetes/manifests/README.md
index a2cf126397..dbda67429b 100644
--- a/CodeGen/kubernetes/manifests/README.md
+++ b/CodeGen/kubernetes/manifests/README.md
@@ -36,7 +36,7 @@ Then run the command `kubectl port-forward svc/codegen 7778:7778` to expose the
 Open another terminal and run the following command to verify the service if working:
 
 > Note that it may take a couple of minutes for the service to be ready. If the `curl` command below fails, you
-> can check the logs of the codegen-tgi pod to see it's status or check for errors.
+> can check the logs of the codegen-tgi pod to see its status or check for errors.
 
 ```
 kubectl get pods

From 4ccae79078d5924968932581fc6a80203e91f491 Mon Sep 17 00:00:00 2001
From: dmsuehir <dina.s.jones@intel.com>
Date: Wed, 14 Aug 2024 14:52:30 -0700
Subject: [PATCH 04/57] Removing blank line

Signed-off-by: dmsuehir <dina.s.jones@intel.com>
---
 CodeGen/kubernetes/manifests/README.md | 1 -
 1 file changed, 1 deletion(-)

diff --git a/CodeGen/kubernetes/manifests/README.md b/CodeGen/kubernetes/manifests/README.md
index dbda67429b..4e0a0e0b69 100644
--- a/CodeGen/kubernetes/manifests/README.md
+++ b/CodeGen/kubernetes/manifests/README.md
@@ -44,4 +44,3 @@ curl http://localhost:7778/v1/codegen -H "Content-Type: application/json" -d '{
      "messages": "Implement a high-level API for a TODO list application. The API takes as input an operation request and updates the TODO list in place. If the request is invalid, raise an exception."
      }'
 ```
-

From 39dda6abd788dfeae70416e8a264c3507cd9c784 Mon Sep 17 00:00:00 2001
From: "chen, suyue" <suyue.chen@intel.com>
Date: Thu, 15 Aug 2024 22:39:21 +0800
Subject: [PATCH 05/57] Enhance CI/CD infrastructure (#593)

Signed-off-by: chensuyue <suyue.chen@intel.com>
Signed-off-by: Sun, Xuehao <xuehao.sun@intel.com>
---
 .github/workflows/_example-workflow.yml       |  77 +++++++------
 .github/workflows/_run-docker-compose.yml     |   3 +-
 .github/workflows/manual-cd-workflow.yml      |  31 +++--
 .github/workflows/pr-docker-compose-e2e.yml   |  21 +---
 AudioQnA/docker/docker_build_compose.yaml     |  54 +++++++++
 AudioQnA/docker/gaudi/compose.yaml            |  15 +--
 AudioQnA/docker/xeon/compose.yaml             |  15 +--
 AudioQnA/tests/test_audioqna_on_gaudi.sh      |  50 ++++----
 AudioQnA/tests/test_audioqna_on_xeon.sh       |  37 ++----
 ChatQnA/docker/aipc/compose.yaml              |  16 ++-
 ChatQnA/docker/docker_build_compose.yaml      | 108 ++++++++++++++++++
 ChatQnA/docker/gaudi/compose.yaml             |  19 ++-
 ChatQnA/docker/gaudi/compose_guardrails.yaml  |  21 ++--
 ChatQnA/docker/gaudi/compose_vllm.yaml        |  21 ++--
 ChatQnA/docker/gaudi/compose_vllm_ray.yaml    |  21 ++--
 ChatQnA/docker/gpu/compose.yaml               |  17 ++-
 ChatQnA/docker/xeon/compose.yaml              |  17 ++-
 ChatQnA/docker/xeon/compose_qdrant.yaml       |  17 ++-
 ChatQnA/docker/xeon/compose_vllm.yaml         |  19 ++-
 ChatQnA/tests/test_chatqna_on_gaudi.sh        |  64 +++--------
 ChatQnA/tests/test_chatqna_on_xeon.sh         |  53 ++++-----
 ChatQnA/tests/test_chatqna_qdrant_on_xeon.sh  |  36 ++----
 ChatQnA/tests/test_chatqna_vllm_on_gaudi.sh   |  61 +++-------
 ChatQnA/tests/test_chatqna_vllm_on_xeon.sh    |  66 ++++-------
 .../tests/test_chatqna_vllm_ray_on_gaudi.sh   |  60 +++-------
 CodeGen/docker/docker_build_compose.yaml      |  30 +++++
 CodeGen/docker/gaudi/README.md                |  22 ++--
 CodeGen/docker/gaudi/compose.yaml             |  19 +--
 CodeGen/docker/xeon/README.md                 |  22 ++--
 CodeGen/docker/xeon/compose.yaml              |  18 +--
 CodeGen/tests/test_codegen_on_gaudi.sh        |  44 +++----
 CodeGen/tests/test_codegen_on_xeon.sh         |  43 +++----
 CodeTrans/docker/docker_build_compose.yaml    |  24 ++++
 CodeTrans/docker/gaudi/compose.yaml           |   9 +-
 CodeTrans/docker/xeon/compose.yaml            |   9 +-
 CodeTrans/tests/test_codetrans_on_gaudi.sh    |  43 +++----
 CodeTrans/tests/test_codetrans_on_xeon.sh     |  41 +++----
 DocSum/docker/docker_build_compose.yaml       |  30 +++++
 DocSum/docker/gaudi/README.md                 |  19 ++-
 DocSum/docker/gaudi/compose.yaml              |  18 +--
 DocSum/docker/xeon/README.md                  |  20 +++-
 DocSum/docker/xeon/compose.yaml               |  18 +--
 DocSum/tests/test_docsum_on_gaudi.sh          |  45 +++-----
 DocSum/tests/test_docsum_on_xeon.sh           |  45 +++-----
 FaqGen/docker/docker_build_compose.yaml       |  30 +++++
 FaqGen/docker/gaudi/compose.yaml              |   8 +-
 FaqGen/docker/xeon/compose.yaml               |   8 +-
 FaqGen/tests/test_faqgen_on_gaudi.sh          |  41 +++----
 FaqGen/tests/test_faqgen_on_xeon.sh           |  40 +++----
 SearchQnA/docker/docker_build_compose.yaml    |  48 ++++++++
 SearchQnA/docker/gaudi/compose.yaml           |  17 ++-
 SearchQnA/docker/xeon/compose.yaml            |  15 +--
 SearchQnA/tests/test_searchqna_on_gaudi.sh    |  57 +++------
 SearchQnA/tests/test_searchqna_on_xeon.sh     |  72 ++++++------
 Translation/docker/docker_build_compose.yaml  |  18 +++
 Translation/docker/gaudi/compose.yaml         |  23 +---
 Translation/docker/xeon/compose.yaml          |  23 +---
 .../tests/test_translation_on_gaudi.sh        |  40 +++----
 Translation/tests/test_translation_on_xeon.sh |  41 +++----
 VisualQnA/docker/gaudi/compose.yaml           |  11 +-
 VisualQnA/docker/xeon/compose.yaml            |  11 +-
 61 files changed, 987 insertions(+), 954 deletions(-)
 create mode 100644 AudioQnA/docker/docker_build_compose.yaml
 create mode 100644 ChatQnA/docker/docker_build_compose.yaml
 create mode 100644 CodeGen/docker/docker_build_compose.yaml
 create mode 100644 CodeTrans/docker/docker_build_compose.yaml
 create mode 100644 DocSum/docker/docker_build_compose.yaml
 create mode 100644 FaqGen/docker/docker_build_compose.yaml
 create mode 100644 SearchQnA/docker/docker_build_compose.yaml
 create mode 100644 Translation/docker/docker_build_compose.yaml

diff --git a/.github/workflows/_example-workflow.yml b/.github/workflows/_example-workflow.yml
index 48edbb65cd..c293a8b1ef 100644
--- a/.github/workflows/_example-workflow.yml
+++ b/.github/workflows/_example-workflow.yml
@@ -6,6 +6,9 @@ permissions: read-all
 on:
   workflow_call:
     inputs:
+      node:
+        required: true
+        type: string
       example:
         required: true
         type: string
@@ -37,30 +40,43 @@ on:
         default: "latest"
         required: false
         type: string
+      GenAIComps_branch:
+        default: "main"
+        required: false
+        type: string
 jobs:
 ####################################################################################################
 # Image Build
 ####################################################################################################
   build-images:
-    if: ${{ fromJSON(inputs.build) }}
-    strategy:
-      matrix:
-        node: ["docker-build-xeon", "docker-build-gaudi"]
-    runs-on: ${{ matrix.node }}
+    runs-on: "docker-build-${{ inputs.node }}"
     continue-on-error: true
     steps:
       - name: Clean Up Working Directory
-        run: |
-          sudo rm -rf ${{github.workspace}}/*
+        run: sudo rm -rf ${{github.workspace}}/*
 
       - name: Checkout out Repo
         uses: actions/checkout@v4
 
+      - name: Clone required Repo
+        run: |
+          cd ${{ github.workspace }}/${{ inputs.example }}/docker
+          build_compose_path=${{ github.workspace }}/${{ inputs.example }}/docker/docker_build_compose.yaml
+          if [[ $(grep -c "tei-gaudi:" ${docker_compose_path}) != 0 ]]; then
+              git clone https://github.com/huggingface/tei-gaudi.git
+          fi
+          if [[ $(grep -c "vllm:" ${docker_compose_path}) != 0 ]]; then
+              git clone https://github.com/huggingface/tei-gaudi.git
+          fi
+          git clone https://github.com/opea-project/GenAIComps.git
+          cd GenAIComps && checkout ${{ inputs.GenAIComps_branch }} && cd ../
+
       - name: Build Image
+        if: ${{ fromJSON(inputs.build) }}
         uses: opea-project/validation/actions/image-build@main
         with:
-          work_dir: ${{ github.workspace }}/${{ inputs.example }}
-          docker_compose_path: ${{ github.workspace }}/.github/workflows/docker/compose/${{ inputs.example }}-compose.yaml
+          work_dir: ${{ github.workspace }}/${{ inputs.example }}/docker
+          docker_compose_path: ${{ github.workspace }}/${{ inputs.example }}/docker/docker_build_compose.yaml
           registry: ${OPEA_IMAGE_REPO}opea
           tag: ${{ inputs.tag }}
 
@@ -68,17 +84,12 @@ jobs:
 # Trivy Scan
 ####################################################################################################
   image-list:
-    needs: [ build-images ]
-    if: ${{ fromJSON(inputs.scan) }}
+    needs: [build-images]
+    if: ${{ fromJSON(inputs.scan) && inputs.node == 'gaudi' }}
     runs-on: ubuntu-latest
     outputs:
       matrix: ${{ steps.scan-matrix.outputs.matrix }}
     steps:
-      - name: Harden Runner
-        uses: step-security/harden-runner@v2.8.1
-        with:
-          egress-policy: audit
-
       - name: Checkout out Repo
         uses: actions/checkout@v4
 
@@ -90,34 +101,32 @@ jobs:
           echo "matrix=$(cat ${compose_path} | yq -r '.[]' | jq 'keys' | jq -c '.')" >> $GITHUB_OUTPUT
 
   scan-images:
-    needs: [image-list]
-    if: ${{ fromJSON(inputs.scan) }}
-    runs-on: "docker-build-gaudi"
+    needs: [image-list, build-images]
+    if: ${{ fromJSON(inputs.scan) && inputs.node == 'gaudi'}}
+    runs-on: "docker-build-${{ inputs.node }}"
     strategy:
       matrix:
         image: ${{ fromJSON(needs.image-list.outputs.matrix) }}
       fail-fast: false
     steps:
-      - name: Harden Runner
-        uses: step-security/harden-runner@v2.8.1
-        with:
-          egress-policy: audit
-
       - name: Pull Image
-        run: docker pull ${OPEA_IMAGE_REPO}opea/${{ matrix.image }}:${{ inputs.tag }}
+        run: |
+          docker pull ${OPEA_IMAGE_REPO}opea/${{ matrix.image }}:${{ inputs.tag }}
+          echo "OPEA_IMAGE_REPO=${OPEA_IMAGE_REPO}" >> $GITHUB_ENV
 
       - name: Scan Container
         uses: opea-project/validation/actions/trivy-scan@main
         with:
-          image-ref: ${OPEA_IMAGE_REPO}opea/${{ matrix.image }}:${{ inputs.tag }}
+          image-ref: ${{ env.OPEA_IMAGE_REPO }}opea/${{ matrix.image }}:${{ inputs.tag }}
           output: ${{ inputs.example }}-${{ matrix.image }}-scan.txt
 
       - name: Cleanup
         if: always()
         run: docker rmi -f ${OPEA_IMAGE_REPO}opea/${{ matrix.image }}:${{ inputs.tag }}
+
       - uses: actions/upload-artifact@v4.3.4
         with:
-          name: ${{ inputs.example }}-scan
+          name: ${{ inputs.example }}-${{ matrix.image }}-scan
           path: ${{ inputs.example }}-${{ matrix.image }}-scan.txt
           overwrite: true
 
@@ -127,15 +136,11 @@ jobs:
   test-example-compose:
     needs: [build-images]
     if: ${{ fromJSON(inputs.test_compose) }}
-    strategy:
-      matrix:
-        hardware: ["xeon", "gaudi"]
-      fail-fast: false
     uses: ./.github/workflows/_run-docker-compose.yml
     with:
       tag: ${{ inputs.tag }}
       example: ${{ inputs.example }}
-      hardware: ${{ matrix.hardware }}
+      hardware: ${{ inputs.node }}
     secrets: inherit
 
 
@@ -145,14 +150,10 @@ jobs:
   test-k8s-manifest:
     needs: [build-images]
     if: ${{ fromJSON(inputs.test_k8s) }}
-    strategy:
-      matrix:
-        hardware: ["xeon", "gaudi"]
-      fail-fast: false
     uses: ./.github/workflows/_manifest-e2e.yml
     with:
       example: ${{ inputs.example }}
-      hardware: ${{ matrix.hardware }}
+      hardware: ${{ inputs.node }}
       tag: ${{ inputs.tag }}
     secrets: inherit
 
@@ -162,7 +163,7 @@ jobs:
 ####################################################################################################
   publish:
     needs: [image-list, build-images, scan-images, test-example-compose]
-    if: ${{ fromJSON(inputs.publish) }}
+    if: ${{ fromJSON(inputs.publish) && inputs.node == 'gaudi' }}
     strategy:
       matrix:
         image: ${{ fromJSON(needs.image-list.outputs.matrix) }}
diff --git a/.github/workflows/_run-docker-compose.yml b/.github/workflows/_run-docker-compose.yml
index 39b2b9d342..d7c778a089 100644
--- a/.github/workflows/_run-docker-compose.yml
+++ b/.github/workflows/_run-docker-compose.yml
@@ -72,6 +72,7 @@ jobs:
           sudo rm -rf ${{github.workspace}}/* || true
           docker system prune -f
           docker rmi $(docker images --filter reference="*/*/*:latest" -q) || true
+          docker rmi $(docker images --filter reference="*/*:ci" -q) || true
 
       - name: Checkout out Repo
         uses: actions/checkout@v4
@@ -93,7 +94,7 @@ jobs:
           test_case: ${{ matrix.test_case }}
         run: |
           cd ${{ github.workspace }}/$example/tests
-          export IMAGE_REPO=${OPEA_IMAGE_REPO}
+          if [[ "$IMAGE_REPO" == "" ]]; then export IMAGE_REPO="${OPEA_IMAGE_REPO}opea"; fi
           if [ -f ${test_case} ]; then timeout 30m bash ${test_case}; else echo "Test script {${test_case}} not found, skip test!"; fi
 
       - name: Clean up container
diff --git a/.github/workflows/manual-cd-workflow.yml b/.github/workflows/manual-cd-workflow.yml
index 52be4230f9..7159ba6321 100644
--- a/.github/workflows/manual-cd-workflow.yml
+++ b/.github/workflows/manual-cd-workflow.yml
@@ -5,9 +5,14 @@ name: Examples CD workflow on manual event
 on:
   workflow_dispatch:
     inputs:
+      nodes:
+        default: "gaudi,xeon"
+        description: "Hardware to run test"
+        required: true
+        type: string
       examples:
-        default: "AudioQnA,ChatQnA,CodeGen,CodeTrans,DocSum,FaqGen,SearchQnA,Translation"
-        description: 'List of examples to test'
+        default: "ChatQnA"
+        description: 'List of examples to test [AudioQnA,ChatQnA,CodeGen,CodeTrans,DocSum,FaqGen,SearchQnA,Translation]'
         required: true
         type: string
       tag:
@@ -41,33 +46,44 @@ on:
         required: false
         type: boolean
       publish_tags:
-        default: "latest,v0.9"
+        default: "latest,v1.0"
         description: 'Tag list apply to publish images'
         required: false
         type: string
+      GenAIComps_branch:
+        default: "main"
+        description: 'GenAIComps branch for image build'
+        required: false
+        type: string
 
 permissions: read-all
 jobs:
   get-test-matrix:
     runs-on: ubuntu-latest
     outputs:
-      matrix: ${{ steps.get-matrix.outputs.matrix }}
+      examples: ${{ steps.get-matrix.outputs.examples }}
+      nodes: ${{ steps.get-matrix.outputs.nodes }}
     steps:
     - name: Create Matrix
       id: get-matrix
       run: |
         examples=($(echo ${{ github.event.inputs.examples }} | tr ',' ' '))
         examples_json=$(printf '%s\n' "${examples[@]}" | sort -u | jq -R '.' | jq -sc '.')
-        echo "matrix=$examples_json" >> $GITHUB_OUTPUT
+        echo "examples=$examples_json" >> $GITHUB_OUTPUT
+        nodes=($(echo ${{ github.event.inputs.nodes }} | tr ',' ' '))
+        nodes_json=$(printf '%s\n' "${nodes[@]}" | sort -u | jq -R '.' | jq -sc '.')
+        echo "nodes=$nodes_json" >> $GITHUB_OUTPUT
 
   run-examples:
     needs: [get-test-matrix]
     strategy:
       matrix:
-        example: ${{ fromJson(needs.get-test-matrix.outputs.matrix) }}
+        example: ${{ fromJson(needs.get-test-matrix.outputs.examples) }}
+        node: ${{ fromJson(needs.get-test-matrix.outputs.nodes) }}
       fail-fast: false
     uses: ./.github/workflows/_example-workflow.yml
     with:
+      node: ${{ matrix.node }}
       example: ${{ matrix.example }}
       tag: ${{ inputs.tag }}
       build: ${{ fromJSON(inputs.build) }}
@@ -75,5 +91,6 @@ jobs:
       test_compose: ${{ fromJSON(inputs.test_compose) }}
       test_k8s: ${{ fromJSON(inputs.test_k8s) }}
       publish: ${{ fromJSON(inputs.publish) }}
-      publish_tags: ${{ fromJSON(inputs.publish_tags) }}
+      publish_tags: ${{ inputs.publish_tags }}
+      GenAIComps_branch: ${{ inputs.GenAIComps_branch }}
     secrets: inherit
diff --git a/.github/workflows/pr-docker-compose-e2e.yml b/.github/workflows/pr-docker-compose-e2e.yml
index 7706f4f111..e02c60fb83 100644
--- a/.github/workflows/pr-docker-compose-e2e.yml
+++ b/.github/workflows/pr-docker-compose-e2e.yml
@@ -4,7 +4,7 @@
 name: E2E test with docker compose
 
 on:
-  pull_request_target:
+  pull_request:
     branches: [main]
     types: [opened, reopened, ready_for_review, synchronize] # added `ready_for_review` since draft is skipped
     paths:
@@ -21,29 +21,20 @@ concurrency:
   cancel-in-progress: true
 
 jobs:
-  job1:
+  get-test-matrix:
     uses: ./.github/workflows/_get-test-matrix.yml
     with:
       diff_excluded_files: '.github|README.md|*.txt|deprecate|kubernetes|manifest|gmc|assets'
 
-  mega-image-build:
-    needs: job1
-    strategy:
-      matrix: ${{ fromJSON(needs.job1.outputs.run_matrix) }}
-    uses: ./.github/workflows/_image-build.yml
-    with:
-      image_tag: ${{ github.event.pull_request.head.sha }}
-      mega_service: "${{ matrix.example }}"
-      runner_label: "docker-build-${{ matrix.hardware }}"
-
   example-test:
-    needs: [job1, mega-image-build]
+    needs: [get-test-matrix]
     strategy:
-      matrix: ${{ fromJSON(needs.job1.outputs.run_matrix) }}
+      matrix: ${{ fromJSON(needs.get-test-matrix.outputs.run_matrix) }}
       fail-fast: false
     uses: ./.github/workflows/_run-docker-compose.yml
     with:
-      tag: ${{ needs.mega-image-build.outputs.image_tag }}
+      registry: "opea"
+      tag: "ci"
       example: ${{ matrix.example }}
       hardware: ${{ matrix.hardware }}
     secrets: inherit
diff --git a/AudioQnA/docker/docker_build_compose.yaml b/AudioQnA/docker/docker_build_compose.yaml
new file mode 100644
index 0000000000..e78d44af72
--- /dev/null
+++ b/AudioQnA/docker/docker_build_compose.yaml
@@ -0,0 +1,54 @@
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
+
+services:
+  audioqna:
+    build:
+      args:
+        http_proxy: ${http_proxy}
+        https_proxy: ${https_proxy}
+        no_proxy: ${no_proxy}
+      dockerfile: ./Dockerfile
+    image: ${REGISTRY:-opea}/audioqna:${TAG:-latest}
+  whisper-gaudi:
+    build:
+      context: GenAIComps
+      dockerfile: comps/asr/whisper/Dockerfile_hpu
+    extends: audioqna
+    image: ${REGISTRY:-opea}/whisper-gaudi:${TAG:-latest}
+  whisper:
+    build:
+      context: GenAIComps
+      dockerfile: comps/asr/whisper/Dockerfile
+    extends: audioqna
+    image: ${REGISTRY:-opea}/whisper:${TAG:-latest}
+  asr:
+    build:
+      context: GenAIComps
+      dockerfile: comps/asr/Dockerfile
+    extends: audioqna
+    image: ${REGISTRY:-opea}/asr:${TAG:-latest}
+  llm-tgi:
+    build:
+      context: GenAIComps
+      dockerfile: comps/llms/text-generation/tgi/Dockerfile
+    extends: audioqna
+    image: ${REGISTRY:-opea}/llm-tgi:${TAG:-latest}
+  speecht5-gaudi:
+    build:
+      context: GenAIComps
+      dockerfile: comps/tts/speecht5/Dockerfile_hpu
+    extends: audioqna
+    image: ${REGISTRY:-opea}/speecht5-gaudi:${TAG:-latest}
+  speecht5:
+    build:
+      context: GenAIComps
+      dockerfile: comps/tts/speecht5/Dockerfile
+    extends: audioqna
+    image: ${REGISTRY:-opea}/speecht5:${TAG:-latest}
+  tts:
+    build:
+      context: GenAIComps
+      dockerfile: comps/tts/Dockerfile
+    extends: audioqna
+    image: ${REGISTRY:-opea}/tts:${TAG:-latest}
diff --git a/AudioQnA/docker/gaudi/compose.yaml b/AudioQnA/docker/gaudi/compose.yaml
index 5d8b34a6bf..c781bcb144 100644
--- a/AudioQnA/docker/gaudi/compose.yaml
+++ b/AudioQnA/docker/gaudi/compose.yaml
@@ -1,12 +1,9 @@
-
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-version: "3.8"
-
 services:
   whisper-service:
-    image: opea/whisper-gaudi:latest
+    image: ${REGISTRY:-opea}/whisper-gaudi:${TAG:-latest}
     container_name: whisper-service
     ports:
       - "7066:7066"
@@ -22,7 +19,7 @@ services:
       - SYS_NICE
     restart: unless-stopped
   asr:
-    image: opea/asr:latest
+    image: ${REGISTRY:-opea}/asr:${TAG:-latest}
     container_name: asr-service
     ports:
       - "3001:9099"
@@ -30,7 +27,7 @@ services:
     environment:
       ASR_ENDPOINT: ${ASR_ENDPOINT}
   speecht5-service:
-    image: opea/speecht5-gaudi:latest
+    image: ${REGISTRY:-opea}/speecht5-gaudi:${TAG:-latest}
     container_name: speecht5-service
     ports:
       - "7055:7055"
@@ -46,7 +43,7 @@ services:
       - SYS_NICE
     restart: unless-stopped
   tts:
-    image: opea/tts:latest
+    image: ${REGISTRY:-opea}/tts:${TAG:-latest}
     container_name: tts-service
     ports:
       - "3002:9088"
@@ -75,7 +72,7 @@ services:
     ipc: host
     command: --model-id ${LLM_MODEL_ID} --max-input-length 1024 --max-total-tokens 2048
   llm:
-    image: opea/llm-tgi:latest
+    image: ${REGISTRY:-opea}/llm-tgi:${TAG:-latest}
     container_name: llm-tgi-gaudi-server
     depends_on:
       - tgi-service
@@ -90,7 +87,7 @@ services:
       HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
     restart: unless-stopped
   audioqna-gaudi-backend-server:
-    image: opea/audioqna:latest
+    image: ${REGISTRY:-opea}/audioqna:${TAG:-latest}
     container_name: audioqna-gaudi-backend-server
     depends_on:
       - asr
diff --git a/AudioQnA/docker/xeon/compose.yaml b/AudioQnA/docker/xeon/compose.yaml
index b8966c7192..7c111176de 100644
--- a/AudioQnA/docker/xeon/compose.yaml
+++ b/AudioQnA/docker/xeon/compose.yaml
@@ -1,12 +1,9 @@
-
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-version: "3.8"
-
 services:
   whisper-service:
-    image: opea/whisper:latest
+    image: ${REGISTRY:-opea}/whisper:${TAG:-latest}
     container_name: whisper-service
     ports:
       - "7066:7066"
@@ -17,7 +14,7 @@ services:
       https_proxy: ${https_proxy}
     restart: unless-stopped
   asr:
-    image: opea/asr:latest
+    image: ${REGISTRY:-opea}/asr:${TAG:-latest}
     container_name: asr-service
     ports:
       - "3001:9099"
@@ -25,7 +22,7 @@ services:
     environment:
       ASR_ENDPOINT: ${ASR_ENDPOINT}
   speecht5-service:
-    image: opea/speecht5:latest
+    image: ${REGISTRY:-opea}/speecht5:${TAG:-latest}
     container_name: speecht5-service
     ports:
       - "7055:7055"
@@ -36,7 +33,7 @@ services:
       https_proxy: ${https_proxy}
     restart: unless-stopped
   tts:
-    image: opea/tts:latest
+    image: ${REGISTRY:-opea}/tts:${TAG:-latest}
     container_name: tts-service
     ports:
       - "3002:9088"
@@ -58,7 +55,7 @@ services:
       HF_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
     command: --model-id ${LLM_MODEL_ID}
   llm:
-    image: opea/llm-tgi:latest
+    image: ${REGISTRY:-opea}/llm-tgi:${TAG:-latest}
     container_name: llm-tgi-server
     depends_on:
       - tgi-service
@@ -73,7 +70,7 @@ services:
       HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
     restart: unless-stopped
   audioqna-xeon-backend-server:
-    image: opea/audioqna:latest
+    image: ${REGISTRY:-opea}/audioqna:${TAG:-latest}
     container_name: audioqna-xeon-backend-server
     depends_on:
       - asr
diff --git a/AudioQnA/tests/test_audioqna_on_gaudi.sh b/AudioQnA/tests/test_audioqna_on_gaudi.sh
index 7493f8f8ae..5feb6eec59 100644
--- a/AudioQnA/tests/test_audioqna_on_gaudi.sh
+++ b/AudioQnA/tests/test_audioqna_on_gaudi.sh
@@ -3,34 +3,26 @@
 # SPDX-License-Identifier: Apache-2.0
 
 set -e
-echo "IMAGE_REPO=${IMAGE_REPO}"
+IMAGE_REPO=${IMAGE_REPO:-"opea"}
+IMAGE_TAG=${IMAGE_TAG:-"latest"}
+echo "REGISTRY=IMAGE_REPO=${IMAGE_REPO}"
+echo "TAG=IMAGE_TAG=${IMAGE_TAG}"
+export REGISTRY=${IMAGE_REPO}
+export TAG=${IMAGE_TAG}
 
 WORKPATH=$(dirname "$PWD")
 LOG_PATH="$WORKPATH/tests"
 ip_address=$(hostname -I | awk '{print $1}')
 
 function build_docker_images() {
-    cd $WORKPATH
+    cd $WORKPATH/docker
     git clone https://github.com/opea-project/GenAIComps.git
-    cd GenAIComps
-
-    docker build -t opea/whisper-gaudi:latest  -f comps/asr/whisper/Dockerfile_hpu .
 
-    docker build -t opea/asr:latest  -f comps/asr/Dockerfile .
-    docker build -t opea/llm-tgi:latest -f comps/llms/text-generation/tgi/Dockerfile .
-    docker build -t opea/speecht5-gaudi:latest  -f comps/tts/speecht5/Dockerfile_hpu .
-    docker build -t opea/tts:latest  -f comps/tts/Dockerfile .
+    echo "Build all the images with --no-cache, check docker_image_build.log for details..."
+    service_list="audioqna whisper-gaudi asr llm-tgi speecht5-gaudi tts"
+    docker compose -f docker_build_compose.yaml build ${service_list} --no-cache > ${LOG_PATH}/docker_image_build.log
 
     docker pull ghcr.io/huggingface/tgi-gaudi:2.0.1
-
-    cd ..
-
-    cd $WORKPATH/docker
-    docker build --no-cache -t opea/audioqna:latest -f Dockerfile .
-
-    # cd $WORKPATH/docker/ui
-    # docker build --no-cache -t opea/audioqna-ui:latest -f docker/Dockerfile .
-
     docker images
 }
 
@@ -55,16 +47,6 @@ function start_services() {
 
     # sed -i "s/backend_address/$ip_address/g" $WORKPATH/docker/ui/svelte/.env
 
-    if [[ "$IMAGE_REPO" != "" ]]; then
-        # Replace the container name with a test-specific name
-        echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
-        sed -i "s#image: opea/audioqna:latest#image: opea/audioqna:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/audioqna-ui:latest#image: opea/audioqna-ui:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose.yaml
-        echo "cat compose.yaml"
-        cat compose.yaml
-    fi
-
     # Start Docker Containers
     docker compose up -d
     n=0
@@ -76,6 +58,16 @@ function start_services() {
        sleep 1s
        n=$((n+1))
     done
+
+    n=0
+    until [[ "$n" -ge 200 ]]; do
+       docker logs whisper-service > $LOG_PATH/whisper_service_start.log
+       if grep -q "Uvicorn server setup on port" $LOG_PATH/whisper_service_start.log; then
+           break
+       fi
+       sleep 1s
+       n=$((n+1))
+    done
 }
 
 
@@ -131,7 +123,7 @@ function stop_docker() {
 function main() {
 
     stop_docker
-    if [[ "$IMAGE_REPO" == "" ]]; then build_docker_images; fi
+    if [[ "$IMAGE_REPO" == "opea" ]]; then build_docker_images; fi
     start_services
 
     # validate_microservices
diff --git a/AudioQnA/tests/test_audioqna_on_xeon.sh b/AudioQnA/tests/test_audioqna_on_xeon.sh
index bb63402103..020a86999e 100644
--- a/AudioQnA/tests/test_audioqna_on_xeon.sh
+++ b/AudioQnA/tests/test_audioqna_on_xeon.sh
@@ -3,31 +3,26 @@
 # SPDX-License-Identifier: Apache-2.0
 
 set -e
-echo "IMAGE_REPO=${IMAGE_REPO}"
+IMAGE_REPO=${IMAGE_REPO:-"opea"}
+IMAGE_TAG=${IMAGE_TAG:-"latest"}
+echo "REGISTRY=IMAGE_REPO=${IMAGE_REPO}"
+echo "TAG=IMAGE_TAG=${IMAGE_TAG}"
+export REGISTRY=${IMAGE_REPO}
+export TAG=${IMAGE_TAG}
 
 WORKPATH=$(dirname "$PWD")
 LOG_PATH="$WORKPATH/tests"
 ip_address=$(hostname -I | awk '{print $1}')
 
 function build_docker_images() {
-    cd $WORKPATH
+    cd $WORKPATH/docker
     git clone https://github.com/opea-project/GenAIComps.git
-    cd GenAIComps
 
-    docker build -t opea/whisper:latest -f comps/asr/whisper/Dockerfile .
-    docker build -t opea/asr:latest -f comps/asr/Dockerfile .
-    docker build -t opea/llm-tgi:latest -f comps/llms/text-generation/tgi/Dockerfile .
-    docker build -t opea/speecht5:latest -f comps/tts/speecht5/Dockerfile .
-    docker build -t opea/tts:latest -f comps/tts/Dockerfile .
+    echo "Build all the images with --no-cache, check docker_image_build.log for details..."
+    service_list="audioqna whisper asr llm-tgi speecht5 tts"
+    docker compose -f docker_build_compose.yaml build ${service_list} --no-cache > ${LOG_PATH}/docker_image_build.log
 
     docker pull ghcr.io/huggingface/tgi-gaudi:2.0.1
-
-    cd $WORKPATH/docker
-    docker build --no-cache -t opea/audioqna:latest -f Dockerfile .
-
-    # cd $WORKPATH/docker/ui
-    # docker build --no-cache -t opea/audioqna-ui:latest -f docker/Dockerfile .
-
     docker images
 }
 
@@ -51,16 +46,6 @@ function start_services() {
 
     # sed -i "s/backend_address/$ip_address/g" $WORKPATH/docker/ui/svelte/.env
 
-    if [[ "$IMAGE_REPO" != "" ]]; then
-        # Replace the container name with a test-specific name
-        echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
-        sed -i "s#image: opea/audioqna:latest#image: opea/audioqna:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/audioqna-ui:latest#image: opea/audioqna-ui:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose.yaml
-        echo "cat compose.yaml"
-        cat compose.yaml
-    fi
-
     # Start Docker Containers
     docker compose up -d
     n=0
@@ -128,7 +113,7 @@ function stop_docker() {
 function main() {
 
     stop_docker
-    if [[ "$IMAGE_REPO" == "" ]]; then build_docker_images; fi
+    if [[ "$IMAGE_REPO" == "opea" ]]; then build_docker_images; fi
     start_services
 
     validate_megaservice
diff --git a/ChatQnA/docker/aipc/compose.yaml b/ChatQnA/docker/aipc/compose.yaml
index ec0970f645..fedbe12a8d 100644
--- a/ChatQnA/docker/aipc/compose.yaml
+++ b/ChatQnA/docker/aipc/compose.yaml
@@ -1,8 +1,6 @@
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-version: "3.8"
-
 services:
   redis-vector-db:
     image: redis/redis-stack:7.2.0-v9
@@ -11,7 +9,7 @@ services:
       - "6379:6379"
       - "8001:8001"
   dataprep-redis-service:
-    image: opea/dataprep-redis:latest
+    image: ${REGISTRY:-opea}/dataprep-redis:${TAG:-latest}
     container_name: dataprep-redis-server
     depends_on:
       - redis-vector-db
@@ -39,7 +37,7 @@ services:
       https_proxy: ${https_proxy}
     command: --model-id ${EMBEDDING_MODEL_ID} --auto-truncate
   embedding:
-    image: opea/embedding-tei:latest
+    image: ${REGISTRY:-opea}/embedding-tei:${TAG:-latest}
     container_name: embedding-tei-server
     depends_on:
       - tei-embedding-service
@@ -53,7 +51,7 @@ services:
       TEI_EMBEDDING_ENDPOINT: ${TEI_EMBEDDING_ENDPOINT}
     restart: unless-stopped
   retriever:
-    image: opea/retriever-redis:latest
+    image: ${REGISTRY:-opea}/retriever-redis:${TAG:-latest}
     container_name: retriever-redis-server
     depends_on:
       - redis-vector-db
@@ -85,7 +83,7 @@ services:
       HF_HUB_ENABLE_HF_TRANSFER: 0
     command: --model-id ${RERANK_MODEL_ID} --auto-truncate
   reranking:
-    image: opea/reranking-tei:latest
+    image: ${REGISTRY:-opea}/reranking-tei:${TAG:-latest}
     container_name: reranking-tei-aipc-server
     depends_on:
       - tei-reranking-service
@@ -102,7 +100,7 @@ services:
       HF_HUB_ENABLE_HF_TRANSFER: 0
     restart: unless-stopped
   llm:
-    image: opea/llm-ollama
+    image: ${REGISTRY:-opea}/llm-ollama
     container_name: llm-ollama
     ports:
       - "9000:9000"
@@ -118,7 +116,7 @@ services:
       OLLAMA_ENDPOINT: ${OLLAMA_ENDPOINT}
       OLLAMA_MODEL: ${OLLAMA_MODEL}
   chaqna-aipc-backend-server:
-    image: opea/chatqna:latest
+    image: ${REGISTRY:-opea}/chatqna:${TAG:-latest}
     container_name: chatqna-aipc-backend-server
     depends_on:
       - redis-vector-db
@@ -142,7 +140,7 @@ services:
     ipc: host
     restart: always
   chaqna-aipc-ui-server:
-    image: opea/chatqna-ui:latest
+    image: ${REGISTRY:-opea}/chatqna-ui:${TAG:-latest}
     container_name: chatqna-aipc-ui-server
     depends_on:
       - chaqna-aipc-backend-server
diff --git a/ChatQnA/docker/docker_build_compose.yaml b/ChatQnA/docker/docker_build_compose.yaml
new file mode 100644
index 0000000000..b55327ac5b
--- /dev/null
+++ b/ChatQnA/docker/docker_build_compose.yaml
@@ -0,0 +1,108 @@
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
+
+services:
+  chatqna:
+    build:
+      args:
+        http_proxy: ${http_proxy}
+        https_proxy: ${https_proxy}
+        no_proxy: ${no_proxy}
+      dockerfile: ./Dockerfile
+    image: ${REGISTRY:-opea}/chatqna:${TAG:-latest}
+  chatqna-ui:
+    build:
+      context: ui
+      dockerfile: ./docker/Dockerfile
+    extends: chatqna
+    image: ${REGISTRY:-opea}/chatqna-ui:${TAG:-latest}
+  chatqna-conversation-ui:
+    build:
+      context: ui
+      dockerfile: ./docker/Dockerfile.react
+    extends: chatqna
+    image: ${REGISTRY:-opea}/chatqna-conversation-ui:${TAG:-latest}
+  embedding-tei:
+    build:
+      context: GenAIComps
+      dockerfile: comps/embeddings/langchain/docker/Dockerfile
+    extends: chatqna
+    image: ${REGISTRY:-opea}/embedding-tei:${TAG:-latest}
+  retriever-redis:
+    build:
+      context: GenAIComps
+      dockerfile: comps/retrievers/langchain/redis/docker/Dockerfile
+    extends: chatqna
+    image: ${REGISTRY:-opea}/retriever-redis:${TAG:-latest}
+  retriever-qdrant:
+    build:
+      context: GenAIComps
+      dockerfile: comps/retrievers/haystack/qdrant/docker/Dockerfile
+    extends: chatqna
+    image: ${REGISTRY:-opea}/retriever-qdrant:${TAG:-latest}
+  reranking-tei:
+    build:
+      context: GenAIComps
+      dockerfile: comps/reranks/tei/docker/Dockerfile
+    extends: chatqna
+    image: ${REGISTRY:-opea}/reranking-tei:${TAG:-latest}
+  llm-tgi:
+    build:
+      context: GenAIComps
+      dockerfile: comps/llms/text-generation/tgi/Dockerfile
+    extends: chatqna
+    image: ${REGISTRY:-opea}/llm-tgi:${TAG:-latest}
+  llm-ollama:
+    build:
+      context: GenAIComps
+      dockerfile: comps/llms/text-generation/ollama/Dockerfile
+    extends: chatqna
+    image: ${REGISTRY:-opea}/llm-ollama:${TAG:-latest}
+  llm-vllm:
+    build:
+      context: GenAIComps
+      dockerfile: comps/llms/text-generation/vllm/docker/Dockerfile.microservice
+    extends: chatqna
+    image: ${REGISTRY:-opea}/llm-vllm:${TAG:-latest}
+  llm-vllm-hpu:
+    build:
+      context: GenAIComps
+      dockerfile: comps/llms/text-generation/vllm/docker/Dockerfile.hpu
+    extends: chatqna
+    image: ${REGISTRY:-opea}/llm-vllm-hpu:${TAG:-latest}
+  llm-vllm-ray:
+    build:
+      context: GenAIComps
+      dockerfile: comps/llms/text-generation/vllm-ray/docker/Dockerfile.microservice
+    extends: chatqna
+    image: ${REGISTRY:-opea}/llm-vllm-ray:${TAG:-latest}
+  llm-vllm-ray-hpu:
+    build:
+      context: GenAIComps
+      dockerfile: comps/llms/text-generation/vllm-ray/docker/Dockerfile.vllmray
+    extends: chatqna
+    image: ${REGISTRY:-opea}/llm-vllm-ray-hpu:${TAG:-latest}
+  dataprep-redis:
+    build:
+      context: GenAIComps
+      dockerfile: comps/dataprep/redis/langchain/docker/Dockerfile
+    extends: chatqna
+    image: ${REGISTRY:-opea}/dataprep-redis:${TAG:-latest}
+  dataprep-qdrant:
+    build:
+      context: GenAIComps
+      dockerfile: comps/dataprep/qdrant/docker/Dockerfile
+    extends: chatqna
+    image: ${REGISTRY:-opea}/dataprep-qdrant:${TAG:-latest}
+  tei-gaudi:
+    build:
+      context: tei-gaudi
+      dockerfile: Dockerfile-hpu
+    extends: chatqna
+    image: ${REGISTRY:-opea}/tei-gaudi:${TAG:-latest}
+  vllm:
+    build:
+      context: vllm
+      dockerfile: Dockerfile.cpu
+    extends: chatqna
+    image: ${REGISTRY:-opea}/vllm:${TAG:-latest}
diff --git a/ChatQnA/docker/gaudi/compose.yaml b/ChatQnA/docker/gaudi/compose.yaml
index 82b8d0b77d..e5327b6234 100644
--- a/ChatQnA/docker/gaudi/compose.yaml
+++ b/ChatQnA/docker/gaudi/compose.yaml
@@ -1,9 +1,6 @@
-
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-version: "3.8"
-
 services:
   redis-vector-db:
     image: redis/redis-stack:7.2.0-v9
@@ -12,7 +9,7 @@ services:
       - "6379:6379"
       - "8001:8001"
   dataprep-redis-service:
-    image: opea/dataprep-redis:latest
+    image: ${REGISTRY:-opea}/dataprep-redis:${TAG:-latest}
     container_name: dataprep-redis-server
     depends_on:
       - redis-vector-db
@@ -28,7 +25,7 @@ services:
       TEI_ENDPOINT: ${TEI_EMBEDDING_ENDPOINT}
       HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
   tei-embedding-service:
-    image: opea/tei-gaudi:latest
+    image: ${REGISTRY:-opea}/tei-gaudi:${TAG:-latest}
     container_name: tei-embedding-gaudi-server
     ports:
       - "8090:80"
@@ -49,7 +46,7 @@ services:
       ENABLE_EXPERIMENTAL_FLAGS: true
     command: --model-id ${EMBEDDING_MODEL_ID} --auto-truncate
   embedding:
-    image: opea/embedding-tei:latest
+    image: ${REGISTRY:-opea}/embedding-tei:${TAG:-latest}
     container_name: embedding-tei-server
     depends_on:
       - tei-embedding-service
@@ -63,7 +60,7 @@ services:
       TEI_EMBEDDING_ENDPOINT: ${TEI_EMBEDDING_ENDPOINT}
     restart: unless-stopped
   retriever:
-    image: opea/retriever-redis:latest
+    image: ${REGISTRY:-opea}/retriever-redis:${TAG:-latest}
     container_name: retriever-redis-server
     depends_on:
       - redis-vector-db
@@ -94,7 +91,7 @@ services:
       HF_HUB_ENABLE_HF_TRANSFER: 0
     command: --model-id ${RERANK_MODEL_ID} --auto-truncate
   reranking:
-    image: opea/reranking-tei:latest
+    image: ${REGISTRY:-opea}/reranking-tei:${TAG:-latest}
     container_name: reranking-tei-gaudi-server
     depends_on:
       - tei-reranking-service
@@ -132,7 +129,7 @@ services:
     ipc: host
     command: --model-id ${LLM_MODEL_ID} --max-input-length 1024 --max-total-tokens 2048
   llm:
-    image: opea/llm-tgi:latest
+    image: ${REGISTRY:-opea}/llm-tgi:${TAG:-latest}
     container_name: llm-tgi-gaudi-server
     depends_on:
       - tgi-service
@@ -149,7 +146,7 @@ services:
       HF_HUB_ENABLE_HF_TRANSFER: 0
     restart: unless-stopped
   chaqna-gaudi-backend-server:
-    image: opea/chatqna:latest
+    image: ${REGISTRY:-opea}/chatqna:${TAG:-latest}
     container_name: chatqna-gaudi-backend-server
     depends_on:
       - redis-vector-db
@@ -174,7 +171,7 @@ services:
     ipc: host
     restart: always
   chaqna-gaudi-ui-server:
-    image: opea/chatqna-ui:latest
+    image: ${REGISTRY:-opea}/chatqna-ui:${TAG:-latest}
     container_name: chatqna-gaudi-ui-server
     depends_on:
       - chaqna-gaudi-backend-server
diff --git a/ChatQnA/docker/gaudi/compose_guardrails.yaml b/ChatQnA/docker/gaudi/compose_guardrails.yaml
index 0454bb161d..5680155bd9 100644
--- a/ChatQnA/docker/gaudi/compose_guardrails.yaml
+++ b/ChatQnA/docker/gaudi/compose_guardrails.yaml
@@ -1,9 +1,6 @@
-
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-version: "3.8"
-
 services:
   redis-vector-db:
     image: redis/redis-stack:7.2.0-v9
@@ -12,7 +9,7 @@ services:
       - "6379:6379"
       - "8001:8001"
   dataprep-redis-service:
-    image: opea/dataprep-redis:latest
+    image: ${REGISTRY:-opea}/dataprep-redis:${TAG:-latest}
     container_name: dataprep-redis-server
     depends_on:
       - redis-vector-db
@@ -49,7 +46,7 @@ services:
     ipc: host
     command: --model-id ${GURADRAILS_MODEL_ID} --max-input-length 1024 --max-total-tokens 2048
   guardrails:
-    image: opea/guardrails-tgi:latest
+    image: ${REGISTRY:-opea}/guardrails-tgi:${TAG:-latest}
     container_name: guardrails-tgi-gaudi-server
     ports:
       - "9090:9090"
@@ -63,7 +60,7 @@ services:
       HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
     restart: unless-stopped
   tei-embedding-service:
-    image: opea/tei-gaudi:latest
+    image: ${REGISTRY:-opea}/tei-gaudi:${TAG:-latest}
     container_name: tei-embedding-gaudi-server
     ports:
       - "8090:80"
@@ -82,7 +79,7 @@ services:
       MAX_WARMUP_SEQUENCE_LENGTH: 512
     command: --model-id ${EMBEDDING_MODEL_ID} --auto-truncate
   embedding:
-    image: opea/embedding-tei:latest
+    image: ${REGISTRY:-opea}/embedding-tei:${TAG:-latest}
     container_name: embedding-tei-server
     depends_on:
       - tei-embedding-service
@@ -96,7 +93,7 @@ services:
       TEI_EMBEDDING_ENDPOINT: ${TEI_EMBEDDING_ENDPOINT}
     restart: unless-stopped
   retriever:
-    image: opea/retriever-redis:latest
+    image: ${REGISTRY:-opea}/retriever-redis:${TAG:-latest}
     container_name: retriever-redis-server
     depends_on:
       - redis-vector-db
@@ -127,7 +124,7 @@ services:
       HF_HUB_ENABLE_HF_TRANSFER: 0
     command: --model-id ${RERANK_MODEL_ID} --auto-truncate
   reranking:
-    image: opea/reranking-tei:latest
+    image: ${REGISTRY:-opea}/reranking-tei:${TAG:-latest}
     container_name: reranking-tei-gaudi-server
     depends_on:
       - tei-reranking-service
@@ -165,7 +162,7 @@ services:
     ipc: host
     command: --model-id ${LLM_MODEL_ID} --max-input-length 1024 --max-total-tokens 2048
   llm:
-    image: opea/llm-tgi:latest
+    image: ${REGISTRY:-opea}/llm-tgi:${TAG:-latest}
     container_name: llm-tgi-gaudi-server
     depends_on:
       - tgi-service
@@ -182,7 +179,7 @@ services:
       HF_HUB_ENABLE_HF_TRANSFER: 0
     restart: unless-stopped
   chaqna-gaudi-backend-server:
-    image: opea/chatqna-guardrails:latest
+    image: ${REGISTRY:-opea}/chatqna-guardrails:${TAG:-latest}
     container_name: chatqna-gaudi-guardrails-server
     depends_on:
       - redis-vector-db
@@ -210,7 +207,7 @@ services:
     ipc: host
     restart: always
   chaqna-gaudi-ui-server:
-    image: opea/chatqna-ui:latest
+    image: ${REGISTRY:-opea}/chatqna-ui:${TAG:-latest}
     container_name: chatqna-gaudi-ui-server
     depends_on:
       - chaqna-gaudi-backend-server
diff --git a/ChatQnA/docker/gaudi/compose_vllm.yaml b/ChatQnA/docker/gaudi/compose_vllm.yaml
index ec82c9f22e..5548b33557 100644
--- a/ChatQnA/docker/gaudi/compose_vllm.yaml
+++ b/ChatQnA/docker/gaudi/compose_vllm.yaml
@@ -1,9 +1,6 @@
-
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-version: "3.8"
-
 services:
   redis-vector-db:
     image: redis/redis-stack:7.2.0-v9
@@ -12,7 +9,7 @@ services:
       - "6379:6379"
       - "8001:8001"
   dataprep-redis-service:
-    image: opea/dataprep-redis:latest
+    image: ${REGISTRY:-opea}/dataprep-redis:${TAG:-latest}
     container_name: dataprep-redis-server
     depends_on:
       - redis-vector-db
@@ -28,7 +25,7 @@ services:
       TEI_ENDPOINT: ${TEI_EMBEDDING_ENDPOINT}
       HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
   tei-embedding-service:
-    image: opea/tei-gaudi:latest
+    image: ${REGISTRY:-opea}/tei-gaudi:${TAG:-latest}
     container_name: tei-embedding-gaudi-server
     ports:
       - "8090:80"
@@ -47,7 +44,7 @@ services:
       MAX_WARMUP_SEQUENCE_LENGTH: 512
     command: --model-id ${EMBEDDING_MODEL_ID}
   embedding:
-    image: opea/embedding-tei:latest
+    image: ${REGISTRY:-opea}/embedding-tei:${TAG:-latest}
     container_name: embedding-tei-server
     depends_on:
       - tei-embedding-service
@@ -61,7 +58,7 @@ services:
       TEI_EMBEDDING_ENDPOINT: ${TEI_EMBEDDING_ENDPOINT}
     restart: unless-stopped
   retriever:
-    image: opea/retriever-redis:latest
+    image: ${REGISTRY:-opea}/retriever-redis:${TAG:-latest}
     container_name: retriever-redis-server
     depends_on:
       - redis-vector-db
@@ -92,7 +89,7 @@ services:
       HF_HUB_ENABLE_HF_TRANSFER: 0
     command: --model-id ${RERANK_MODEL_ID} --auto-truncate
   reranking:
-    image: opea/reranking-tei:latest
+    image: ${REGISTRY:-opea}/reranking-tei:${TAG:-latest}
     container_name: reranking-tei-gaudi-server
     depends_on:
       - tei-reranking-service
@@ -109,7 +106,7 @@ services:
       HF_HUB_ENABLE_HF_TRANSFER: 0
     restart: unless-stopped
   vllm-service:
-    image: opea/llm-vllm-hpu:latest
+    image: ${REGISTRY:-opea}/llm-vllm-hpu:${TAG:-latest}
     container_name: vllm-gaudi-server
     ports:
       - "8007:80"
@@ -129,7 +126,7 @@ services:
     ipc: host
     command: /bin/bash -c "export VLLM_CPU_KVCACHE_SPACE=40 && python3 -m vllm.entrypoints.openai.api_server --enforce-eager --model $LLM_MODEL_ID --tensor-parallel-size 1 --host 0.0.0.0 --port 80 --block-size 128 --max-num-seqs 256 --max-seq_len-to-capture 2048"
   llm:
-    image: opea/llm-vllm:latest
+    image: ${REGISTRY:-opea}/llm-vllm:${TAG:-latest}
     container_name: llm-vllm-gaudi-server
     depends_on:
       - vllm-service
@@ -145,7 +142,7 @@ services:
       LLM_MODEL: ${LLM_MODEL_ID}
     restart: unless-stopped
   chaqna-gaudi-backend-server:
-    image: opea/chatqna:latest
+    image: ${REGISTRY:-opea}/chatqna:${TAG:-latest}
     container_name: chatqna-gaudi-backend-server
     depends_on:
       - redis-vector-db
@@ -171,7 +168,7 @@ services:
     ipc: host
     restart: always
   chaqna-gaudi-ui-server:
-    image: opea/chatqna-ui:latest
+    image: ${REGISTRY:-opea}/chatqna-ui:${TAG:-latest}
     container_name: chatqna-gaudi-ui-server
     depends_on:
       - chaqna-gaudi-backend-server
diff --git a/ChatQnA/docker/gaudi/compose_vllm_ray.yaml b/ChatQnA/docker/gaudi/compose_vllm_ray.yaml
index 5d98a16004..a0a00ea15a 100644
--- a/ChatQnA/docker/gaudi/compose_vllm_ray.yaml
+++ b/ChatQnA/docker/gaudi/compose_vllm_ray.yaml
@@ -1,9 +1,6 @@
-
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-version: "3.8"
-
 services:
   redis-vector-db:
     image: redis/redis-stack:7.2.0-v9
@@ -12,7 +9,7 @@ services:
       - "6379:6379"
       - "8001:8001"
   dataprep-redis-service:
-    image: opea/dataprep-redis:latest
+    image: ${REGISTRY:-opea}/dataprep-redis:${TAG:-latest}
     container_name: dataprep-redis-server
     depends_on:
       - redis-vector-db
@@ -28,7 +25,7 @@ services:
       TEI_ENDPOINT: ${TEI_EMBEDDING_ENDPOINT}
       HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
   tei-embedding-service:
-    image: opea/tei-gaudi:latest
+    image: ${REGISTRY:-opea}/tei-gaudi:${TAG:-latest}
     container_name: tei-embedding-gaudi-server
     ports:
       - "8090:80"
@@ -47,7 +44,7 @@ services:
       MAX_WARMUP_SEQUENCE_LENGTH: 512
     command: --model-id ${EMBEDDING_MODEL_ID}
   embedding:
-    image: opea/embedding-tei:latest
+    image: ${REGISTRY:-opea}/embedding-tei:${TAG:-latest}
     container_name: embedding-tei-server
     depends_on:
       - tei-embedding-service
@@ -61,7 +58,7 @@ services:
       TEI_EMBEDDING_ENDPOINT: ${TEI_EMBEDDING_ENDPOINT}
     restart: unless-stopped
   retriever:
-    image: opea/retriever-redis:latest
+    image: ${REGISTRY:-opea}/retriever-redis:${TAG:-latest}
     container_name: retriever-redis-server
     depends_on:
       - redis-vector-db
@@ -92,7 +89,7 @@ services:
       HF_HUB_ENABLE_HF_TRANSFER: 0
     command: --model-id ${RERANK_MODEL_ID} --auto-truncate
   reranking:
-    image: opea/reranking-tei:latest
+    image: ${REGISTRY:-opea}/reranking-tei:${TAG:-latest}
     container_name: reranking-tei-gaudi-server
     depends_on:
       - tei-reranking-service
@@ -109,7 +106,7 @@ services:
       HF_HUB_ENABLE_HF_TRANSFER: 0
     restart: unless-stopped
   vllm-ray-service:
-    image: opea/llm-vllm-ray-hpu:latest
+    image: ${REGISTRY:-opea}/llm-vllm-ray-hpu:${TAG:-latest}
     container_name: vllm-ray-gaudi-server
     ports:
       - "8006:8000"
@@ -129,7 +126,7 @@ services:
     ipc: host
     command: /bin/bash -c "ray start --head && python vllm_ray_openai.py --port_number 8000 --model_id_or_path $LLM_MODEL_ID --tensor_parallel_size 2 --enforce_eager True"
   llm:
-    image: opea/llm-vllm-ray:latest
+    image: ${REGISTRY:-opea}/llm-vllm-ray:${TAG:-latest}
     container_name: llm-vllm-ray-gaudi-server
     depends_on:
       - vllm-ray-service
@@ -145,7 +142,7 @@ services:
       LLM_MODEL: ${LLM_MODEL_ID}
     restart: unless-stopped
   chaqna-gaudi-backend-server:
-    image: opea/chatqna:latest
+    image: ${REGISTRY:-opea}/chatqna:${TAG:-latest}
     container_name: chatqna-gaudi-backend-server
     depends_on:
       - redis-vector-db
@@ -171,7 +168,7 @@ services:
     ipc: host
     restart: always
   chaqna-gaudi-ui-server:
-    image: opea/chatqna-ui:latest
+    image: ${REGISTRY:-opea}/chatqna-ui:${TAG:-latest}
     container_name: chatqna-gaudi-ui-server
     depends_on:
       - chaqna-gaudi-backend-server
diff --git a/ChatQnA/docker/gpu/compose.yaml b/ChatQnA/docker/gpu/compose.yaml
index 13f0a3fbc3..31bcfac9ac 100644
--- a/ChatQnA/docker/gpu/compose.yaml
+++ b/ChatQnA/docker/gpu/compose.yaml
@@ -1,9 +1,6 @@
-
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-version: "3.8"
-
 services:
   redis-vector-db:
     image: redis/redis-stack:7.2.0-v9
@@ -12,7 +9,7 @@ services:
       - "6379:6379"
       - "8001:8001"
   dataprep-redis-service:
-    image: opea/dataprep-redis:latest
+    image: ${REGISTRY:-opea}/dataprep-redis:${TAG:-latest}
     container_name: dataprep-redis-server
     depends_on:
       - redis-vector-db
@@ -50,7 +47,7 @@ services:
               count: 1
               capabilities: [gpu]
   embedding:
-    image: opea/embedding-tei:latest
+    image: ${REGISTRY:-opea}/embedding-tei:${TAG:-latest}
     container_name: embedding-tei-server
     depends_on:
       - tei-embedding-service
@@ -64,7 +61,7 @@ services:
       TEI_EMBEDDING_ENDPOINT: ${TEI_EMBEDDING_ENDPOINT}
     restart: unless-stopped
   retriever:
-    image: opea/retriever-redis:latest
+    image: ${REGISTRY:-opea}/retriever-redis:${TAG:-latest}
     container_name: retriever-redis-server
     depends_on:
       - redis-vector-db
@@ -102,7 +99,7 @@ services:
               count: 1
               capabilities: [gpu]
   reranking:
-    image: opea/reranking-tei:latest
+    image: ${REGISTRY:-opea}/reranking-tei:${TAG:-latest}
     container_name: reranking-tei-server
     depends_on:
       - tei-reranking-service
@@ -142,7 +139,7 @@ services:
               count: 1
               capabilities: [gpu]
   llm:
-    image: opea/llm-tgi:latest
+    image: ${REGISTRY:-opea}/llm-tgi:${TAG:-latest}
     container_name: llm-tgi-server
     depends_on:
       - tgi-service
@@ -159,7 +156,7 @@ services:
       HF_HUB_ENABLE_HF_TRANSFER: 0
     restart: unless-stopped
   chaqna-backend-server:
-    image: opea/chatqna:latest
+    image: ${REGISTRY:-opea}/chatqna:${TAG:-latest}
     container_name: chatqna-backend-server
     depends_on:
       - redis-vector-db
@@ -184,7 +181,7 @@ services:
     ipc: host
     restart: always
   chaqna-ui-server:
-    image: opea/chatqna-ui:latest
+    image: ${REGISTRY:-opea}/chatqna-ui:${TAG:-latest}
     container_name: chatqna-ui-server
     depends_on:
       - chaqna-backend-server
diff --git a/ChatQnA/docker/xeon/compose.yaml b/ChatQnA/docker/xeon/compose.yaml
index 6c996a7357..3bad42f577 100644
--- a/ChatQnA/docker/xeon/compose.yaml
+++ b/ChatQnA/docker/xeon/compose.yaml
@@ -1,9 +1,6 @@
-
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-version: "3.8"
-
 services:
   redis-vector-db:
     image: redis/redis-stack:7.2.0-v9
@@ -12,7 +9,7 @@ services:
       - "6379:6379"
       - "8001:8001"
   dataprep-redis-service:
-    image: opea/dataprep-redis:latest
+    image: ${REGISTRY:-opea}/dataprep-redis:${TAG:-latest}
     container_name: dataprep-redis-server
     depends_on:
       - redis-vector-db
@@ -42,7 +39,7 @@ services:
       https_proxy: ${https_proxy}
     command: --model-id ${EMBEDDING_MODEL_ID} --auto-truncate
   embedding:
-    image: opea/embedding-tei:latest
+    image: ${REGISTRY:-opea}/embedding-tei:${TAG:-latest}
     container_name: embedding-tei-server
     depends_on:
       - tei-embedding-service
@@ -56,7 +53,7 @@ services:
       TEI_EMBEDDING_ENDPOINT: ${TEI_EMBEDDING_ENDPOINT}
     restart: unless-stopped
   retriever:
-    image: opea/retriever-redis:latest
+    image: ${REGISTRY:-opea}/retriever-redis:${TAG:-latest}
     container_name: retriever-redis-server
     depends_on:
       - redis-vector-db
@@ -88,7 +85,7 @@ services:
       HF_HUB_ENABLE_HF_TRANSFER: 0
     command: --model-id ${RERANK_MODEL_ID} --auto-truncate
   reranking:
-    image: opea/reranking-tei:latest
+    image: ${REGISTRY:-opea}/reranking-tei:${TAG:-latest}
     container_name: reranking-tei-xeon-server
     depends_on:
       - tei-reranking-service
@@ -121,7 +118,7 @@ services:
       HF_HUB_ENABLE_HF_TRANSFER: 0
     command: --model-id ${LLM_MODEL_ID}
   llm:
-    image: opea/llm-tgi:latest
+    image: ${REGISTRY:-opea}/llm-tgi:${TAG:-latest}
     container_name: llm-tgi-server
     depends_on:
       - tgi-service
@@ -138,7 +135,7 @@ services:
       HF_HUB_ENABLE_HF_TRANSFER: 0
     restart: unless-stopped
   chaqna-xeon-backend-server:
-    image: opea/chatqna:latest
+    image: ${REGISTRY:-opea}/chatqna:${TAG:-latest}
     container_name: chatqna-xeon-backend-server
     depends_on:
       - redis-vector-db
@@ -164,7 +161,7 @@ services:
     ipc: host
     restart: always
   chaqna-xeon-ui-server:
-    image: opea/chatqna-ui:latest
+    image: ${REGISTRY:-opea}/chatqna-ui:${TAG:-latest}
     container_name: chatqna-xeon-ui-server
     depends_on:
       - chaqna-xeon-backend-server
diff --git a/ChatQnA/docker/xeon/compose_qdrant.yaml b/ChatQnA/docker/xeon/compose_qdrant.yaml
index b64dced553..9c4bbf023f 100644
--- a/ChatQnA/docker/xeon/compose_qdrant.yaml
+++ b/ChatQnA/docker/xeon/compose_qdrant.yaml
@@ -1,9 +1,6 @@
-
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-version: "3.8"
-
 services:
   qdrant-vector-db:
     image: qdrant/qdrant
@@ -12,7 +9,7 @@ services:
       - "6333:6333"
       - "6334:6334"
   dataprep-qdrant-service:
-    image: opea/dataprep-qdrant:latest
+    image: ${REGISTRY:-opea}/dataprep-qdrant:${TAG:-latest}
     container_name: dataprep-qdrant-server
     depends_on:
       - qdrant-vector-db
@@ -42,7 +39,7 @@ services:
       https_proxy: ${https_proxy}
     command: --model-id ${EMBEDDING_MODEL_ID} --auto-truncate
   embedding:
-    image: opea/embedding-tei:latest
+    image: ${REGISTRY:-opea}/embedding-tei:${TAG:-latest}
     container_name: embedding-tei-server
     depends_on:
       - tei-embedding-service
@@ -56,7 +53,7 @@ services:
       TEI_EMBEDDING_ENDPOINT: ${TEI_EMBEDDING_ENDPOINT}
     restart: unless-stopped
   retriever:
-    image: opea/retriever-qdrant:latest
+    image: ${REGISTRY:-opea}/retriever-qdrant:${TAG:-latest}
     container_name: retriever-qdrant-server
     depends_on:
       - qdrant-vector-db
@@ -88,7 +85,7 @@ services:
       HF_HUB_ENABLE_HF_TRANSFER: 0
     command: --model-id ${RERANK_MODEL_ID} --auto-truncate
   reranking:
-    image: opea/reranking-tei:latest
+    image: ${REGISTRY:-opea}/reranking-tei:${TAG:-latest}
     container_name: reranking-tei-xeon-server
     depends_on:
       - tei-reranking-service
@@ -121,7 +118,7 @@ services:
       HF_HUB_ENABLE_HF_TRANSFER: 0
     command: --model-id ${LLM_MODEL_ID}
   llm:
-    image: opea/llm-tgi:latest
+    image: ${REGISTRY:-opea}/llm-tgi:${TAG:-latest}
     container_name: llm-tgi-server
     depends_on:
       - tgi-service
@@ -138,7 +135,7 @@ services:
       HF_HUB_ENABLE_HF_TRANSFER: 0
     restart: unless-stopped
   chaqna-xeon-backend-server:
-    image: opea/chatqna:latest
+    image: ${REGISTRY:-opea}/chatqna:${TAG:-latest}
     container_name: chatqna-xeon-backend-server
     depends_on:
       - qdrant-vector-db
@@ -167,7 +164,7 @@ services:
     ipc: host
     restart: always
   chaqna-xeon-ui-server:
-    image: opea/chatqna-ui:latest
+    image: ${REGISTRY:-opea}/chatqna-ui:${TAG:-latest}
     container_name: chatqna-xeon-ui-server
     depends_on:
       - chaqna-xeon-backend-server
diff --git a/ChatQnA/docker/xeon/compose_vllm.yaml b/ChatQnA/docker/xeon/compose_vllm.yaml
index b66218c9aa..4cca92c1f9 100644
--- a/ChatQnA/docker/xeon/compose_vllm.yaml
+++ b/ChatQnA/docker/xeon/compose_vllm.yaml
@@ -1,9 +1,6 @@
-
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-version: "3.8"
-
 services:
   redis-vector-db:
     image: redis/redis-stack:7.2.0-v9
@@ -12,7 +9,7 @@ services:
       - "6379:6379"
       - "8001:8001"
   dataprep-redis-service:
-    image: opea/dataprep-redis:latest
+    image: ${REGISTRY:-opea}/dataprep-redis:${TAG:-latest}
     container_name: dataprep-redis-server
     depends_on:
       - redis-vector-db
@@ -41,7 +38,7 @@ services:
       https_proxy: ${https_proxy}
     command: --model-id ${EMBEDDING_MODEL_ID} --auto-truncate
   embedding:
-    image: opea/embedding-tei:latest
+    image: ${REGISTRY:-opea}/embedding-tei:${TAG:-latest}
     container_name: embedding-tei-server
     depends_on:
       - tei-embedding-service
@@ -58,7 +55,7 @@ services:
       LANGCHAIN_PROJECT: "opea-embedding-service"
     restart: unless-stopped
   retriever:
-    image: opea/retriever-redis:latest
+    image: ${REGISTRY:-opea}/retriever-redis:${TAG:-latest}
     container_name: retriever-redis-server
     depends_on:
       - redis-vector-db
@@ -93,7 +90,7 @@ services:
       HF_HUB_ENABLE_HF_TRANSFER: 0
     command: --model-id ${RERANK_MODEL_ID} --auto-truncate
   reranking:
-    image: opea/reranking-tei:latest
+    image: ${REGISTRY:-opea}/reranking-tei:${TAG:-latest}
     container_name: reranking-tei-xeon-server
     depends_on:
       - tei-reranking-service
@@ -113,7 +110,7 @@ services:
       LANGCHAIN_PROJECT: "opea-reranking-service"
     restart: unless-stopped
   vllm_service:
-    image: opea/vllm:latest
+    image: ${REGISTRY:-opea}/vllm:${TAG:-latest}
     container_name: vllm-service
     ports:
       - "9009:80"
@@ -128,7 +125,7 @@ services:
       LLM_MODEL_ID: ${LLM_MODEL_ID}
     command: --model $LLM_MODEL_ID --host 0.0.0.0 --port 80
   llm:
-    image: opea/llm-vllm:latest
+    image: ${REGISTRY:-opea}/llm-vllm:${TAG:-latest}
     container_name: llm-vllm-server
     depends_on:
       - vllm_service
@@ -149,7 +146,7 @@ services:
       LANGCHAIN_PROJECT: "opea-llm-service"
     restart: unless-stopped
   chaqna-xeon-backend-server:
-    image: opea/chatqna:latest
+    image: ${REGISTRY:-opea}/chatqna:${TAG:-latest}
     container_name: chatqna-xeon-backend-server
     depends_on:
       - redis-vector-db
@@ -174,7 +171,7 @@ services:
     ipc: host
     restart: always
   chaqna-xeon-ui-server:
-    image: opea/chatqna-ui:latest
+    image: ${REGISTRY:-opea}/chatqna-ui:${TAG:-latest}
     container_name: chatqna-xeon-ui-server
     depends_on:
       - chaqna-xeon-backend-server
diff --git a/ChatQnA/tests/test_chatqna_on_gaudi.sh b/ChatQnA/tests/test_chatqna_on_gaudi.sh
index 7c25cb0033..a50e256eab 100644
--- a/ChatQnA/tests/test_chatqna_on_gaudi.sh
+++ b/ChatQnA/tests/test_chatqna_on_gaudi.sh
@@ -3,47 +3,33 @@
 # SPDX-License-Identifier: Apache-2.0
 
 set -e
-echo "IMAGE_REPO=${IMAGE_REPO}"
+IMAGE_REPO=${IMAGE_REPO:-"opea"}
+IMAGE_TAG=${IMAGE_TAG:-"latest"}
+echo "REGISTRY=IMAGE_REPO=${IMAGE_REPO}"
+echo "TAG=IMAGE_TAG=${IMAGE_TAG}"
+export REGISTRY=${IMAGE_REPO}
+export TAG=${IMAGE_TAG}
 
 WORKPATH=$(dirname "$PWD")
 LOG_PATH="$WORKPATH/tests"
 ip_address=$(hostname -I | awk '{print $1}')
 
 function build_docker_images() {
-    cd $WORKPATH
+    cd $WORKPATH/docker
     git clone https://github.com/opea-project/GenAIComps.git
-    cd GenAIComps
-
-    docker build -t opea/embedding-tei:latest -f comps/embeddings/langchain/docker/Dockerfile .
-    docker build -t opea/retriever-redis:latest -f comps/retrievers/langchain/redis/docker/Dockerfile .
-    docker build -t opea/reranking-tei:latest -f comps/reranks/tei/docker/Dockerfile .
-    docker build -t opea/llm-tgi:latest -f comps/llms/text-generation/tgi/Dockerfile .
-    docker build -t opea/dataprep-redis:latest -f comps/dataprep/redis/langchain/docker/Dockerfile .
+    git clone https://github.com/huggingface/tei-gaudi
 
-#    cd ..
-#    git clone https://github.com/huggingface/tei-gaudi
-#    cd tei-gaudi/
-#    docker build --no-cache -f Dockerfile-hpu -t opea/tei-gaudi:latest .
+    echo "Build all the images with --no-cache, check docker_image_build.log for details..."
+    service_list="chatqna chatqna-ui dataprep-redis embedding-tei retriever-redis reranking-tei llm-tgi tei-gaudi"
+    docker compose -f docker_build_compose.yaml build ${service_list} --no-cache > ${LOG_PATH}/docker_image_build.log
 
     docker pull ghcr.io/huggingface/tgi-gaudi:2.0.1
     docker pull ghcr.io/huggingface/text-embeddings-inference:cpu-1.5
 
-    cd $WORKPATH/docker
-    docker build --no-cache -t opea/chatqna:latest -f Dockerfile .
-
-    cd $WORKPATH/docker/ui
-    docker build --no-cache -t opea/chatqna-ui:latest -f docker/Dockerfile .
-
     docker images
 }
 
 function start_services() {
-    # build tei-gaudi for each test instead of pull from local registry
-    cd $WORKPATH
-    git clone https://github.com/huggingface/tei-gaudi
-    cd tei-gaudi/
-    docker build --no-cache -q -f Dockerfile-hpu -t opea/tei-gaudi:latest .
-
     cd $WORKPATH/docker/gaudi
     export EMBEDDING_MODEL_ID="BAAI/bge-base-en-v1.5"
     export RERANK_MODEL_ID="BAAI/bge-reranker-base"
@@ -67,24 +53,9 @@ function start_services() {
 
     sed -i "s/backend_address/$ip_address/g" $WORKPATH/docker/ui/svelte/.env
 
-    if [[ "$IMAGE_REPO" != "" ]]; then
-        # Replace the container name with a test-specific name
-        echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
-        if [ "${mode}" == "perf" ]; then
-            sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose.yaml
-        else
-            sed -i "s#image: opea/chatqna:latest#image: opea/chatqna:${IMAGE_TAG}#g" compose.yaml
-            sed -i "s#image: opea/chatqna-ui:latest#image: opea/chatqna-ui:${IMAGE_TAG}#g" compose.yaml
-            sed -i "s#image: opea/chatqna-conversation-ui:latest#image: opea/chatqna-conversation-ui:${IMAGE_TAG}#g" compose.yaml
-            sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose.yaml
-            sed -i "s#image: ${IMAGE_REPO}opea/tei-gaudi:latest#image: opea/tei-gaudi:latest#g" compose.yaml
-        fi
-        echo "cat compose.yaml"
-        cat compose.yaml
-    fi
-
     # Start Docker Containers
     docker compose up -d
+
     n=0
     until [[ "$n" -ge 400 ]]; do
         docker logs tgi-gaudi-server > ${LOG_PATH}/tgi_service_start.log
@@ -246,13 +217,16 @@ function validate_frontend() {
     cd $WORKPATH/docker/ui/svelte
     local conda_env_name="OPEA_e2e"
     export PATH=${HOME}/miniforge3/bin/:$PATH
-#    conda remove -n ${conda_env_name} --all -y
-#    conda create -n ${conda_env_name} python=3.12 -y
+    if conda info --envs | grep -q "$conda_env_name"; then
+        echo "$conda_env_name exist!"
+    else
+        conda create -n ${conda_env_name} python=3.12 -y
+    fi
     source activate ${conda_env_name}
 
     sed -i "s/localhost/$ip_address/g" playwright.config.ts
 
-#    conda install -c conda-forge nodejs -y
+    conda install -c conda-forge nodejs -y
     npm install && npm ci && npx playwright install --with-deps
     node -v && npm -v && pip list
 
@@ -275,7 +249,7 @@ function stop_docker() {
 function main() {
 
     stop_docker
-    if [[ "$IMAGE_REPO" == "" ]]; then build_docker_images; fi
+    if [[ "$IMAGE_REPO" == "opea" ]]; then build_docker_images; fi
     start_time=$(date +%s)
     start_services
     end_time=$(date +%s)
diff --git a/ChatQnA/tests/test_chatqna_on_xeon.sh b/ChatQnA/tests/test_chatqna_on_xeon.sh
index bff1c55277..9d9c9215d2 100644
--- a/ChatQnA/tests/test_chatqna_on_xeon.sh
+++ b/ChatQnA/tests/test_chatqna_on_xeon.sh
@@ -2,29 +2,28 @@
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-set -xe
-echo "IMAGE_REPO=${IMAGE_REPO}"
+set -e
+IMAGE_REPO=${IMAGE_REPO:-"opea"}
+IMAGE_TAG=${IMAGE_TAG:-"latest"}
+echo "REGISTRY=IMAGE_REPO=${IMAGE_REPO}"
+echo "TAG=IMAGE_TAG=${IMAGE_TAG}"
+export REGISTRY=${IMAGE_REPO}
+export TAG=${IMAGE_TAG}
 
 WORKPATH=$(dirname "$PWD")
 LOG_PATH="$WORKPATH/tests"
 ip_address=$(hostname -I | awk '{print $1}')
 
 function build_docker_images() {
-    cd $WORKPATH
+    cd $WORKPATH/docker
     git clone https://github.com/opea-project/GenAIComps.git
-    cd GenAIComps
-
-    docker build -t opea/embedding-tei:latest -f comps/embeddings/langchain/docker/Dockerfile .
-    docker build -t opea/retriever-redis:latest -f comps/retrievers/langchain/redis/docker/Dockerfile .
-    docker build -t opea/reranking-tei:latest -f comps/reranks/tei/docker/Dockerfile .
-    docker build -t opea/llm-tgi:latest -f comps/llms/text-generation/tgi/Dockerfile .
-    docker build -t opea/dataprep-redis:latest -f comps/dataprep/redis/langchain/docker/Dockerfile .
 
-    cd $WORKPATH/docker
-    docker build --no-cache -t opea/chatqna:latest -f Dockerfile .
+    echo "Build all the images with --no-cache, check docker_image_build.log for details..."
+    service_list="chatqna chatqna-ui chatqna-conversation-ui dataprep-redis embedding-tei retriever-redis reranking-tei llm-tgi"
+    docker compose -f docker_build_compose.yaml build ${service_list} --no-cache > ${LOG_PATH}/docker_image_build.log
 
-    cd $WORKPATH/docker/ui
-    docker build --no-cache -t opea/chatqna-ui:latest -f docker/Dockerfile .
+    docker pull ghcr.io/huggingface/tgi-gaudi:2.0.1
+    docker pull ghcr.io/huggingface/text-embeddings-inference:cpu-1.5
 
     docker images
 }
@@ -54,21 +53,6 @@ function start_services() {
 
     sed -i "s/backend_address/$ip_address/g" $WORKPATH/docker/ui/svelte/.env
 
-    if [[ "$IMAGE_REPO" != "" ]]; then
-        # Replace the container name with a test-specific name
-        echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
-        if [ "${mode}" == "perf" ]; then
-            sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose.yaml
-        else
-            sed -i "s#image: opea/chatqna:latest#image: opea/chatqna:${IMAGE_TAG}#g" compose.yaml
-            sed -i "s#image: opea/chatqna-ui:latest#image: opea/chatqna-ui:${IMAGE_TAG}#g" compose.yaml
-            sed -i "s#image: opea/chatqna-conversation-ui:latest#image: opea/chatqna-conversation-ui:${IMAGE_TAG}#g" compose.yaml
-            sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose.yaml
-        fi
-        echo "cat compose.yaml"
-        cat compose.yaml
-    fi
-
     # Start Docker Containers
     docker compose up -d
     n=0
@@ -233,14 +217,17 @@ function validate_frontend() {
     cd $WORKPATH/docker/ui/svelte
     local conda_env_name="OPEA_e2e"
     export PATH=${HOME}/miniforge3/bin/:$PATH
-#    conda remove -n ${conda_env_name} --all -y
-#    conda create -n ${conda_env_name} python=3.12 -y
+    if conda info --envs | grep -q "$conda_env_name"; then
+        echo "$conda_env_name exist!"
+    else
+        conda create -n ${conda_env_name} python=3.12 -y
+    fi
     source activate ${conda_env_name}
     echo "[ TEST INFO ]: --------- conda env activated ---------"
 
     sed -i "s/localhost/$ip_address/g" playwright.config.ts
 
-#    conda install -c conda-forge nodejs -y
+    conda install -c conda-forge nodejs -y
     npm install && npm ci && npx playwright install --with-deps
     node -v && npm -v && pip list
 
@@ -263,7 +250,7 @@ function stop_docker() {
 function main() {
 
     stop_docker
-    if [[ "$IMAGE_REPO" == "" ]]; then build_docker_images; fi
+    if [[ "$IMAGE_REPO" == "opea" ]]; then build_docker_images; fi
     start_time=$(date +%s)
     start_services
     end_time=$(date +%s)
diff --git a/ChatQnA/tests/test_chatqna_qdrant_on_xeon.sh b/ChatQnA/tests/test_chatqna_qdrant_on_xeon.sh
index 774a6bfb6c..18154764bc 100644
--- a/ChatQnA/tests/test_chatqna_qdrant_on_xeon.sh
+++ b/ChatQnA/tests/test_chatqna_qdrant_on_xeon.sh
@@ -3,28 +3,24 @@
 # SPDX-License-Identifier: Apache-2.0
 
 set -e
-echo "IMAGE_REPO=${IMAGE_REPO}"
+IMAGE_REPO=${IMAGE_REPO:-"opea"}
+IMAGE_TAG=${IMAGE_TAG:-"latest"}
+echo "REGISTRY=IMAGE_REPO=${IMAGE_REPO}"
+echo "TAG=IMAGE_TAG=${IMAGE_TAG}"
+export REGISTRY=${IMAGE_REPO}
+export TAG=${IMAGE_TAG}
 
 WORKPATH=$(dirname "$PWD")
 LOG_PATH="$WORKPATH/tests"
 ip_address=$(hostname -I | awk '{print $1}')
 
 function build_docker_images() {
-    cd $WORKPATH
-    git clone https://github.com/opea-project/GenAIComps.git
-    cd GenAIComps
-
-    docker build -t opea/embedding-tei:latest -f comps/embeddings/langchain/docker/Dockerfile .
-    docker build -t opea/retriever-qdrant:latest -f comps/retrievers/haystack/qdrant/docker/Dockerfile .
-    docker build -t opea/reranking-tei:latest -f comps/reranks/tei/docker/Dockerfile .
-    docker build -t opea/llm-tgi:latest -f comps/llms/text-generation/tgi/Dockerfile .
-    docker build -t opea/dataprep-qdrant:latest -f comps/dataprep/qdrant/docker/Dockerfile .
-
     cd $WORKPATH/docker
-    docker build --no-cache -t opea/chatqna:latest -f Dockerfile .
+    git clone https://github.com/opea-project/GenAIComps.git
 
-    cd $WORKPATH/docker/ui
-    docker build --no-cache -t opea/chatqna-ui:latest -f docker/Dockerfile .
+    echo "Build all the images with --no-cache, check docker_image_build.log for details..."
+    service_list="chatqna chatqna-ui dataprep-qdrant embedding-tei retriever-qdrant reranking-tei llm-tgi"
+    docker compose -f docker_build_compose.yaml build ${service_list} --no-cache > ${LOG_PATH}/docker_image_build.log
 
     docker images
 }
@@ -56,16 +52,6 @@ function start_services() {
 
     sed -i "s/backend_address/$ip_address/g" $WORKPATH/docker/ui/svelte/.env
 
-    if [[ "$IMAGE_REPO" != "" ]]; then
-        # Replace the container name with a test-specific name
-        echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
-        sed -i "s#image: opea/chatqna:latest#image: opea/chatqna:${IMAGE_TAG}#g" compose_qdrant.yaml
-        sed -i "s#image: opea/chatqna-ui:latest#image: opea/chatqna-ui:${IMAGE_TAG}#g" compose_qdrant.yaml
-        sed -i "s#image: opea/chatqna-conversation-ui:latest#image: opea/chatqna-conversation-ui:${IMAGE_TAG}#g" compose_qdrant.yaml
-        sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose_qdrant.yaml
-        cat compose_qdrant.yaml
-    fi
-
     # Start Docker Containers
     docker compose -f compose_qdrant.yaml up -d
     n=0
@@ -235,7 +221,7 @@ function stop_docker() {
 function main() {
 
     stop_docker
-    if [[ "$IMAGE_REPO" == "" ]]; then build_docker_images; fi
+    if [[ "$IMAGE_REPO" == "opea" ]]; then build_docker_images; fi
     start_time=$(date +%s)
     start_services
     end_time=$(date +%s)
diff --git a/ChatQnA/tests/test_chatqna_vllm_on_gaudi.sh b/ChatQnA/tests/test_chatqna_vllm_on_gaudi.sh
index 99e63e06ba..cff22f6e05 100644
--- a/ChatQnA/tests/test_chatqna_vllm_on_gaudi.sh
+++ b/ChatQnA/tests/test_chatqna_vllm_on_gaudi.sh
@@ -3,47 +3,31 @@
 # SPDX-License-Identifier: Apache-2.0
 
 set -e
-echo "IMAGE_REPO=${IMAGE_REPO}"
+IMAGE_REPO=${IMAGE_REPO:-"opea"}
+IMAGE_TAG=${IMAGE_TAG:-"latest"}
+echo "REGISTRY=IMAGE_REPO=${IMAGE_REPO}"
+echo "TAG=IMAGE_TAG=${IMAGE_TAG}"
+export REGISTRY=${IMAGE_REPO}
+export TAG=${IMAGE_TAG}
 
 WORKPATH=$(dirname "$PWD")
 LOG_PATH="$WORKPATH/tests"
 ip_address=$(hostname -I | awk '{print $1}')
 
 function build_docker_images() {
-    cd $WORKPATH
+    cd $WORKPATH/docker
     git clone https://github.com/opea-project/GenAIComps.git
-    cd GenAIComps
-
-    docker build -t opea/embedding-tei:latest -f comps/embeddings/langchain/docker/Dockerfile .
-    docker build -t opea/retriever-redis:latest -f comps/retrievers/langchain/redis/docker/Dockerfile .
-    docker build -t opea/reranking-tei:latest -f comps/reranks/tei/docker/Dockerfile .
-    docker build -t opea/llm-vllm-hpu:latest -f comps/llms/text-generation/vllm/docker/Dockerfile.hpu .
-    docker build -t opea/llm-vllm:latest -f comps/llms/text-generation/vllm/docker/Dockerfile.microservice .
-    docker build -t opea/dataprep-redis:latest -f comps/dataprep/redis/langchain/docker/Dockerfile .
+    git clone https://github.com/huggingface/tei-gaudi
 
-#    cd ..
-#    git clone https://github.com/huggingface/tei-gaudi
-#    cd tei-gaudi/
-#    docker build --no-cache -f Dockerfile-hpu -t opea/tei-gaudi:latest .
+    echo "Build all the images with --no-cache, check docker_image_build.log for details..."
+    service_list="chatqna chatqna-ui dataprep-redis embedding-tei retriever-redis reranking-tei tei-gaudi llm-vllm-hpu llm-vllm"
+    docker compose -f docker_build_compose.yaml build ${service_list} --no-cache > ${LOG_PATH}/docker_image_build.log
 
     docker pull ghcr.io/huggingface/text-embeddings-inference:cpu-1.2
-
-    cd $WORKPATH/docker
-    docker build --no-cache -t opea/chatqna:latest -f Dockerfile .
-
-    cd $WORKPATH/docker/ui
-    docker build --no-cache -t opea/chatqna-ui:latest -f docker/Dockerfile .
-
     docker images
 }
 
 function start_services() {
-    # build tei-gaudi for each test instead of pull from local registry
-    cd $WORKPATH
-    git clone https://github.com/huggingface/tei-gaudi
-    cd tei-gaudi/
-    docker build --no-cache -q -f Dockerfile-hpu -t opea/tei-gaudi:latest .
-
     cd $WORKPATH/docker/gaudi
     export EMBEDDING_MODEL_ID="BAAI/bge-base-en-v1.5"
     export RERANK_MODEL_ID="BAAI/bge-reranker-base"
@@ -65,18 +49,6 @@ function start_services() {
 
     sed -i "s/backend_address/$ip_address/g" $WORKPATH/docker/ui/svelte/.env
 
-    if [[ "$IMAGE_REPO" != "" ]]; then
-        # Replace the container name with a test-specific name
-        echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
-        sed -i "s#image: opea/chatqna:latest#image: opea/chatqna:${IMAGE_TAG}#g" compose_vllm.yaml
-        sed -i "s#image: opea/chatqna-ui:latest#image: opea/chatqna-ui:${IMAGE_TAG}#g" compose_vllm.yaml
-        sed -i "s#image: opea/chatqna-conversation-ui:latest#image: opea/chatqna-conversation-ui:${IMAGE_TAG}#g" compose_vllm.yaml
-        sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose_vllm.yaml
-        sed -i "s#image: ${IMAGE_REPO}opea/tei-gaudi:latest#image: opea/tei-gaudi:latest#g" compose_vllm.yaml
-        echo "cat compose_vllm.yaml"
-        cat compose_vllm.yaml
-    fi
-
     # Start Docker Containers
     docker compose -f compose_vllm.yaml up -d
     n=0
@@ -198,13 +170,16 @@ function validate_frontend() {
     cd $WORKPATH/docker/ui/svelte
     local conda_env_name="OPEA_e2e"
     export PATH=${HOME}/miniforge3/bin/:$PATH
-#    conda remove -n ${conda_env_name} --all -y
-#    conda create -n ${conda_env_name} python=3.12 -y
+    if conda info --envs | grep -q "$conda_env_name"; then
+        echo "$conda_env_name exist!"
+    else
+        conda create -n ${conda_env_name} python=3.12 -y
+    fi
     source activate ${conda_env_name}
 
     sed -i "s/localhost/$ip_address/g" playwright.config.ts
 
-#    conda install -c conda-forge nodejs -y
+    conda install -c conda-forge nodejs -y
     npm install && npm ci && npx playwright install --with-deps
     node -v && npm -v && pip list
 
@@ -227,7 +202,7 @@ function stop_docker() {
 function main() {
 
     stop_docker
-    if [[ "$IMAGE_REPO" == "" ]]; then build_docker_images; fi
+    if [[ "$IMAGE_REPO" == "opea" ]]; then build_docker_images; fi
     start_time=$(date +%s)
     start_services
     end_time=$(date +%s)
diff --git a/ChatQnA/tests/test_chatqna_vllm_on_xeon.sh b/ChatQnA/tests/test_chatqna_vllm_on_xeon.sh
index a424187cd8..f27def0213 100644
--- a/ChatQnA/tests/test_chatqna_vllm_on_xeon.sh
+++ b/ChatQnA/tests/test_chatqna_vllm_on_xeon.sh
@@ -3,43 +3,33 @@
 # SPDX-License-Identifier: Apache-2.0
 
 set -e
-echo "IMAGE_REPO=${IMAGE_REPO}"
+IMAGE_REPO=${IMAGE_REPO:-"opea"}
+IMAGE_TAG=${IMAGE_TAG:-"latest"}
+echo "REGISTRY=IMAGE_REPO=${IMAGE_REPO}"
+echo "TAG=IMAGE_TAG=${IMAGE_TAG}"
+export REGISTRY=${IMAGE_REPO}
+export TAG=${IMAGE_TAG}
 
 WORKPATH=$(dirname "$PWD")
 LOG_PATH="$WORKPATH/tests"
 ip_address=$(hostname -I | awk '{print $1}')
 
 function build_docker_images() {
-    cd $WORKPATH
-    git clone https://github.com/opea-project/GenAIComps.git
-    cd GenAIComps
-
-    docker build -t opea/embedding-tei:latest -f comps/embeddings/langchain/docker/Dockerfile .
-    docker build -t opea/retriever-redis:latest -f comps/retrievers/langchain/redis/docker/Dockerfile .
-    docker build -t opea/reranking-tei:latest -f comps/reranks/tei/docker/Dockerfile .
-    docker build -t opea/llm-vllm:latest -f comps/llms/text-generation/vllm/docker/Dockerfile.microservice .
-    docker build -t opea/dataprep-redis:latest -f comps/dataprep/redis/langchain/docker/Dockerfile .
-
     cd $WORKPATH/docker
-    docker build --no-cache -t opea/chatqna:latest -f Dockerfile .
+    git clone https://github.com/opea-project/GenAIComps.git
+    git clone https://github.com/vllm-project/vllm.git
 
-    cd $WORKPATH/docker/ui
-    docker build --no-cache -t opea/chatqna-ui:latest -f docker/Dockerfile .
+    echo "Build all the images with --no-cache, check docker_image_build.log for details..."
+    service_list="chatqna chatqna-ui dataprep-redis embedding-tei retriever-redis reranking-tei llm-vllm vllm"
+    docker compose -f docker_build_compose.yaml build ${service_list} --no-cache > ${LOG_PATH}/docker_image_build.log
 
-    # cd $WORKPATH
-    # git clone https://github.com/vllm-project/vllm.git
-    # cd vllm
-    # docker build --no-cache -t opea/vllm:latest -f Dockerfile.cpu .
+    docker pull ghcr.io/huggingface/tgi-gaudi:2.0.1
+    docker pull ghcr.io/huggingface/text-embeddings-inference:cpu-1.5
 
     docker images
 }
 
 function start_services() {
-    cd $WORKPATH
-    git clone https://github.com/vllm-project/vllm.git
-    cd vllm
-    docker build --no-cache -t opea/vllm:latest -f Dockerfile.cpu .
-
     cd $WORKPATH/docker/xeon
 
     export EMBEDDING_MODEL_ID="BAAI/bge-base-en-v1.5"
@@ -62,29 +52,15 @@ function start_services() {
 
     sed -i "s/backend_address/$ip_address/g" $WORKPATH/docker/ui/svelte/.env
 
-    if [[ "$IMAGE_REPO" != "" ]]; then
-        # Replace the container name with a test-specific name
-        echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
-        if [ "${mode}" == "perf" ]; then
-            sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose_vllm.yaml
-        else
-            sed -i "s#image: opea/chatqna:latest#image: opea/chatqna:${IMAGE_TAG}#g" compose_vllm.yaml
-            sed -i "s#image: opea/chatqna-ui:latest#image: opea/chatqna-ui:${IMAGE_TAG}#g" compose_vllm.yaml
-            sed -i "s#image: opea/chatqna-conversation-ui:latest#image: opea/chatqna-conversation-ui:${IMAGE_TAG}#g" compose_vllm.yaml
-            sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose_vllm.yaml
-            sed -i "s#image: ${IMAGE_REPO}opea/vllm:latest#image: opea/vllm:latest#g" compose_vllm.yaml
-        fi
-    fi
-
     # Start Docker Containers
     docker compose -f compose_vllm.yaml up -d
     n=0
-    until [[ "$n" -ge 10 ]]; do
+    until [[ "$n" -ge 100 ]]; do
         docker logs vllm-service > ${LOG_PATH}/vllm_service_start.log
         if grep -q Connected ${LOG_PATH}/vllm_service_start.log; then
             break
         fi
-        sleep 10s
+        sleep 5s
         n=$((n+1))
     done
 }
@@ -196,13 +172,17 @@ function validate_frontend() {
     cd $WORKPATH/docker/ui/svelte
     local conda_env_name="OPEA_e2e"
     export PATH=${HOME}/miniforge3/bin/:$PATH
-#    conda remove -n ${conda_env_name} --all -y
-#    conda create -n ${conda_env_name} python=3.12 -y
+    if conda info --envs | grep -q "$conda_env_name"; then
+        echo "$conda_env_name exist!"
+    else
+        conda create -n ${conda_env_name} python=3.12 -y
+    fi
+
     source activate ${conda_env_name}
 
     sed -i "s/localhost/$ip_address/g" playwright.config.ts
 
-#    conda install -c conda-forge nodejs -y
+    conda install -c conda-forge nodejs -y
     npm install && npm ci && npx playwright install --with-deps
     node -v && npm -v && pip list
 
@@ -225,7 +205,7 @@ function stop_docker() {
 function main() {
 
     stop_docker
-    if [[ "$IMAGE_REPO" == "" ]]; then build_docker_images; fi
+    if [[ "$IMAGE_REPO" == "opea" ]]; then build_docker_images; fi
     start_time=$(date +%s)
     start_services
     end_time=$(date +%s)
diff --git a/ChatQnA/tests/test_chatqna_vllm_ray_on_gaudi.sh b/ChatQnA/tests/test_chatqna_vllm_ray_on_gaudi.sh
index 9099598bb5..3000479119 100644
--- a/ChatQnA/tests/test_chatqna_vllm_ray_on_gaudi.sh
+++ b/ChatQnA/tests/test_chatqna_vllm_ray_on_gaudi.sh
@@ -3,46 +3,31 @@
 # SPDX-License-Identifier: Apache-2.0
 
 set -e
-echo "IMAGE_REPO=${IMAGE_REPO}"
+IMAGE_REPO=${IMAGE_REPO:-"opea"}
+IMAGE_TAG=${IMAGE_TAG:-"latest"}
+echo "REGISTRY=IMAGE_REPO=${IMAGE_REPO}"
+echo "TAG=IMAGE_TAG=${IMAGE_TAG}"
+export REGISTRY=${IMAGE_REPO}
+export TAG=${IMAGE_TAG}
 
 WORKPATH=$(dirname "$PWD")
 LOG_PATH="$WORKPATH/tests"
 ip_address=$(hostname -I | awk '{print $1}')
 
 function build_docker_images() {
-    cd $WORKPATH
+    cd $WORKPATH/docker
     git clone https://github.com/opea-project/GenAIComps.git
-    cd GenAIComps
-
-    docker build -t opea/embedding-tei:latest -f comps/embeddings/langchain/docker/Dockerfile .
-    docker build -t opea/retriever-redis:latest -f comps/retrievers/langchain/redis/docker/Dockerfile .
-    docker build -t opea/reranking-tei:latest -f comps/reranks/tei/docker/Dockerfile .
-    docker build -t opea/llm-vllm-ray-hpu:latest -f comps/llms/text-generation/vllm-ray/docker/Dockerfile.vllmray .
-    docker build -t opea/llm-vllm-ray:latest -f comps/llms/text-generation/vllm-ray/docker/Dockerfile.microservice .
-    docker build -t opea/dataprep-redis:latest -f comps/dataprep/redis/langchain/docker/Dockerfile .
+    git clone https://github.com/huggingface/tei-gaudi
 
-#    cd ..
-#    git clone https://github.com/huggingface/tei-gaudi
-#    cd tei-gaudi/
-#    docker build --no-cache -f Dockerfile-hpu -t opea/tei-gaudi:latest .
+    echo "Build all the images with --no-cache, check docker_image_build.log for details..."
+    service_list="chatqna chatqna-ui dataprep-redis embedding-tei retriever-redis reranking-tei tei-gaudi llm-vllm-ray-hpu llm-vllm-ray"
+    docker compose -f docker_build_compose.yaml build ${service_list} --no-cache > ${LOG_PATH}/docker_image_build.log
 
     docker pull ghcr.io/huggingface/text-embeddings-inference:cpu-1.2
-
-    cd $WORKPATH/docker
-    docker build --no-cache -t opea/chatqna:latest -f Dockerfile .
-
-    cd $WORKPATH/docker/ui
-    docker build --no-cache -t opea/chatqna-ui:latest -f docker/Dockerfile .
-
     docker images
 }
 
 function start_services() {
-    # build tei-gaudi for each test instead of pull from local registry
-    cd $WORKPATH
-    git clone https://github.com/huggingface/tei-gaudi
-    cd tei-gaudi/
-    docker build --no-cache -q -f Dockerfile-hpu -t opea/tei-gaudi:latest .
 
     cd $WORKPATH/docker/gaudi
     export EMBEDDING_MODEL_ID="BAAI/bge-base-en-v1.5"
@@ -65,18 +50,6 @@ function start_services() {
 
     sed -i "s/backend_address/$ip_address/g" $WORKPATH/docker/ui/svelte/.env
 
-    if [[ "$IMAGE_REPO" != "" ]]; then
-        # Replace the container name with a test-specific name
-        echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
-        sed -i "s#image: opea/chatqna:latest#image: opea/chatqna:${IMAGE_TAG}#g" compose_vllm_ray.yaml
-        sed -i "s#image: opea/chatqna-ui:latest#image: opea/chatqna-ui:${IMAGE_TAG}#g" compose_vllm_ray.yaml
-        sed -i "s#image: opea/chatqna-conversation-ui:latest#image: opea/chatqna-conversation-ui:${IMAGE_TAG}#g" compose_vllm_ray.yaml
-        sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose_vllm_ray.yaml
-        sed -i "s#image: ${IMAGE_REPO}opea/tei-gaudi:latest#image: opea/tei-gaudi:latest#g" compose_vllm_ray.yaml
-        echo "cat compose_vllm_ray.yaml"
-        cat compose_vllm_ray.yaml
-    fi
-
     # Start Docker Containers
     docker compose -f compose_vllm_ray.yaml up -d
     n=0
@@ -198,13 +171,16 @@ function validate_frontend() {
     cd $WORKPATH/docker/ui/svelte
     local conda_env_name="OPEA_e2e"
     export PATH=${HOME}/miniforge3/bin/:$PATH
-#    conda remove -n ${conda_env_name} --all -y
-#    conda create -n ${conda_env_name} python=3.12 -y
+    if conda info --envs | grep -q "$conda_env_name"; then
+        echo "$conda_env_name exist!"
+    else
+        conda create -n ${conda_env_name} python=3.12 -y
+    fi
     source activate ${conda_env_name}
 
     sed -i "s/localhost/$ip_address/g" playwright.config.ts
 
-#    conda install -c conda-forge nodejs -y
+    conda install -c conda-forge nodejs -y
     npm install && npm ci && npx playwright install --with-deps
     node -v && npm -v && pip list
 
@@ -227,7 +203,7 @@ function stop_docker() {
 function main() {
 
     stop_docker
-    if [[ "$IMAGE_REPO" == "" ]]; then build_docker_images; fi
+    if [[ "$IMAGE_REPO" == "opea" ]]; then build_docker_images; fi
     start_time=$(date +%s)
     start_services
     end_time=$(date +%s)
diff --git a/CodeGen/docker/docker_build_compose.yaml b/CodeGen/docker/docker_build_compose.yaml
new file mode 100644
index 0000000000..bc1db1194a
--- /dev/null
+++ b/CodeGen/docker/docker_build_compose.yaml
@@ -0,0 +1,30 @@
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
+
+services:
+  codegen:
+    build:
+      args:
+        http_proxy: ${http_proxy}
+        https_proxy: ${https_proxy}
+        no_proxy: ${no_proxy}
+      dockerfile: ./Dockerfile
+    image: ${REGISTRY:-opea}/codegen:${TAG:-latest}
+  codegen-ui:
+    build:
+      context: ui
+      dockerfile: ./docker/Dockerfile
+    extends: codegen
+    image: ${REGISTRY:-opea}/codegen-ui:${TAG:-latest}
+  codegen-react-ui:
+    build:
+      context: ui
+      dockerfile: ./docker/Dockerfile.react
+    extends: codegen
+    image: ${REGISTRY:-opea}/codegen-conversation-ui:${TAG:-latest}
+  llm-tgi:
+    build:
+      context: GenAIComps
+      dockerfile: comps/llms/text-generation/tgi/Dockerfile
+    extends: codegen
+    image: ${REGISTRY}opea/llm-tgi:${TAG:-latest}
diff --git a/CodeGen/docker/gaudi/README.md b/CodeGen/docker/gaudi/README.md
index a3ffc8a72f..a563f416ba 100644
--- a/CodeGen/docker/gaudi/README.md
+++ b/CodeGen/docker/gaudi/README.md
@@ -148,16 +148,24 @@ To access the frontend, open the following URL in your browser: `http://{host_ip
 
 ![project-screenshot](../../assets/img/codeGen_ui_init.jpg)
 
-## 🚀 Launch the React Based UI
+## 🚀 Launch the React Based UI (Optional)
 
-To access the frontend, open the following URL in your browser: `http://{host_ip}:5174`. By default, the UI runs on port 5174 internally. If you prefer to use a different host port to access the frontend, you can modify the port mapping in the `compose.yaml` file as shown below:
+To access the React-based frontend, modify the UI service in the `compose.yaml` file. Replace `codegen-gaudi-ui-server` service with the `codegen-gaudi-react-ui-server` service as per the config below:
 
 ```yaml
-  codegen-gaudi-react-ui-server:
-    image: opea/codegen-react-ui:latest
-    ...
-    ports:
-      - "80:5174"
+codegen-gaudi-react-ui-server:
+  image: ${REGISTRY:-opea}/codegen-react-ui:${TAG:-latest}
+  container_name: codegen-gaudi-react-ui-server
+  environment:
+    - no_proxy=${no_proxy}
+    - https_proxy=${https_proxy}
+    - http_proxy=${http_proxy}
+  depends_on:
+    - codegen-gaudi-backend-server
+  ports:
+    - "5174:80"
+  ipc: host
+  restart: always
 ```
 
 ![project-screenshot](../../assets/img/codegen_react.png)
diff --git a/CodeGen/docker/gaudi/compose.yaml b/CodeGen/docker/gaudi/compose.yaml
index 074743015f..c1bae7b902 100644
--- a/CodeGen/docker/gaudi/compose.yaml
+++ b/CodeGen/docker/gaudi/compose.yaml
@@ -1,9 +1,6 @@
-
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-version: "3.8"
-
 services:
   tgi-service:
     image: ghcr.io/huggingface/tgi-gaudi:2.0.1
@@ -25,7 +22,7 @@ services:
     ipc: host
     command: --model-id ${LLM_MODEL_ID} --max-input-length 1024 --max-total-tokens 2048
   llm:
-    image: opea/llm-tgi:latest
+    image: ${REGISTRY:-opea}/llm-tgi:${TAG:-latest}
     container_name: llm-tgi-gaudi-server
     depends_on:
       - tgi-service
@@ -40,7 +37,7 @@ services:
       HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
     restart: unless-stopped
   codegen-gaudi-backend-server:
-    image: opea/codegen:latest
+    image: ${REGISTRY:-opea}/codegen:${TAG:-latest}
     container_name: codegen-gaudi-backend-server
     depends_on:
       - llm
@@ -55,7 +52,7 @@ services:
     ipc: host
     restart: always
   codegen-gaudi-ui-server:
-    image: opea/codegen-ui:latest
+    image: ${REGISTRY:-opea}/codegen-ui:${TAG:-latest}
     container_name: codegen-gaudi-ui-server
     depends_on:
       - codegen-gaudi-backend-server
@@ -69,16 +66,6 @@ services:
     ipc: host
     restart: always
 
-  codegen-gaudi-react-ui-server:
-    image: opea/codegen-react-ui:latest
-    container_name: codegen-gaudi-react-ui-server
-    depends_on:
-      - codegen-gaudi-backend-server
-    ports:
-      - "5174:80"
-    ipc: host
-    restart: always
-
 networks:
   default:
     driver: bridge
diff --git a/CodeGen/docker/xeon/README.md b/CodeGen/docker/xeon/README.md
index 29efec031a..74b5a2b7c2 100644
--- a/CodeGen/docker/xeon/README.md
+++ b/CodeGen/docker/xeon/README.md
@@ -155,16 +155,24 @@ Here is an example of running CodeGen in the UI:
 
 ![project-screenshot](../../assets/img/codeGen_ui_response.png)
 
-## 🚀 Launch the React Based UI
+## 🚀 Launch the React Based UI (Optional)
 
-To access the frontend, open the following URL in your browser: `http://{host_ip}:5174`. By default, the UI runs on port 5174 internally. If you prefer to use a different host port to access the frontend, you can modify the port mapping in the `compose.yaml` file as shown below:
+To access the React-based frontend, modify the UI service in the `compose.yaml` file. Replace `codegen-xeon-ui-server` service with the `codegen-xeon-react-ui-server` service as per the config below:
 
 ```yaml
-  codegen-xeon-react-ui-server:
-    image: opea/codegen-react-ui:latest
-    ...
-    ports:
-      - "80:5174"
+codegen-xeon-react-ui-server:
+  image: ${REGISTRY:-opea}/codegen-react-ui:${TAG:-latest}
+  container_name: codegen-xeon-react-ui-server
+  environment:
+    - no_proxy=${no_proxy}
+    - https_proxy=${https_proxy}
+    - http_proxy=${http_proxy}
+  depends_on:
+    - codegen-xeon-backend-server
+  ports:
+    - "5174:80"
+  ipc: host
+  restart: always
 ```
 
 ![project-screenshot](../../assets/img/codegen_react.png)
diff --git a/CodeGen/docker/xeon/compose.yaml b/CodeGen/docker/xeon/compose.yaml
index b002a39840..c33a12ef49 100644
--- a/CodeGen/docker/xeon/compose.yaml
+++ b/CodeGen/docker/xeon/compose.yaml
@@ -1,9 +1,6 @@
-
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-version: "3.8"
-
 services:
   tgi-service:
     image: ghcr.io/huggingface/text-generation-inference:1.4
@@ -20,7 +17,7 @@ services:
       HF_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
     command: --model-id ${LLM_MODEL_ID}
   llm:
-    image: opea/llm-tgi:latest
+    image: ${REGISTRY:-opea}/llm-tgi:${TAG:-latest}
     container_name: llm-tgi-server
     depends_on:
       - tgi-service
@@ -35,7 +32,7 @@ services:
       HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
     restart: unless-stopped
   codegen-xeon-backend-server:
-    image: opea/codegen:latest
+    image: ${REGISTRY:-opea}/codegen:${TAG:-latest}
     container_name: codegen-xeon-backend-server
     depends_on:
       - llm
@@ -50,7 +47,7 @@ services:
     ipc: host
     restart: always
   codegen-xeon-ui-server:
-    image: opea/codegen-ui:latest
+    image: ${REGISTRY:-opea}/codegen-ui:${TAG:-latest}
     container_name: codegen-xeon-ui-server
     depends_on:
       - codegen-xeon-backend-server
@@ -63,15 +60,6 @@ services:
       - BASIC_URL=${BACKEND_SERVICE_ENDPOINT}
     ipc: host
     restart: always
-  codegen-xeon-react-ui-server:
-    image: opea/codegen-react-ui:latest
-    container_name: codegen-xeon-react-ui-server
-    depends_on:
-      - codegen-xeon-backend-server
-    ports:
-      - "5174:80"
-    ipc: host
-    restart: always
 
 networks:
   default:
diff --git a/CodeGen/tests/test_codegen_on_gaudi.sh b/CodeGen/tests/test_codegen_on_gaudi.sh
index dd2005a712..2727ca75df 100644
--- a/CodeGen/tests/test_codegen_on_gaudi.sh
+++ b/CodeGen/tests/test_codegen_on_gaudi.sh
@@ -3,33 +3,31 @@
 # SPDX-License-Identifier: Apache-2.0
 
 set -xe
+IMAGE_REPO=${IMAGE_REPO:-"opea"}
+IMAGE_TAG=${IMAGE_TAG:-"latest"}
+echo "REGISTRY=IMAGE_REPO=${IMAGE_REPO}"
+echo "TAG=IMAGE_TAG=${IMAGE_TAG}"
+export REGISTRY=${IMAGE_REPO}
+export TAG=${IMAGE_TAG}
 
 WORKPATH=$(dirname "$PWD")
 LOG_PATH="$WORKPATH/tests"
 ip_address=$(hostname -I | awk '{print $1}')
 
 function build_docker_images() {
-    cd $WORKPATH
+    cd $WORKPATH/docker
     git clone https://github.com/opea-project/GenAIComps.git
-    cd GenAIComps
 
-    docker build -t opea/llm-tgi:latest -f comps/llms/text-generation/tgi/Dockerfile .
+    echo "Build all the images with --no-cache, check docker_image_build.log for details..."
+    service_list="codegen codegen-ui llm-tgi"
+    docker compose -f docker_build_compose.yaml build ${service_list} --no-cache > ${LOG_PATH}/docker_image_build.log
 
     docker pull ghcr.io/huggingface/tgi-gaudi:2.0.1
-
-    cd $WORKPATH/docker
-    docker build --no-cache -t opea/codegen:latest -f Dockerfile .
-
-    cd $WORKPATH/docker/ui
-    docker build --no-cache -t opea/codegen-ui:latest -f docker/Dockerfile .
-    docker build --no-cache --build-arg BACKEND_SERVICE_ENDPOINT=http://${ip_address}:7778/v1/codegen -t opea/codegen--react-ui:latest -f docker/Dockerfile.react .
-
     docker images
 }
 
 function start_services() {
     cd $WORKPATH/docker/gaudi
-
     export LLM_MODEL_ID="Intel/neural-chat-7b-v3-3"
     export TGI_LLM_ENDPOINT="http://${ip_address}:8028"
     export HUGGINGFACEHUB_API_TOKEN=${HUGGINGFACEHUB_API_TOKEN}
@@ -39,17 +37,6 @@ function start_services() {
 
     sed -i "s/backend_address/$ip_address/g" $WORKPATH/docker/ui/svelte/.env
 
-    if [[ "$IMAGE_REPO" != "" ]]; then
-        # Replace the container name with a test-specific name
-        echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
-        sed -i "s#image: opea/codegen:latest#image: opea/codegen:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/codegen-ui:latest#image: opea/codegen-ui:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/codegen-react-ui:latest#image: opea/codegen-react-ui:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose.yaml
-        echo "cat compose.yaml"
-        cat compose.yaml
-    fi
-
     # Start Docker Containers
     docker compose up -d
 
@@ -126,13 +113,16 @@ function validate_frontend() {
     cd $WORKPATH/docker/ui/svelte
     local conda_env_name="OPEA_e2e"
     export PATH=${HOME}/miniforge3/bin/:$PATH
-#    conda remove -n ${conda_env_name} --all -y
-#    conda create -n ${conda_env_name} python=3.12 -y
+    if conda info --envs | grep -q "$conda_env_name"; then
+        echo "$conda_env_name exist!"
+    else
+        conda create -n ${conda_env_name} python=3.12 -y
+    fi
     source activate ${conda_env_name}
 
     sed -i "s/localhost/$ip_address/g" playwright.config.ts
 
-#    conda install -c conda-forge nodejs -y
+    conda install -c conda-forge nodejs -y
     npm install && npm ci && npx playwright install --with-deps
     node -v && npm -v && pip list
 
@@ -156,7 +146,7 @@ function main() {
 
     stop_docker
 
-    if [[ "$IMAGE_REPO" == "" ]]; then build_docker_images; fi
+    if [[ "$IMAGE_REPO" == "opea" ]]; then build_docker_images; fi
     start_services
 
     validate_microservices
diff --git a/CodeGen/tests/test_codegen_on_xeon.sh b/CodeGen/tests/test_codegen_on_xeon.sh
index 987fb8b813..0a781452a4 100644
--- a/CodeGen/tests/test_codegen_on_xeon.sh
+++ b/CodeGen/tests/test_codegen_on_xeon.sh
@@ -3,27 +3,26 @@
 # SPDX-License-Identifier: Apache-2.0
 
 set -xe
+IMAGE_REPO=${IMAGE_REPO:-"opea"}
+IMAGE_TAG=${IMAGE_TAG:-"latest"}
+echo "REGISTRY=IMAGE_REPO=${IMAGE_REPO}"
+echo "TAG=IMAGE_TAG=${IMAGE_TAG}"
+export REGISTRY=${IMAGE_REPO}
+export TAG=${IMAGE_TAG}
 
 WORKPATH=$(dirname "$PWD")
 LOG_PATH="$WORKPATH/tests"
 ip_address=$(hostname -I | awk '{print $1}')
 
 function build_docker_images() {
-    cd $WORKPATH
+    cd $WORKPATH/docker
     git clone https://github.com/opea-project/GenAIComps.git
-    cd GenAIComps
 
-    docker build -t opea/llm-tgi:latest -f comps/llms/text-generation/tgi/Dockerfile .
+    echo "Build all the images with --no-cache, check docker_image_build.log for details..."
+    service_list="codegen codegen-ui llm-tgi"
+    docker compose -f docker_build_compose.yaml build ${service_list} --no-cache > ${LOG_PATH}/docker_image_build.log
 
     docker pull ghcr.io/huggingface/text-generation-inference:1.4
-
-    cd $WORKPATH/docker
-    docker build --no-cache -t opea/codegen:latest -f Dockerfile .
-
-    cd $WORKPATH/docker/ui
-    docker build --no-cache -t opea/codegen-ui:latest -f docker/Dockerfile .
-    docker build --no-cache --build-arg BACKEND_SERVICE_ENDPOINT=http://${ip_address}:7778/v1/codegen -t opea/codegen-react-ui:latest -f docker/Dockerfile.react .
-
     docker images
 }
 
@@ -39,17 +38,6 @@ function start_services() {
 
     sed -i "s/backend_address/$ip_address/g" $WORKPATH/docker/ui/svelte/.env
 
-    if [[ "$IMAGE_REPO" != "" ]]; then
-        # Replace the container name with a test-specific name
-        echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
-        sed -i "s#image: opea/codegen:latest#image: opea/codegen:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/codegen-ui:latest#image: opea/codegen-ui:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/codegen-react-ui:latest#image: opea/codegen-react-ui:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose.yaml
-        echo "cat compose.yaml"
-        cat compose.yaml
-    fi
-
     # Start Docker Containers
     docker compose up -d
 
@@ -126,13 +114,16 @@ function validate_frontend() {
     cd $WORKPATH/docker/ui/svelte
     local conda_env_name="OPEA_e2e"
     export PATH=${HOME}/miniforge3/bin/:$PATH
-#    conda remove -n ${conda_env_name} --all -y
-#    conda create -n ${conda_env_name} python=3.12 -y
+    if conda info --envs | grep -q "$conda_env_name"; then
+        echo "$conda_env_name exist!"
+    else
+        conda create -n ${conda_env_name} python=3.12 -y
+    fi
     source activate ${conda_env_name}
 
     sed -i "s/localhost/$ip_address/g" playwright.config.ts
 
-#    conda install -c conda-forge nodejs -y
+    conda install -c conda-forge nodejs -y
     npm install && npm ci && npx playwright install --with-deps
     node -v && npm -v && pip list
 
@@ -157,7 +148,7 @@ function main() {
 
     stop_docker
 
-    if [[ "$IMAGE_REPO" == "" ]]; then build_docker_images; fi
+    if [[ "$IMAGE_REPO" == "opea" ]]; then build_docker_images; fi
     start_services
 
     validate_microservices
diff --git a/CodeTrans/docker/docker_build_compose.yaml b/CodeTrans/docker/docker_build_compose.yaml
new file mode 100644
index 0000000000..2f2849619d
--- /dev/null
+++ b/CodeTrans/docker/docker_build_compose.yaml
@@ -0,0 +1,24 @@
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
+
+services:
+  codetrans:
+    build:
+      args:
+        http_proxy: ${http_proxy}
+        https_proxy: ${https_proxy}
+        no_proxy: ${no_proxy}
+      dockerfile: ./Dockerfile
+    image: ${REGISTRY:-opea}/codetrans:${TAG:-latest}
+  codetrans-ui:
+    build:
+      context: ui
+      dockerfile: ./docker/Dockerfile
+    extends: codetrans
+    image: ${REGISTRY:-opea}/codetrans-ui:${TAG:-latest}
+  llm-tgi:
+    build:
+      context: GenAIComps
+      dockerfile: comps/llms/text-generation/tgi/Dockerfile
+    extends: codetrans
+    image: ${REGISTRY:-opea}/llm-tgi:${TAG:-latest}
diff --git a/CodeTrans/docker/gaudi/compose.yaml b/CodeTrans/docker/gaudi/compose.yaml
index 88ba9dc72e..e206d13bef 100644
--- a/CodeTrans/docker/gaudi/compose.yaml
+++ b/CodeTrans/docker/gaudi/compose.yaml
@@ -1,9 +1,6 @@
-
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-version: "3.8"
-
 services:
   tgi-service:
     image: ghcr.io/huggingface/tgi-gaudi:2.0.1
@@ -25,7 +22,7 @@ services:
     ipc: host
     command: --model-id ${LLM_MODEL_ID} --max-input-length 1024 --max-total-tokens 2048
   llm:
-    image: opea/llm-tgi:latest
+    image: ${REGISTRY:-opea}/llm-tgi:${TAG:-latest}
     container_name: llm-tgi-gaudi-server
     ports:
       - "9000:9000"
@@ -38,7 +35,7 @@ services:
       HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
     restart: unless-stopped
   codetrans-gaudi-backend-server:
-    image: opea/codetrans:latest
+    image: ${REGISTRY:-opea}/codetrans:${TAG:-latest}
     container_name: codetrans-gaudi-backend-server
     depends_on:
       - tgi-service
@@ -54,7 +51,7 @@ services:
     ipc: host
     restart: always
   codetrans-gaudi-ui-server:
-    image: opea/codetrans-ui:latest
+    image: ${REGISTRY:-opea}/codetrans-ui:${TAG:-latest}
     container_name: codetrans-gaudi-ui-server
     depends_on:
       - codetrans-gaudi-backend-server
diff --git a/CodeTrans/docker/xeon/compose.yaml b/CodeTrans/docker/xeon/compose.yaml
index a236b88769..f4a5ad68aa 100644
--- a/CodeTrans/docker/xeon/compose.yaml
+++ b/CodeTrans/docker/xeon/compose.yaml
@@ -1,9 +1,6 @@
-
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-version: "3.8"
-
 services:
   tgi-service:
     image: ghcr.io/huggingface/text-generation-inference:1.4
@@ -20,7 +17,7 @@ services:
       HF_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
     command: --model-id ${LLM_MODEL_ID}
   llm:
-    image: opea/llm-tgi:latest
+    image: ${REGISTRY:-opea}/llm-tgi:${TAG:-latest}
     container_name: llm-tgi-server
     ports:
       - "9000:9000"
@@ -33,7 +30,7 @@ services:
       HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
     restart: unless-stopped
   codetrans-xeon-backend-server:
-    image: opea/codetrans:latest
+    image: ${REGISTRY:-opea}/codetrans:${TAG:-latest}
     container_name: codetrans-xeon-backend-server
     depends_on:
       - tgi-service
@@ -49,7 +46,7 @@ services:
     ipc: host
     restart: always
   codetrans-xeon-ui-server:
-    image: opea/codetrans-ui:latest
+    image: ${REGISTRY:-opea}/codetrans-ui:${TAG:-latest}
     container_name: codetrans-xeon-ui-server
     depends_on:
       - codetrans-xeon-backend-server
diff --git a/CodeTrans/tests/test_codetrans_on_gaudi.sh b/CodeTrans/tests/test_codetrans_on_gaudi.sh
index c3b22f5237..fc48a5139c 100644
--- a/CodeTrans/tests/test_codetrans_on_gaudi.sh
+++ b/CodeTrans/tests/test_codetrans_on_gaudi.sh
@@ -2,27 +2,27 @@
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-set -x
+set -xe
+IMAGE_REPO=${IMAGE_REPO:-"opea"}
+IMAGE_TAG=${IMAGE_TAG:-"latest"}
+echo "REGISTRY=IMAGE_REPO=${IMAGE_REPO}"
+echo "TAG=IMAGE_TAG=${IMAGE_TAG}"
+export REGISTRY=${IMAGE_REPO}
+export TAG=${IMAGE_TAG}
 
 WORKPATH=$(dirname "$PWD")
 LOG_PATH="$WORKPATH/tests"
 ip_address=$(hostname -I | awk '{print $1}')
 
 function build_docker_images() {
-    cd $WORKPATH
+    cd $WORKPATH/docker
     git clone https://github.com/opea-project/GenAIComps.git
-    cd GenAIComps
 
-    docker build -t opea/llm-tgi:latest -f comps/llms/text-generation/tgi/Dockerfile .
+    echo "Build all the images with --no-cache, check docker_image_build.log for details..."
+    service_list="codetrans codetrans-ui llm-tgi"
+    docker compose -f docker_build_compose.yaml build ${service_list} --no-cache > ${LOG_PATH}/docker_image_build.log
 
     docker pull ghcr.io/huggingface/tgi-gaudi:2.0.1
-
-    cd $WORKPATH/docker
-    docker build --no-cache -t opea/codetrans:latest -f Dockerfile .
-
-    cd $WORKPATH/docker/ui
-    docker build --no-cache -t opea/codetrans-ui:latest -f docker/Dockerfile .
-
     docker images
 }
 
@@ -40,16 +40,6 @@ function start_services() {
 
     sed -i "s/backend_address/$ip_address/g" $WORKPATH/docker/ui/svelte/.env
 
-    if [[ "$IMAGE_REPO" != "" ]]; then
-        # Replace the container name with a test-specific name
-        echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
-        sed -i "s#image: opea/codetrans:latest#image: opea/codetrans:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/codetrans-ui:latest#image: opea/codetrans-ui:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose.yaml
-        echo "cat compose.yaml"
-        cat compose.yaml
-    fi
-
     # Start Docker Containers
     docker compose up -d
 
@@ -124,13 +114,16 @@ function validate_frontend() {
     cd $WORKPATH/docker/ui/svelte
     local conda_env_name="OPEA_e2e"
     export PATH=${HOME}/miniforge3/bin/:$PATH
-#    conda remove -n ${conda_env_name} --all -y
-#    conda create -n ${conda_env_name} python=3.12 -y
+    if conda info --envs | grep -q "$conda_env_name"; then
+        echo "$conda_env_name exist!"
+    else
+        conda create -n ${conda_env_name} python=3.12 -y
+    fi
     source activate ${conda_env_name}
 
     sed -i "s/localhost/$ip_address/g" playwright.config.ts
 
-#    conda install -c conda-forge nodejs -y
+    conda install -c conda-forge nodejs -y
     npm install && npm ci && npx playwright install --with-deps
     node -v && npm -v && pip list
 
@@ -155,7 +148,7 @@ function main() {
 
     stop_docker
 
-    if [[ "$IMAGE_REPO" == "" ]]; then build_docker_images; fi
+    if [[ "$IMAGE_REPO" == "opea" ]]; then build_docker_images; fi
     start_services
 
     validate_microservices
diff --git a/CodeTrans/tests/test_codetrans_on_xeon.sh b/CodeTrans/tests/test_codetrans_on_xeon.sh
index fdb134edfe..4ae4d8024e 100644
--- a/CodeTrans/tests/test_codetrans_on_xeon.sh
+++ b/CodeTrans/tests/test_codetrans_on_xeon.sh
@@ -3,24 +3,26 @@
 # SPDX-License-Identifier: Apache-2.0
 
 set -xe
+IMAGE_REPO=${IMAGE_REPO:-"opea"}
+IMAGE_TAG=${IMAGE_TAG:-"latest"}
+echo "REGISTRY=IMAGE_REPO=${IMAGE_REPO}"
+echo "TAG=IMAGE_TAG=${IMAGE_TAG}"
+export REGISTRY=${IMAGE_REPO}
+export TAG=${IMAGE_TAG}
 
 WORKPATH=$(dirname "$PWD")
 LOG_PATH="$WORKPATH/tests"
 ip_address=$(hostname -I | awk '{print $1}')
 
 function build_docker_images() {
-    cd $WORKPATH
-    git clone https://github.com/opea-project/GenAIComps.git
-    cd GenAIComps
-
-    docker build -t opea/llm-tgi:latest -f comps/llms/text-generation/tgi/Dockerfile .
-
     cd $WORKPATH/docker
-    docker build --no-cache -t opea/codetrans:latest -f Dockerfile .
+    git clone https://github.com/opea-project/GenAIComps.git
 
-    cd $WORKPATH/docker/ui
-    docker build --no-cache -t opea/codetrans-ui:latest -f docker/Dockerfile .
+    echo "Build all the images with --no-cache, check docker_image_build.log for details..."
+    service_list="codetrans codetrans-ui llm-tgi"
+    docker compose -f docker_build_compose.yaml build ${service_list} --no-cache > ${LOG_PATH}/docker_image_build.log
 
+    docker pull ghcr.io/huggingface/text-generation-inference:1.4
     docker images
 }
 
@@ -37,16 +39,6 @@ function start_services() {
 
     sed -i "s/backend_address/$ip_address/g" $WORKPATH/docker/ui/svelte/.env
 
-    if [[ "$IMAGE_REPO" != "" ]]; then
-        # Replace the container name with a test-specific name
-        echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
-        sed -i "s#image: opea/codetrans:latest#image: opea/codetrans:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/codetrans-ui:latest#image: opea/codetrans-ui:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose.yaml
-        echo "cat compose.yaml"
-        cat compose.yaml
-    fi
-
     # Start Docker Containers
     docker compose up -d
 
@@ -123,13 +115,16 @@ function validate_frontend() {
     cd $WORKPATH/docker/ui/svelte
     local conda_env_name="OPEA_e2e"
     export PATH=${HOME}/miniforge3/bin/:$PATH
-#    conda remove -n ${conda_env_name} --all -y
-#    conda create -n ${conda_env_name} python=3.12 -y
+    if conda info --envs | grep -q "$conda_env_name"; then
+        echo "$conda_env_name exist!"
+    else
+        conda create -n ${conda_env_name} python=3.12 -y
+    fi
     source activate ${conda_env_name}
 
     sed -i "s/localhost/$ip_address/g" playwright.config.ts
 
-#    conda install -c conda-forge nodejs -y
+    conda install -c conda-forge nodejs -y
     npm install && npm ci && npx playwright install --with-deps
     node -v && npm -v && pip list
 
@@ -153,7 +148,7 @@ function main() {
 
     stop_docker
 
-    if [[ "$IMAGE_REPO" == "" ]]; then build_docker_images; fi
+    if [[ "$IMAGE_REPO" == "opea" ]]; then build_docker_images; fi
     start_services
 
     validate_microservices
diff --git a/DocSum/docker/docker_build_compose.yaml b/DocSum/docker/docker_build_compose.yaml
new file mode 100644
index 0000000000..a7e4a565dd
--- /dev/null
+++ b/DocSum/docker/docker_build_compose.yaml
@@ -0,0 +1,30 @@
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
+
+services:
+  docsum:
+    build:
+      args:
+        http_proxy: ${http_proxy}
+        https_proxy: ${https_proxy}
+        no_proxy: ${no_proxy}
+      dockerfile: ./Dockerfile
+    image: ${REGISTRY:-opea}/docsum:${TAG:-latest}
+  docsum-ui:
+    build:
+      context: ui
+      dockerfile: ./docker/Dockerfile
+    extends: docsum
+    image: ${REGISTRY:-opea}/docsum-ui:${TAG:-latest}
+  docsum-react-ui:
+    build:
+      context: ui
+      dockerfile: ./docker/Dockerfile.react
+    extends: docsum
+    image: ${REGISTRY:-opea}/docsum-react-ui:${TAG:-latest}
+  llm-docsum-tgi:
+    build:
+      context: GenAIComps
+      dockerfile: comps/llms/summarization/tgi/Dockerfile
+    extends: docsum
+    image: ${REGISTRY:-opea}/llm-docsum-tgi:${TAG:-latest}
diff --git a/DocSum/docker/gaudi/README.md b/DocSum/docker/gaudi/README.md
index d7a3202e54..742e7202fa 100644
--- a/DocSum/docker/gaudi/README.md
+++ b/DocSum/docker/gaudi/README.md
@@ -127,7 +127,24 @@ Here is an example for summarizing a article.
 
 ![image](https://github.com/intel-ai-tce/GenAIExamples/assets/21761437/67ecb2ec-408d-4e81-b124-6ded6b833f55)
 
-## 🚀 Launch the React UI
+## 🚀 Launch the React UI (Optional)
+
+To access the React-based frontend, modify the UI service in the `compose.yaml` file. Replace `docsum-xeon-ui-server` service with the `docsum-xeon-react-ui-server` service as per the config below:
+
+```yaml
+docsum-gaudi-react-ui-server:
+  image: ${REGISTRY:-opea}/docsum-react-ui:${TAG:-latest}
+  container_name: docsum-gaudi-react-ui-server
+  depends_on:
+    - docsum-gaudi-backend-server
+  ports:
+    - "5174:80"
+  environment:
+    - no_proxy=${no_proxy}
+    - https_proxy=${https_proxy}
+    - http_proxy=${http_proxy}
+    - DOC_BASE_URL=${BACKEND_SERVICE_ENDPOINT}
+```
 
 Open this URL `http://{host_ip}:5175` in your browser to access the frontend.
 
diff --git a/DocSum/docker/gaudi/compose.yaml b/DocSum/docker/gaudi/compose.yaml
index 2a2a8dbaaf..78cb90ae1c 100644
--- a/DocSum/docker/gaudi/compose.yaml
+++ b/DocSum/docker/gaudi/compose.yaml
@@ -1,9 +1,6 @@
-
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-version: "3.8"
-
 services:
   tgi-service:
     image: ghcr.io/huggingface/tgi-gaudi:2.0.1
@@ -24,7 +21,7 @@ services:
     ipc: host
     command: --model-id ${LLM_MODEL_ID} --max-input-length 1024 --max-total-tokens 2048
   llm:
-    image: opea/llm-docsum-tgi:latest
+    image: ${REGISTRY:-opea}/llm-docsum-tgi:${TAG:-latest}
     container_name: llm-docsum-gaudi-server
     depends_on:
       - tgi-service
@@ -39,7 +36,7 @@ services:
       HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
     restart: unless-stopped
   docsum-gaudi-backend-server:
-    image: opea/docsum:latest
+    image: ${REGISTRY:-opea}/docsum:${TAG:-latest}
     container_name: docsum-gaudi-backend-server
     depends_on:
       - tgi-service
@@ -55,7 +52,7 @@ services:
     ipc: host
     restart: always
   docsum-gaudi-ui-server:
-    image: opea/docsum-ui:latest
+    image: ${REGISTRY:-opea}/docsum-ui:${TAG:-latest}
     container_name: docsum-gaudi-ui-server
     depends_on:
       - docsum-gaudi-backend-server
@@ -68,15 +65,6 @@ services:
       - DOC_BASE_URL=${BACKEND_SERVICE_ENDPOINT}
     ipc: host
     restart: always
-  docsum-xeon-react-ui-server:
-    image: opea/docsum-react-ui:latest
-    container_name: docsum-gaudi-react-ui-server
-    depends_on:
-      - docsum-gaudi-backend-server
-    ports:
-      - "5174:80"
-    environment:
-      - DOC_BASE_URL=${BACKEND_SERVICE_ENDPOINT}
 
 networks:
   default:
diff --git a/DocSum/docker/xeon/README.md b/DocSum/docker/xeon/README.md
index c272d1619b..7d310c98b2 100644
--- a/DocSum/docker/xeon/README.md
+++ b/DocSum/docker/xeon/README.md
@@ -135,6 +135,24 @@ Open this URL `http://{host_ip}:5174` in your browser to access the React based
 
 ![project-screenshot](../../assets/img/docSum_ui_text.png)
 
-### React UI
+### React UI (Optional)
+
+To access the React-based frontend, modify the UI service in the `compose.yaml` file. Replace `docsum-xeon-ui-server` service with the `docsum-xeon-react-ui-server` service as per the config below:
+
+```yaml
+docsum-xeon-react-ui-server:
+  image: ${REGISTRY:-opea}/docsum-react-ui:${TAG:-latest}
+  container_name: docsum-xeon-react-ui-server
+  depends_on:
+    - docsum-xeon-backend-server
+  ports:
+    - "5174:80"
+  environment:
+    - no_proxy=${no_proxy}
+    - https_proxy=${https_proxy}
+    - http_proxy=${http_proxy}
+  ipc: host
+  restart: always
+```
 
 ![preject-react-screenshot](../../assets/img/docsum-ui-react.png)
diff --git a/DocSum/docker/xeon/compose.yaml b/DocSum/docker/xeon/compose.yaml
index facd70463f..33c92ce52d 100644
--- a/DocSum/docker/xeon/compose.yaml
+++ b/DocSum/docker/xeon/compose.yaml
@@ -1,9 +1,6 @@
-
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-version: "3.8"
-
 services:
   tgi-service:
     image: ghcr.io/huggingface/text-generation-inference:1.4
@@ -21,7 +18,7 @@ services:
     shm_size: 1g
     command: --model-id ${LLM_MODEL_ID}
   llm:
-    image: opea/llm-docsum-tgi:latest
+    image: ${REGISTRY:-opea}/llm-docsum-tgi:${TAG:-latest}
     container_name: llm-docsum-server
     depends_on:
       - tgi-service
@@ -36,7 +33,7 @@ services:
       HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
     restart: unless-stopped
   docsum-xeon-backend-server:
-    image: opea/docsum:latest
+    image: ${REGISTRY:-opea}/docsum:${TAG:-latest}
     container_name: docsum-xeon-backend-server
     depends_on:
       - tgi-service
@@ -52,7 +49,7 @@ services:
     ipc: host
     restart: always
   docsum-xeon-ui-server:
-    image: opea/docsum-ui:latest
+    image: ${REGISTRY:-opea}/docsum-ui:${TAG:-latest}
     container_name: docsum-xeon-ui-server
     depends_on:
       - docsum-xeon-backend-server
@@ -65,15 +62,6 @@ services:
       - DOC_BASE_URL=${BACKEND_SERVICE_ENDPOINT}
     ipc: host
     restart: always
-  docsum-xeon-react-ui-server:
-    image: opea/docsum-react-ui:latest
-    container_name: docsum-xeon-react-ui-server
-    depends_on:
-      - docsum-xeon-backend-server
-    ports:
-      - "5174:80"
-    ipc: host
-    restart: always
 
 networks:
   default:
diff --git a/DocSum/tests/test_docsum_on_gaudi.sh b/DocSum/tests/test_docsum_on_gaudi.sh
index 983f02870c..0906bd906c 100644
--- a/DocSum/tests/test_docsum_on_gaudi.sh
+++ b/DocSum/tests/test_docsum_on_gaudi.sh
@@ -2,28 +2,27 @@
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-set -x
+set -e
+IMAGE_REPO=${IMAGE_REPO:-"opea"}
+IMAGE_TAG=${IMAGE_TAG:-"latest"}
+echo "REGISTRY=IMAGE_REPO=${IMAGE_REPO}"
+echo "TAG=IMAGE_TAG=${IMAGE_TAG}"
+export REGISTRY=${IMAGE_REPO}
+export TAG=${IMAGE_TAG}
 
 WORKPATH=$(dirname "$PWD")
 LOG_PATH="$WORKPATH/tests"
 ip_address=$(hostname -I | awk '{print $1}')
 
 function build_docker_images() {
-    cd $WORKPATH
+    cd $WORKPATH/docker
     git clone https://github.com/opea-project/GenAIComps.git
-    cd GenAIComps
 
-    docker build --no-cache -t opea/llm-docsum-tgi:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/llms/summarization/tgi/Dockerfile .
+    echo "Build all the images with --no-cache, check docker_image_build.log for details..."
+    service_list="docsum docsum-ui llm-docsum-tgi"
+    docker compose -f docker_build_compose.yaml build ${service_list} --no-cache > ${LOG_PATH}/docker_image_build.log
 
     docker pull ghcr.io/huggingface/tgi-gaudi:2.0.1
-
-    cd $WORKPATH/docker
-    docker build --no-cache -t opea/docsum:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f Dockerfile .
-
-    cd $WORKPATH/docker/ui
-    docker build --no-cache -t opea/docsum-ui:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f docker/Dockerfile .
-    docker build --no-cache -t opea/docsum-react-ui:latest --build-arg BACKEND_SERVICE_ENDPOINT=http://${ip_address}:8888/v1/docsum -f docker/Dockerfile.react .
-
     docker images
 }
 
@@ -39,17 +38,6 @@ function start_services() {
 
     sed -i "s/backend_address/$ip_address/g" $WORKPATH/docker/ui/svelte/.env
 
-    if [[ "$IMAGE_REPO" != "" ]]; then
-        # Replace the container name with a test-specific name
-        echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
-        sed -i "s#image: opea/docsum:latest#image: opea/docsum:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/docsum-ui:latest#image: opea/docsum-ui:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/docsum-react-ui:latest#image: opea/docsum-react-ui:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose.yaml
-        echo "cat compose.yaml"
-        cat compose.yaml
-    fi
-
     # Start Docker Containers
     docker compose up -d
 
@@ -126,13 +114,16 @@ function validate_frontend() {
     cd $WORKPATH/docker/ui/svelte
     local conda_env_name="OPEA_e2e"
     export PATH=${HOME}/miniforge3/bin/:$PATH
-#    conda remove -n ${conda_env_name} --all -y
-#    conda create -n ${conda_env_name} python=3.12 -y
+    if conda info --envs | grep -q "$conda_env_name"; then
+        echo "$conda_env_name exist!"
+    else
+        conda create -n ${conda_env_name} python=3.12 -y
+    fi
     source activate ${conda_env_name}
 
     sed -i "s/localhost/$ip_address/g" playwright.config.ts
 
-#    conda install -c conda-forge nodejs -y
+    conda install -c conda-forge nodejs -y
     npm install && npm ci && npx playwright install --with-deps
     node -v && npm -v && pip list
 
@@ -156,7 +147,7 @@ function main() {
 
     stop_docker
 
-    if [[ "$IMAGE_REPO" == "" ]]; then build_docker_images; fi
+    if [[ "$IMAGE_REPO" == "opea" ]]; then build_docker_images; fi
     start_services
 
     validate_microservices
diff --git a/DocSum/tests/test_docsum_on_xeon.sh b/DocSum/tests/test_docsum_on_xeon.sh
index 991a3751b0..e9bc7a8c00 100644
--- a/DocSum/tests/test_docsum_on_xeon.sh
+++ b/DocSum/tests/test_docsum_on_xeon.sh
@@ -2,26 +2,27 @@
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-set -x
+set -xe
+IMAGE_REPO=${IMAGE_REPO:-"opea"}
+IMAGE_TAG=${IMAGE_TAG:-"latest"}
+echo "REGISTRY=IMAGE_REPO=${IMAGE_REPO}"
+echo "TAG=IMAGE_TAG=${IMAGE_TAG}"
+export REGISTRY=${IMAGE_REPO}
+export TAG=${IMAGE_TAG}
 
 WORKPATH=$(dirname "$PWD")
 LOG_PATH="$WORKPATH/tests"
 ip_address=$(hostname -I | awk '{print $1}')
 
 function build_docker_images() {
-    cd $WORKPATH
-    git clone https://github.com/opea-project/GenAIComps.git
-    cd GenAIComps
-
-    docker build --no-cache -t opea/llm-docsum-tgi:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/llms/summarization/tgi/Dockerfile .
-
     cd $WORKPATH/docker
-    docker build --no-cache -t opea/docsum:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f Dockerfile .
+    git clone https://github.com/opea-project/GenAIComps.git
 
-    cd $WORKPATH/docker/ui
-    docker build --no-cache -t opea/docsum-ui:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f docker/Dockerfile .
-    docker build --no-cache -t opea/docsum-react-ui:latest --build-arg BACKEND_SERVICE_ENDPOINT=http://${ip_address}:8888/v1/docsum -f docker/Dockerfile.react .
+    echo "Build all the images with --no-cache, check docker_image_build.log for details..."
+    service_list="docsum docsum-ui llm-docsum-tgi"
+    docker compose -f docker_build_compose.yaml build ${service_list} --no-cache > ${LOG_PATH}/docker_image_build.log
 
+    docker pull ghcr.io/huggingface/text-generation-inference:1.4
     docker images
 }
 
@@ -37,17 +38,6 @@ function start_services() {
 
     sed -i "s/backend_address/$ip_address/g" $WORKPATH/docker/ui/svelte/.env
 
-    if [[ "$IMAGE_REPO" != "" ]]; then
-        # Replace the container name with a test-specific name
-        echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
-        sed -i "s#image: opea/docsum:latest#image: opea/docsum:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/docsum-ui:latest#image: opea/docsum-ui:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/docsum-react-ui:latest#image: opea/docsum-react-ui:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose.yaml
-        echo "cat compose.yaml"
-        cat compose.yaml
-    fi
-
     # Start Docker Containers
     docker compose up -d
 
@@ -123,13 +113,16 @@ function validate_frontend() {
     cd $WORKPATH/docker/ui/svelte
     local conda_env_name="OPEA_e2e"
     export PATH=${HOME}/miniforge3/bin/:$PATH
-#    conda remove -n ${conda_env_name} --all -y
-#    conda create -n ${conda_env_name} python=3.12 -y
+    if conda info --envs | grep -q "$conda_env_name"; then
+        echo "$conda_env_name exist!"
+    else
+        conda create -n ${conda_env_name} python=3.12 -y
+    fi
     source activate ${conda_env_name}
 
     sed -i "s/localhost/$ip_address/g" playwright.config.ts
 
-#    conda install -c conda-forge nodejs -y
+    conda install -c conda-forge nodejs -y
     npm install && npm ci && npx playwright install --with-deps
     node -v && npm -v && pip list
 
@@ -153,7 +146,7 @@ function main() {
 
     stop_docker
 
-    if [[ "$IMAGE_REPO" == "" ]]; then build_docker_images; fi
+    if [[ "$IMAGE_REPO" == "opea" ]]; then build_docker_images; fi
     start_services
 
     validate_microservices
diff --git a/FaqGen/docker/docker_build_compose.yaml b/FaqGen/docker/docker_build_compose.yaml
new file mode 100644
index 0000000000..a80257fc44
--- /dev/null
+++ b/FaqGen/docker/docker_build_compose.yaml
@@ -0,0 +1,30 @@
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
+
+services:
+  faqgen:
+    build:
+      args:
+        http_proxy: ${http_proxy}
+        https_proxy: ${https_proxy}
+        no_proxy: ${no_proxy}
+      dockerfile: ./Dockerfile
+    image: ${REGISTRY:-opea}/faqgen:${TAG:-latest}
+  faqgen-ui:
+    build:
+      context: ui
+      dockerfile: ./docker/Dockerfile
+    extends: faqgen
+    image: ${REGISTRY:-opea}/faqgen-ui:${TAG:-latest}
+  faqgen-react-ui:
+    build:
+      context: ui
+      dockerfile: ./docker/Dockerfile.react
+    extends: faqgen
+    image: ${REGISTRY:-opea}/faqgen-react-ui:${TAG:-latest}
+  llm-faqgen-tgi:
+    build:
+      context: GenAIComps
+      dockerfile: comps/llms/faq-generation/tgi/Dockerfile
+    extends: faqgen
+    image: ${REGISTRY:-opea}/llm-faqgen-tgi:${TAG:-latest}
diff --git a/FaqGen/docker/gaudi/compose.yaml b/FaqGen/docker/gaudi/compose.yaml
index 602105ec23..238e271f6e 100644
--- a/FaqGen/docker/gaudi/compose.yaml
+++ b/FaqGen/docker/gaudi/compose.yaml
@@ -1,8 +1,6 @@
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-version: "3.8"
-
 services:
   tgi-service:
     image: ghcr.io/huggingface/tgi-gaudi:2.0.1
@@ -26,7 +24,7 @@ services:
     ipc: host
     command: --model-id ${LLM_MODEL_ID} --max-input-length 2048 --max-total-tokens 4096 --max-batch-total-tokens 65536 --max-batch-prefill-tokens 4096
   llm_faqgen:
-    image: opea/llm-faqgen-tgi:latest
+    image: ${REGISTRY:-opea}/llm-faqgen-tgi:${TAG:-latest}
     container_name: llm-faqgen-server
     depends_on:
       - tgi-service
@@ -41,7 +39,7 @@ services:
       HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
     restart: unless-stopped
   faqgen-gaudi-backend-server:
-    image: opea/faqgen:latest
+    image: ${REGISTRY:-opea}/faqgen:${TAG:-latest}
     container_name: faqgen-gaudi-backend-server
     depends_on:
       - tgi-service
@@ -57,7 +55,7 @@ services:
     ipc: host
     restart: always
   faqgen-gaudi-ui-server:
-    image: opea/faqgen-ui:latest
+    image: ${REGISTRY:-opea}/faqgen-ui:${TAG:-latest}
     container_name: faqgen-gaudi-ui-server
     depends_on:
       - faqgen-gaudi-backend-server
diff --git a/FaqGen/docker/xeon/compose.yaml b/FaqGen/docker/xeon/compose.yaml
index 00f2d0ed08..406f4ca434 100644
--- a/FaqGen/docker/xeon/compose.yaml
+++ b/FaqGen/docker/xeon/compose.yaml
@@ -1,8 +1,6 @@
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-version: "3.8"
-
 services:
   tgi-service:
     image: ghcr.io/huggingface/text-generation-inference:1.4
@@ -20,7 +18,7 @@ services:
     shm_size: 1g
     command: --model-id ${LLM_MODEL_ID}
   llm_faqgen:
-    image: opea/llm-faqgen-tgi:latest
+    image: ${REGISTRY:-opea}/llm-faqgen-tgi:${TAG:-latest}
     container_name: llm-faqgen-server
     depends_on:
       - tgi-service
@@ -35,7 +33,7 @@ services:
       HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
     restart: unless-stopped
   faqgen-xeon-backend-server:
-    image: opea/faqgen:latest
+    image: ${REGISTRY:-opea}/faqgen:${TAG:-latest}
     container_name: faqgen-xeon-backend-server
     depends_on:
       - tgi-service
@@ -51,7 +49,7 @@ services:
     ipc: host
     restart: always
   faqgen-xeon-ui-server:
-    image: opea/faqgen-ui:latest
+    image: ${REGISTRY:-opea}/faqgen-ui:${TAG:-latest}
     container_name: faqgen-xeon-ui-server
     depends_on:
       - faqgen-xeon-backend-server
diff --git a/FaqGen/tests/test_faqgen_on_gaudi.sh b/FaqGen/tests/test_faqgen_on_gaudi.sh
index c41940d614..17242c1682 100644
--- a/FaqGen/tests/test_faqgen_on_gaudi.sh
+++ b/FaqGen/tests/test_faqgen_on_gaudi.sh
@@ -3,26 +3,26 @@
 # SPDX-License-Identifier: Apache-2.0
 
 set -x
+IMAGE_REPO=${IMAGE_REPO:-"opea"}
+IMAGE_TAG=${IMAGE_TAG:-"latest"}
+echo "REGISTRY=IMAGE_REPO=${IMAGE_REPO}"
+echo "TAG=IMAGE_TAG=${IMAGE_TAG}"
+export REGISTRY=${IMAGE_REPO}
+export TAG=${IMAGE_TAG}
 
 WORKPATH=$(dirname "$PWD")
 LOG_PATH="$WORKPATH/tests"
 ip_address=$(hostname -I | awk '{print $1}')
 
 function build_docker_images() {
-    cd $WORKPATH
-
-    git clone https://github.com/opea-project/GenAIComps.git
-    cd GenAIComps
-    docker build --no-cache -t opea/llm-faqgen-tgi:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/llms/faq-generation/tgi/Dockerfile .
-
-    docker pull ghcr.io/huggingface/tgi-gaudi:1.2.1
-
     cd $WORKPATH/docker
-    docker build --no-cache -t opea/faqgen:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f Dockerfile .
+    git clone https://github.com/opea-project/GenAIComps.git
 
-    cd $WORKPATH/docker/ui
-    docker build --no-cache -t opea/faqgen-ui:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f docker/Dockerfile .
+    echo "Build all the images with --no-cache, check docker_image_build.log for details..."
+    service_list="faqgen faqgen-ui llm-faqgen-tgi"
+    docker compose -f docker_build_compose.yaml build ${service_list} --no-cache > ${LOG_PATH}/docker_image_build.log
 
+    docker pull ghcr.io/huggingface/tgi-gaudi:1.2.1
     docker images
 }
 
@@ -38,14 +38,6 @@ function start_services() {
 
     sed -i "s/backend_address/$ip_address/g" $WORKPATH/docker/ui/svelte/.env
 
-    # if [[ "$IMAGE_REPO" != "" ]]; then
-    #     # Replace the container name with a test-specific name
-    #     echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
-    #     sed -i "s#image: opea/faqgen:latest#image: opea/faqgen:${IMAGE_TAG}#g" compose.yaml
-    #     sed -i "s#image: opea/faqgen-ui:latest#image: opea/faqgen-ui:${IMAGE_TAG}#g" compose.yaml
-    #     sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose.yaml
-    # fi
-
     # Start Docker Containers
     docker compose up -d
 
@@ -122,13 +114,16 @@ function validate_frontend() {
     cd $WORKPATH/docker/ui/svelte
     local conda_env_name="OPEA_e2e"
     export PATH=${HOME}/miniforge3/bin/:$PATH
-#    conda remove -n ${conda_env_name} --all -y
-#    conda create -n ${conda_env_name} python=3.12 -y
+    if conda info --envs | grep -q "$conda_env_name"; then
+        echo "$conda_env_name exist!"
+    else
+        conda create -n ${conda_env_name} python=3.12 -y
+    fi
     source activate ${conda_env_name}
 
     sed -i "s/localhost/$ip_address/g" playwright.config.ts
 
-#    conda install -c conda-forge nodejs -y
+    conda install -c conda-forge nodejs -y
     npm install && npm ci && npx playwright install --with-deps
     node -v && npm -v && pip list
 
@@ -152,7 +147,7 @@ function main() {
 
     stop_docker
 
-    build_docker_images
+    if [[ "$IMAGE_REPO" == "opea" ]]; then build_docker_images; fi
     start_services
 
     validate_microservices
diff --git a/FaqGen/tests/test_faqgen_on_xeon.sh b/FaqGen/tests/test_faqgen_on_xeon.sh
index b0b694f211..8e2e0a1e3c 100755
--- a/FaqGen/tests/test_faqgen_on_xeon.sh
+++ b/FaqGen/tests/test_faqgen_on_xeon.sh
@@ -3,25 +3,26 @@
 # SPDX-License-Identifier: Apache-2.0
 
 set -x
+IMAGE_REPO=${IMAGE_REPO:-"opea"}
+IMAGE_TAG=${IMAGE_TAG:-"latest"}
+echo "REGISTRY=IMAGE_REPO=${IMAGE_REPO}"
+echo "TAG=IMAGE_TAG=${IMAGE_TAG}"
+export REGISTRY=${IMAGE_REPO}
+export TAG=${IMAGE_TAG}
 
 WORKPATH=$(dirname "$PWD")
 LOG_PATH="$WORKPATH/tests"
 ip_address=$(hostname -I | awk '{print $1}')
 
 function build_docker_images() {
-    cd $WORKPATH
-
-    git clone https://github.com/opea-project/GenAIComps.git
-    cd GenAIComps
-
-    docker build --no-cache -t opea/llm-faqgen-tgi:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/llms/faq-generation/tgi/Dockerfile .
-
     cd $WORKPATH/docker
-    docker build --no-cache -t opea/faqgen:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f Dockerfile .
+    git clone https://github.com/opea-project/GenAIComps.git
 
-    cd $WORKPATH/docker/ui
-    docker build --no-cache -t opea/faqgen-ui:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f docker/Dockerfile .
+    echo "Build all the images with --no-cache, check docker_image_build.log for details..."
+    service_list="faqgen faqgen-ui llm-faqgen-tgi"
+    docker compose -f docker_build_compose.yaml build ${service_list} --no-cache > ${LOG_PATH}/docker_image_build.log
 
+    docker pull ghcr.io/huggingface/text-generation-inference:1.4
     docker images
 }
 
@@ -37,14 +38,6 @@ function start_services() {
 
     sed -i "s/backend_address/$ip_address/g" $WORKPATH/docker/ui/svelte/.env
 
-    # if [[ "$IMAGE_REPO" != "" ]]; then
-    #     # Replace the container name with a test-specific name
-    #     echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
-    #     sed -i "s#image: opea/faqgen:latest#image: opea/faqgen:${IMAGE_TAG}#g" compose.yaml
-    #     sed -i "s#image: opea/faqgen-ui:latest#image: opea/faqgen-ui:${IMAGE_TAG}#g" compose.yaml
-    #     sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose.yaml
-    # fi
-
     # Start Docker Containers
     docker compose up -d
 
@@ -121,13 +114,16 @@ function validate_frontend() {
     cd $WORKPATH/docker/ui/svelte
     local conda_env_name="OPEA_e2e"
     export PATH=${HOME}/miniforge3/bin/:$PATH
-#    conda remove -n ${conda_env_name} --all -y
-#    conda create -n ${conda_env_name} python=3.12 -y
+    if conda info --envs | grep -q "$conda_env_name"; then
+        echo "$conda_env_name exist!"
+    else
+        conda create -n ${conda_env_name} python=3.12 -y
+    fi
     source activate ${conda_env_name}
 
     sed -i "s/localhost/$ip_address/g" playwright.config.ts
 
-#    conda install -c conda-forge nodejs -y
+    conda install -c conda-forge nodejs -y
     npm install && npm ci && npx playwright install --with-deps
     node -v && npm -v && pip list
 
@@ -151,7 +147,7 @@ function main() {
 
     stop_docker
 
-    build_docker_images
+    if [[ "$IMAGE_REPO" == "opea" ]]; then build_docker_images; fi
     start_services
 
     validate_microservices
diff --git a/SearchQnA/docker/docker_build_compose.yaml b/SearchQnA/docker/docker_build_compose.yaml
new file mode 100644
index 0000000000..a31edd3431
--- /dev/null
+++ b/SearchQnA/docker/docker_build_compose.yaml
@@ -0,0 +1,48 @@
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
+
+services:
+  searchqna:
+    build:
+      args:
+        http_proxy: ${http_proxy}
+        https_proxy: ${https_proxy}
+        no_proxy: ${no_proxy}
+      dockerfile: ./Dockerfile
+    image: ${REGISTRY:-opea}/searchqna:${TAG:-latest}
+  searchqna-ui:
+    build:
+      context: ui
+      dockerfile: ./docker/Dockerfile
+    extends: searchqna
+    image: ${REGISTRY:-opea}/searchqna-ui:${TAG:-latest}
+  embedding-tei:
+    build:
+      context: GenAIComps
+      dockerfile: comps/embeddings/langchain/docker/Dockerfile
+    extends: searchqna
+    image: ${REGISTRY:-opea}/embedding-tei:${TAG:-latest}
+  web-retriever-chroma:
+    build:
+      context: GenAIComps
+      dockerfile: comps/web_retrievers/langchain/chroma/docker/Dockerfile
+    extends: searchqna
+    image: ${REGISTRY:-opea}/web-retriever-chroma:${TAG:-latest}
+  reranking-tei:
+    build:
+      context: GenAIComps
+      dockerfile: comps/reranks/tei/docker/Dockerfile
+    extends: searchqna
+    image: ${REGISTRY:-opea}/reranking-tei:${TAG:-latest}
+  llm-tgi:
+    build:
+      context: GenAIComps
+      dockerfile: comps/llms/text-generation/tgi/Dockerfile
+    extends: searchqna
+    image: ${REGISTRY:-opea}/llm-tgi:${TAG:-latest}
+  tei-gaudi:
+    build:
+      context: tei-gaudi
+      dockerfile: Dockerfile-hpu
+    extends: searchqna
+    image: ${REGISTRY:-opea}/tei-gaudi:${TAG:-latest}
diff --git a/SearchQnA/docker/gaudi/compose.yaml b/SearchQnA/docker/gaudi/compose.yaml
index dc191f5b8f..ee3b32b6f0 100644
--- a/SearchQnA/docker/gaudi/compose.yaml
+++ b/SearchQnA/docker/gaudi/compose.yaml
@@ -1,12 +1,9 @@
-
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-version: "3.8"
-
 services:
   tei-embedding-service:
-    image: opea/tei-gaudi:latest
+    image: ${REGISTRY:-opea}/tei-gaudi:${TAG:-latest}
     container_name: tei-embedding-gaudi-server
     ports:
       - "3001:80"
@@ -27,7 +24,7 @@ services:
       ENABLE_EXPERIMENTAL_FLAGS: true
     command: --model-id ${EMBEDDING_MODEL_ID} --auto-truncate
   embedding:
-    image: opea/embedding-tei:latest
+    image: ${REGISTRY:-opea}/embedding-tei:${TAG:-latest}
     container_name: embedding-tei-server
     depends_on:
       - tei-embedding-service
@@ -41,7 +38,7 @@ services:
       TEI_EMBEDDING_ENDPOINT: ${TEI_EMBEDDING_ENDPOINT}
     restart: unless-stopped
   web-retriever:
-    image: opea/web-retriever-chroma:latest
+    image: ${REGISTRY:-opea}/web-retriever-chroma:${TAG:-latest}
     container_name: web-retriever-chroma-server
     ports:
       - "3003:7077"
@@ -68,7 +65,7 @@ services:
       https_proxy: ${https_proxy}
     command: --model-id ${RERANK_MODEL_ID} --auto-truncate
   reranking:
-    image: opea/reranking-tei:latest
+    image: ${REGISTRY:-opea}/reranking-tei:${TAG:-latest}
     container_name: reranking-tei-xeon-server
     depends_on:
       - tei-reranking-service
@@ -104,7 +101,7 @@ services:
     ipc: host
     command: --model-id ${LLM_MODEL_ID} --max-input-length 1024 --max-total-tokens 2048
   llm:
-    image: opea/llm-tgi:latest
+    image: ${REGISTRY:-opea}/llm-tgi:${TAG:-latest}
     container_name: llm-tgi-gaudi-server
     depends_on:
       - tgi-service
@@ -121,7 +118,7 @@ services:
       HF_HUB_ENABLE_HF_TRANSFER: 0
     restart: unless-stopped
   searchqna-gaudi-backend-server:
-    image: opea/searchqna:latest
+    image: ${REGISTRY:-opea}/searchqna:${TAG:-latest}
     container_name: searchqna-gaudi-backend-server
     depends_on:
       - tei-embedding-service
@@ -149,7 +146,7 @@ services:
     ipc: host
     restart: always
   searchqna-gaudi-ui-server:
-    image: opea/searchqna-ui:latest
+    image: ${REGISTRY:-opea}/searchqna-ui:${TAG:-latest}
     container_name: searchqna-gaudi-ui-server
     depends_on:
       - searchqna-gaudi-backend-server
diff --git a/SearchQnA/docker/xeon/compose.yaml b/SearchQnA/docker/xeon/compose.yaml
index 37c4232c3a..cdbf87e0e3 100644
--- a/SearchQnA/docker/xeon/compose.yaml
+++ b/SearchQnA/docker/xeon/compose.yaml
@@ -1,9 +1,6 @@
-
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-version: "3.8"
-
 services:
   tei-embedding-service:
     image: ghcr.io/huggingface/text-embeddings-inference:cpu-1.5
@@ -19,7 +16,7 @@ services:
       https_proxy: ${https_proxy}
     command: --model-id ${EMBEDDING_MODEL_ID} --auto-truncate
   embedding:
-    image: opea/embedding-tei:latest
+    image: ${REGISTRY:-opea}/embedding-tei:${TAG:-latest}
     container_name: embedding-tei-server
     depends_on:
       - tei-embedding-service
@@ -34,7 +31,7 @@ services:
       HF_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
     restart: unless-stopped
   web-retriever:
-    image: opea/web-retriever-chroma:latest
+    image: ${REGISTRY:-opea}/web-retriever-chroma:${TAG:-latest}
     container_name: web-retriever-chroma-server
     ports:
       - "3003:7077"
@@ -61,7 +58,7 @@ services:
       https_proxy: ${https_proxy}
     command: --model-id ${RERANK_MODEL_ID} --auto-truncate
   reranking:
-    image: opea/reranking-tei:latest
+    image: ${REGISTRY:-opea}/reranking-tei:${TAG:-latest}
     container_name: reranking-tei-xeon-server
     depends_on:
       - tei-reranking-service
@@ -90,7 +87,7 @@ services:
       HF_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
     command: --model-id ${LLM_MODEL_ID}
   llm:
-    image: opea/llm-tgi:latest
+    image: ${REGISTRY:-opea}/llm-tgi:${TAG:-latest}
     container_name: llm-tgi-server
     depends_on:
       - tgi-service
@@ -105,7 +102,7 @@ services:
       HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
     restart: unless-stopped
   searchqna-xeon-backend-server:
-    image: opea/searchqna:latest
+    image: ${REGISTRY:-opea}/searchqna:${TAG:-latest}
     container_name: searchqna-xeon-backend-server
     depends_on:
       - tei-embedding-service
@@ -133,7 +130,7 @@ services:
     ipc: host
     restart: always
   searchqna-gaudi-ui-server:
-    image: opea/searchqna-ui:latest
+    image: ${REGISTRY:-opea}/searchqna-ui:${TAG:-latest}
     container_name: searchqna-xeon-ui-server
     depends_on:
       - searchqna-xeon-backend-server
diff --git a/SearchQnA/tests/test_searchqna_on_gaudi.sh b/SearchQnA/tests/test_searchqna_on_gaudi.sh
index 60e57ccb93..072ba688b9 100644
--- a/SearchQnA/tests/test_searchqna_on_gaudi.sh
+++ b/SearchQnA/tests/test_searchqna_on_gaudi.sh
@@ -2,46 +2,33 @@
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-# for test
-
 set -xe
+IMAGE_REPO=${IMAGE_REPO:-"opea"}
+IMAGE_TAG=${IMAGE_TAG:-"latest"}
+echo "REGISTRY=IMAGE_REPO=${IMAGE_REPO}"
+echo "TAG=IMAGE_TAG=${IMAGE_TAG}"
+export REGISTRY=${IMAGE_REPO}
+export TAG=${IMAGE_TAG}
 
 WORKPATH=$(dirname "$PWD")
 LOG_PATH="$WORKPATH/tests"
 ip_address=$(hostname -I | awk '{print $1}')
 
 function build_docker_images() {
-    cd $WORKPATH
+    cd $WORKPATH/docker
     git clone https://github.com/opea-project/GenAIComps.git
-    cd GenAIComps
-
-    docker build --no-cache -t opea/embedding-tei:latest  -f comps/embeddings/langchain/docker/Dockerfile .
-    docker build --no-cache -t opea/web-retriever-chroma:latest  -f comps/web_retrievers/langchain/chroma/docker/Dockerfile .
-    docker build --no-cache -t opea/reranking-tei:latest  -f comps/reranks/tei/docker/Dockerfile .
-    docker build --no-cache -t opea/llm-tgi:latest  -f comps/llms/text-generation/tgi/Dockerfile .
+    git clone https://github.com/huggingface/tei-gaudi
 
-#    cd ..
-#    git clone https://github.com/huggingface/tei-gaudi
-#    cd tei-gaudi/
-#    docker build --no-cache -f Dockerfile-hpu -t opea/tei-gaudi:latest .
+    echo "Build all the images with --no-cache, check docker_image_build.log for details..."
+    service_list="searchqna searchqna-ui embedding-tei web-retriever-chroma reranking-tei llm-tgi tei-gaudi"
+    docker compose -f docker_build_compose.yaml build ${service_list} --no-cache > ${LOG_PATH}/docker_image_build.log
 
     docker pull ghcr.io/huggingface/text-embeddings-inference:cpu-1.5
     docker pull ghcr.io/huggingface/tgi-gaudi:2.0.1
-    cd $WORKPATH/docker
-    docker build --no-cache -t opea/searchqna:latest -f Dockerfile .
-
-    cd $WORKPATH/docker/ui
-    docker build --no-cache -t opea/searchqna-ui:latest -f docker/Dockerfile .
-
     docker images
 }
 
 function start_services() {
-    # build tei-gaudi for each test instead of pull from local registry
-    cd $WORKPATH
-    git clone https://github.com/huggingface/tei-gaudi
-    cd tei-gaudi/
-    docker build --no-cache -f Dockerfile-hpu -t opea/tei-gaudi:latest .
 
     cd $WORKPATH/docker/gaudi
     export GOOGLE_CSE_ID=$GOOGLE_CSE_ID
@@ -71,17 +58,6 @@ function start_services() {
 
     sed -i "s/backend_address/$ip_address/g" $WORKPATH/docker/ui/svelte/.env
 
-    if [[ "$IMAGE_REPO" != "" ]]; then
-        # Replace the container name with a test-specific name
-        echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
-        sed -i "s#image: opea/searchqna:latest#image: opea/searchqna:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/searchqna-ui:latest#image: opea/searchqna-ui:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose.yaml
-        sed -i "s#image: ${IMAGE_REPO}opea/tei-gaudi:latest#image: opea/tei-gaudi:latest#g" compose.yaml
-        echo "cat compose.yaml"
-        cat compose.yaml
-    fi
-
     # Start Docker Containers
     docker compose up -d
     n=0
@@ -118,13 +94,16 @@ function validate_frontend() {
     local conda_env_name="OPEA_e2e"
 
     export PATH=${HOME}/miniforge3/bin/:$PATH
-    #    conda remove -n ${conda_env_name} --all -y
-    #    conda create -n ${conda_env_name} python=3.12 -y
+    if conda info --envs | grep -q "$conda_env_name"; then
+        echo "$conda_env_name exist!"
+    else
+        conda create -n ${conda_env_name} python=3.12 -y
+    fi
     source activate ${conda_env_name}
 
     sed -i "s/localhost/$ip_address/g" playwright.config.ts
 
-    #    conda install -c conda-forge nodejs -y
+    conda install -c conda-forge nodejs -y
     npm install && npm ci && npx playwright install --with-deps
     node -v && npm -v && pip list
 
@@ -147,7 +126,7 @@ function stop_docker() {
 function main() {
 
     stop_docker
-    if [[ "$IMAGE_REPO" == "" ]]; then build_docker_images; fi
+    if [[ "$IMAGE_REPO" == "opea" ]]; then build_docker_images; fi
     start_services
 
     validate_megaservice
diff --git a/SearchQnA/tests/test_searchqna_on_xeon.sh b/SearchQnA/tests/test_searchqna_on_xeon.sh
index 31f8c0b0be..583723a090 100644
--- a/SearchQnA/tests/test_searchqna_on_xeon.sh
+++ b/SearchQnA/tests/test_searchqna_on_xeon.sh
@@ -3,28 +3,27 @@
 # SPDX-License-Identifier: Apache-2.0
 
 set -xe
+IMAGE_REPO=${IMAGE_REPO:-"opea"}
+IMAGE_TAG=${IMAGE_TAG:-"latest"}
+echo "REGISTRY=IMAGE_REPO=${IMAGE_REPO}"
+echo "TAG=IMAGE_TAG=${IMAGE_TAG}"
+export REGISTRY=${IMAGE_REPO}
+export TAG=${IMAGE_TAG}
 
 WORKPATH=$(dirname "$PWD")
 LOG_PATH="$WORKPATH/tests"
 ip_address=$(hostname -I | awk '{print $1}')
 
 function build_docker_images() {
-    cd $WORKPATH
+    cd $WORKPATH/docker
     git clone https://github.com/opea-project/GenAIComps.git
-    cd GenAIComps
 
-    docker build -t opea/embedding-tei:latest  -f comps/embeddings/langchain/docker/Dockerfile .
-    docker build -t opea/web-retriever-chroma:latest  -f comps/web_retrievers/langchain/chroma/docker/Dockerfile .
-    docker build -t opea/reranking-tei:latest  -f comps/reranks/tei/docker/Dockerfile .
-    docker build -t opea/llm-tgi:latest  -f comps/llms/text-generation/tgi/Dockerfile .
+    echo "Build all the images with --no-cache, check docker_image_build.log for details..."
+    service_list="searchqna searchqna-ui embedding-tei web-retriever-chroma reranking-tei llm-tgi"
+    docker compose -f docker_build_compose.yaml build ${service_list} --no-cache > ${LOG_PATH}/docker_image_build.log
+
     docker pull ghcr.io/huggingface/text-embeddings-inference:cpu-1.5
     docker pull ghcr.io/huggingface/text-generation-inference:1.4
-    cd $WORKPATH/docker
-    docker build -t opea/searchqna:latest -f Dockerfile .
-
-    cd $WORKPATH/docker/ui
-    docker build --no-cache -t opea/searchqna-ui:latest -f docker/Dockerfile .
-
     docker images
 }
 
@@ -57,25 +56,15 @@ function start_services() {
 
     sed -i "s/backend_address/$ip_address/g" $WORKPATH/docker/ui/svelte/.env
 
-    if [[ "$IMAGE_REPO" != "" ]]; then
-        # Replace the container name with a test-specific name
-        echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
-        sed -i "s#image: opea/searchqna:latest#image: opea/searchqna:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/searchqna-ui:latest#image: opea/searchqna-ui:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose.yaml
-        echo "cat compose.yaml"
-        cat compose.yaml
-    fi
-
     # Start Docker Containers
     docker compose up -d
     n=0
-    until [[ "$n" -ge 200 ]]; do
+    until [[ "$n" -ge 100 ]]; do
         docker logs tgi-service > $LOG_PATH/tgi_service_start.log
         if grep -q Connected $LOG_PATH/tgi_service_start.log; then
             break
         fi
-        sleep 1s
+        sleep 5s
         n=$((n+1))
     done
 }
@@ -97,28 +86,31 @@ function validate_megaservice() {
 }
 
 function validate_frontend() {
-   cd $WORKPATH/docker/ui/svelte
-   local conda_env_name="OPEA_e2e"
-   export PATH=${HOME}/miniforge3/bin/:$PATH
-#    conda remove -n ${conda_env_name} --all -y
-#    conda create -n ${conda_env_name} python=3.12 -y
-   source activate ${conda_env_name}
+    cd $WORKPATH/docker/ui/svelte
+    local conda_env_name="OPEA_e2e"
+    export PATH=${HOME}/miniforge3/bin/:$PATH
+    if conda info --envs | grep -q "$conda_env_name"; then
+        echo "$conda_env_name exist!"
+    else
+        conda create -n ${conda_env_name} python=3.12 -y
+    fi
+    source activate ${conda_env_name}
 
-   sed -i "s/localhost/$ip_address/g" playwright.config.ts
+    sed -i "s/localhost/$ip_address/g" playwright.config.ts
 
-#    conda install -c conda-forge nodejs -y
-   npm install && npm ci && npx playwright install --with-deps
-   node -v && npm -v && pip list
+    conda install -c conda-forge nodejs -y
+    npm install && npm ci && npx playwright install --with-deps
+    node -v && npm -v && pip list
 
-   exit_status=0
-   npx playwright test || exit_status=$?
+    exit_status=0
+    npx playwright test || exit_status=$?
 
-   if [ $exit_status -ne 0 ]; then
+    if [ $exit_status -ne 0 ]; then
        echo "[TEST INFO]: ---------frontend test failed---------"
        exit $exit_status
-   else
+    else
        echo "[TEST INFO]: ---------frontend test passed---------"
-   fi
+    fi
 }
 
 function stop_docker() {
@@ -129,7 +121,7 @@ function stop_docker() {
 function main() {
 
     stop_docker
-    if [[ "$IMAGE_REPO" == "" ]]; then build_docker_images; fi
+    if [[ "$IMAGE_REPO" == "opea" ]]; then build_docker_images; fi
     start_services
 
     validate_megaservice
diff --git a/Translation/docker/docker_build_compose.yaml b/Translation/docker/docker_build_compose.yaml
new file mode 100644
index 0000000000..5b2dea9ac3
--- /dev/null
+++ b/Translation/docker/docker_build_compose.yaml
@@ -0,0 +1,18 @@
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
+
+services:
+  translation:
+    build:
+      args:
+        http_proxy: ${http_proxy}
+        https_proxy: ${https_proxy}
+        no_proxy: ${no_proxy}
+      dockerfile: ./Dockerfile
+    image: ${REGISTRY:-opea}/translation:${TAG:-latest}
+  translation-ui:
+    build:
+      context: ui
+      dockerfile: ./docker/Dockerfile
+    extends: translation
+    image: ${REGISTRY:-opea}/translation-ui:${TAG:-latest}
diff --git a/Translation/docker/gaudi/compose.yaml b/Translation/docker/gaudi/compose.yaml
index 1d77edcbb0..2388f85214 100644
--- a/Translation/docker/gaudi/compose.yaml
+++ b/Translation/docker/gaudi/compose.yaml
@@ -1,18 +1,5 @@
-# Copyright (c) 2024 Intel Corporation
-#
-# 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.
-
-version: "3.8"
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
 
 services:
   tgi-service:
@@ -29,7 +16,7 @@ services:
       - "./data:/data"
     command: --model-id ${LLM_MODEL_ID} --max-input-length 1024 --max-total-tokens 2048
   llm:
-    image: opea/llm-tgi:latest
+    image: ${REGISTRY:-opea}/llm-tgi:${TAG:-latest}
     container_name: llm-tgi-gaudi-server
     depends_on:
       - tgi-service
@@ -43,7 +30,7 @@ services:
       HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
     restart: unless-stopped
   translation-gaudi-backend-server:
-    image: opea/translation:latest
+    image: ${REGISTRY:-opea}/translation:${TAG:-latest}
     container_name: translation-gaudi-backend-server
     depends_on:
       - tgi-service
@@ -58,7 +45,7 @@ services:
     ipc: host
     restart: always
   translation-gaudi-ui-server:
-    image: opea/translation-ui:latest
+    image: ${REGISTRY:-opea}/translation-ui:${TAG:-latest}
     container_name: translation-gaudi-ui-server
     depends_on:
       - translation-gaudi-backend-server
diff --git a/Translation/docker/xeon/compose.yaml b/Translation/docker/xeon/compose.yaml
index 697c90a800..da7a43763f 100644
--- a/Translation/docker/xeon/compose.yaml
+++ b/Translation/docker/xeon/compose.yaml
@@ -1,18 +1,5 @@
-# Copyright (c) 2024 Intel Corporation
-#
-# 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.
-
-version: "3.8"
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
 
 services:
   tgi-service:
@@ -30,7 +17,7 @@ services:
     shm_size: 1g
     command: --model-id ${LLM_MODEL_ID}
   llm:
-    image: opea/llm-tgi:latest
+    image: ${REGISTRY:-opea}/llm-tgi:${TAG:-latest}
     container_name: llm-tgi-server
     depends_on:
       - tgi-service
@@ -44,7 +31,7 @@ services:
       HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
     restart: unless-stopped
   translation-xeon-backend-server:
-    image: opea/translation:latest
+    image: ${REGISTRY:-opea}/translation:${TAG:-latest}
     container_name: translation-xeon-backend-server
     depends_on:
       - tgi-service
@@ -59,7 +46,7 @@ services:
     ipc: host
     restart: always
   translation-xeon-ui-server:
-    image: opea/translation-ui:latest
+    image: ${REGISTRY:-opea}/translation-ui:${TAG:-latest}
     container_name: translation-xeon-ui-server
     depends_on:
       - translation-xeon-backend-server
diff --git a/Translation/tests/test_translation_on_gaudi.sh b/Translation/tests/test_translation_on_gaudi.sh
index c5060a165a..47aa96a259 100644
--- a/Translation/tests/test_translation_on_gaudi.sh
+++ b/Translation/tests/test_translation_on_gaudi.sh
@@ -3,25 +3,26 @@
 # SPDX-License-Identifier: Apache-2.0
 
 set -x
+IMAGE_REPO=${IMAGE_REPO:-"opea"}
+IMAGE_TAG=${IMAGE_TAG:-"latest"}
+echo "REGISTRY=IMAGE_REPO=${IMAGE_REPO}"
+echo "TAG=IMAGE_TAG=${IMAGE_TAG}"
+export REGISTRY=${IMAGE_REPO}
+export TAG=${IMAGE_TAG}
 
 WORKPATH=$(dirname "$PWD")
 LOG_PATH="$WORKPATH/tests"
 ip_address=$(hostname -I | awk '{print $1}')
 
 function build_docker_images() {
-    cd $WORKPATH
+    cd $WORKPATH/docker
     git clone https://github.com/opea-project/GenAIComps.git
-    cd GenAIComps
-    docker build --no-cache -t opea/llm-tgi:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/llms/text-generation/tgi/Dockerfile .
 
-    cd $WORKPATH/docker
-    docker build --no-cache -t opea/translation:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f Dockerfile .
+    echo "Build all the images with --no-cache, check docker_image_build.log for details..."
+    service_list="translation translation-ui llm-tgi"
+    docker compose -f docker_build_compose.yaml build ${service_list} --no-cache > ${LOG_PATH}/docker_image_build.log
 
     docker pull ghcr.io/huggingface/tgi-gaudi:2.0.1
-
-    cd $WORKPATH/docker/ui
-    docker build --no-cache -t opea/translation-ui:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f docker/Dockerfile .
-
     docker images
 }
 
@@ -37,16 +38,6 @@ function start_services() {
 
     sed -i "s/backend_address/$ip_address/g" $WORKPATH/docker/ui/svelte/.env
 
-    if [[ "$IMAGE_REPO" != "" ]]; then
-        # Replace the container name with a test-specific name
-        echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
-        sed -i "s#image: opea/translation:latest#image: opea/translation:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/translation-ui:latest#image: opea/translation-ui:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose.yaml
-        echo "cat compose.yaml"
-        cat compose.yaml
-    fi
-
     # Start Docker Containers
     docker compose up -d
 
@@ -126,13 +117,16 @@ function validate_frontend() {
     cd $WORKPATH/docker/ui/svelte
     local conda_env_name="OPEA_e2e"
     export PATH=${HOME}/miniforge3/bin/:$PATH
-#    conda remove -n ${conda_env_name} --all -y
-#    conda create -n ${conda_env_name} python=3.12 -y
+    if conda info --envs | grep -q "$conda_env_name"; then
+        echo "$conda_env_name exist!"
+    else
+        conda create -n ${conda_env_name} python=3.12 -y
+    fi
     source activate ${conda_env_name}
 
     sed -i "s/localhost/$ip_address/g" playwright.config.ts
 
-#    conda install -c conda-forge nodejs -y
+    conda install -c conda-forge nodejs -y
     npm install && npm ci && npx playwright install --with-deps
     node -v && npm -v && pip list
 
@@ -156,7 +150,7 @@ function main() {
 
     stop_docker
 
-    if [[ "$IMAGE_REPO" == "" ]]; then build_docker_images; fi
+    if [[ "$IMAGE_REPO" == "opea" ]]; then build_docker_images; fi
     start_services
 
     validate_microservices
diff --git a/Translation/tests/test_translation_on_xeon.sh b/Translation/tests/test_translation_on_xeon.sh
index 3f460a23bc..2b67833d66 100644
--- a/Translation/tests/test_translation_on_xeon.sh
+++ b/Translation/tests/test_translation_on_xeon.sh
@@ -3,24 +3,26 @@
 # SPDX-License-Identifier: Apache-2.0
 
 set -x
+IMAGE_REPO=${IMAGE_REPO:-"opea"}
+IMAGE_TAG=${IMAGE_TAG:-"latest"}
+echo "REGISTRY=IMAGE_REPO=${IMAGE_REPO}"
+echo "TAG=IMAGE_TAG=${IMAGE_TAG}"
+export REGISTRY=${IMAGE_REPO}
+export TAG=${IMAGE_TAG}
 
 WORKPATH=$(dirname "$PWD")
 LOG_PATH="$WORKPATH/tests"
 ip_address=$(hostname -I | awk '{print $1}')
 
 function build_docker_images() {
-    cd $WORKPATH
-    git clone https://github.com/opea-project/GenAIComps.git
-    cd GenAIComps
-
-    docker build --no-cache -t opea/llm-tgi:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/llms/text-generation/tgi/Dockerfile .
-
     cd $WORKPATH/docker
-    docker build --no-cache -t opea/translation:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f Dockerfile .
+    git clone https://github.com/opea-project/GenAIComps.git
 
-    cd $WORKPATH/docker/ui
-    docker build --no-cache -t opea/translation-ui:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f docker/Dockerfile .
+    echo "Build all the images with --no-cache, check docker_image_build.log for details..."
+    service_list="translation translation-ui llm-tgi"
+    docker compose -f docker_build_compose.yaml build ${service_list} --no-cache > ${LOG_PATH}/docker_image_build.log
 
+    docker pull ghcr.io/huggingface/text-generation-inference:1.4
     docker images
 }
 
@@ -36,16 +38,6 @@ function start_services() {
 
     sed -i "s/backend_address/$ip_address/g" $WORKPATH/docker/ui/svelte/.env
 
-    if [[ "$IMAGE_REPO" != "" ]]; then
-        # Replace the container name with a test-specific name
-        echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
-        sed -i "s#image: opea/translation:latest#image: opea/translation:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/translation-ui:latest#image: opea/translation-ui:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose.yaml
-        echo "cat compose.yaml"
-        cat compose.yaml
-    fi
-
     # Start Docker Containers
     docker compose up -d
 
@@ -123,13 +115,16 @@ function validate_frontend() {
     cd $WORKPATH/docker/ui/svelte
     local conda_env_name="OPEA_e2e"
     export PATH=${HOME}/miniforge3/bin/:$PATH
-#    conda remove -n ${conda_env_name} --all -y
-#    conda create -n ${conda_env_name} python=3.12 -y
+    if conda info --envs | grep -q "$conda_env_name"; then
+        echo "$conda_env_name exist!"
+    else
+        conda create -n ${conda_env_name} python=3.12 -y
+    fi
     source activate ${conda_env_name}
 
     sed -i "s/localhost/$ip_address/g" playwright.config.ts
 
-#    conda install -c conda-forge nodejs -y
+    conda install -c conda-forge nodejs -y
     npm install && npm ci && npx playwright install --with-deps
     node -v && npm -v && pip list
 
@@ -153,7 +148,7 @@ function main() {
 
     stop_docker
 
-    if [[ "$IMAGE_REPO" == "" ]]; then build_docker_images; fi
+    if [[ "$IMAGE_REPO" == "opea" ]]; then build_docker_images; fi
     start_services
 
     validate_microservices
diff --git a/VisualQnA/docker/gaudi/compose.yaml b/VisualQnA/docker/gaudi/compose.yaml
index 98445056e3..2162329993 100644
--- a/VisualQnA/docker/gaudi/compose.yaml
+++ b/VisualQnA/docker/gaudi/compose.yaml
@@ -1,12 +1,9 @@
-
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-version: "3.8"
-
 services:
   llava-tgi-service:
-    image: opea/llava-tgi:latest
+    image: ${REGISTRY:-opea}/llava-tgi:${TAG:-latest}
     container_name: tgi-llava-gaudi-server
     ports:
       - "8399:80"
@@ -26,7 +23,7 @@ services:
     ipc: host
     command: --model-id ${LVM_MODEL_ID} --max-input-length 4096 --max-total-tokens 8192
   lvm-tgi:
-    image: opea/lvm-tgi:latest
+    image: ${REGISTRY:-opea}/lvm-tgi:${TAG:-latest}
     container_name: lvm-tgi-gaudi-server
     depends_on:
       - llava-tgi-service
@@ -42,7 +39,7 @@ services:
       HF_HUB_ENABLE_HF_TRANSFER: 0
     restart: unless-stopped
   visualqna-gaudi-backend-server:
-    image: opea/visualqna:latest
+    image: ${REGISTRY:-opea}/visualqna:${TAG:-latest}
     container_name: visualqna-gaudi-backend-server
     depends_on:
       - llava-tgi-service
@@ -58,7 +55,7 @@ services:
     ipc: host
     restart: always
   visualqna-gaudi-ui-server:
-    image: opea/visualqna-ui:latest
+    image: ${REGISTRY:-opea}/visualqna-ui:${TAG:-latest}
     container_name: visualqna-gaudi-ui-server
     depends_on:
       - visualqna-gaudi-backend-server
diff --git a/VisualQnA/docker/xeon/compose.yaml b/VisualQnA/docker/xeon/compose.yaml
index b43e30f31b..e38f64cf9c 100644
--- a/VisualQnA/docker/xeon/compose.yaml
+++ b/VisualQnA/docker/xeon/compose.yaml
@@ -1,12 +1,9 @@
-
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-version: "3.8"
-
 services:
   llava-tgi-service:
-    image: opea/llava-tgi-xeon:latest
+    image: ${REGISTRY:-opea}/llava-tgi-xeon:${TAG:-latest}
     container_name: tgi-llava-xeon-server
     ports:
       - "9399:80"
@@ -21,7 +18,7 @@ services:
       HF_HUB_ENABLE_HF_TRANSFER: 0
     command: --model-id ${LVM_MODEL_ID} --max-input-length 4096 --max-total-tokens 8192 --cuda-graphs 0
   lvm-tgi:
-    image: opea/lvm-tgi:latest
+    image: ${REGISTRY:-opea}/lvm-tgi:${TAG:-latest}
     container_name: lvm-tgi-server
     depends_on:
       - llava-tgi-service
@@ -37,7 +34,7 @@ services:
       HF_HUB_ENABLE_HF_TRANSFER: 0
     restart: unless-stopped
   visualqna-xeon-backend-server:
-    image: opea/visualqna:latest
+    image: ${REGISTRY:-opea}/visualqna:${TAG:-latest}
     container_name: visualqna-xeon-backend-server
     depends_on:
       - llava-tgi-service
@@ -53,7 +50,7 @@ services:
     ipc: host
     restart: always
   visualqna-xeon-ui-server:
-    image: opea/visualqna-ui:latest
+    image: ${REGISTRY:-opea}/visualqna-ui:${TAG:-latest}
     container_name: visualqna-xeon-ui-server
     depends_on:
       - visualqna-xeon-backend-server

From 33d2753b30c19bca1924c9ad73f95c57b909bc72 Mon Sep 17 00:00:00 2001
From: "chen, suyue" <suyue.chen@intel.com>
Date: Fri, 16 Aug 2024 00:22:24 +0800
Subject: [PATCH 06/57] Fix left issues in CI/CD structure refactor (#599)

Signed-off-by: chensuyue <suyue.chen@intel.com>
---
 CodeGen/docker/docker_build_compose.yaml       | 2 +-
 DocSum/tests/test_docsum_on_gaudi.sh           | 2 +-
 DocSum/tests/test_docsum_on_xeon.sh            | 2 +-
 Translation/docker/docker_build_compose.yaml   | 6 ++++++
 Translation/tests/test_translation_on_gaudi.sh | 6 +++---
 Translation/tests/test_translation_on_xeon.sh  | 2 +-
 6 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/CodeGen/docker/docker_build_compose.yaml b/CodeGen/docker/docker_build_compose.yaml
index bc1db1194a..f68dfa8a53 100644
--- a/CodeGen/docker/docker_build_compose.yaml
+++ b/CodeGen/docker/docker_build_compose.yaml
@@ -27,4 +27,4 @@ services:
       context: GenAIComps
       dockerfile: comps/llms/text-generation/tgi/Dockerfile
     extends: codegen
-    image: ${REGISTRY}opea/llm-tgi:${TAG:-latest}
+    image: ${REGISTRY:-opea}/llm-tgi:${TAG:-latest}
diff --git a/DocSum/tests/test_docsum_on_gaudi.sh b/DocSum/tests/test_docsum_on_gaudi.sh
index 0906bd906c..8cd1da774c 100644
--- a/DocSum/tests/test_docsum_on_gaudi.sh
+++ b/DocSum/tests/test_docsum_on_gaudi.sh
@@ -104,7 +104,7 @@ function validate_megaservice() {
     # Curl the Mega Service
     validate_services \
     "${ip_address}:8888/v1/docsum" \
-    "versatile toolkit" \
+    "toolkit" \
     "mega-docsum" \
     "docsum-gaudi-backend-server" \
     '{"messages": "Text Embeddings Inference (TEI) is a toolkit for deploying and serving open source text embeddings and sequence classification models. TEI enables high-performance extraction for the most popular models, including FlagEmbedding, Ember, GTE and E5."}'
diff --git a/DocSum/tests/test_docsum_on_xeon.sh b/DocSum/tests/test_docsum_on_xeon.sh
index e9bc7a8c00..22415f34f2 100644
--- a/DocSum/tests/test_docsum_on_xeon.sh
+++ b/DocSum/tests/test_docsum_on_xeon.sh
@@ -103,7 +103,7 @@ function validate_megaservice() {
     # Curl the Mega Service
     validate_services \
     "${ip_address}:8888/v1/docsum" \
-    "versatile toolkit" \
+    "toolkit" \
     "mega-docsum" \
     "docsum-xeon-backend-server" \
     '{"messages": "Text Embeddings Inference (TEI) is a toolkit for deploying and serving open source text embeddings and sequence classification models. TEI enables high-performance extraction for the most popular models, including FlagEmbedding, Ember, GTE and E5."}'
diff --git a/Translation/docker/docker_build_compose.yaml b/Translation/docker/docker_build_compose.yaml
index 5b2dea9ac3..05da618777 100644
--- a/Translation/docker/docker_build_compose.yaml
+++ b/Translation/docker/docker_build_compose.yaml
@@ -16,3 +16,9 @@ services:
       dockerfile: ./docker/Dockerfile
     extends: translation
     image: ${REGISTRY:-opea}/translation-ui:${TAG:-latest}
+  llm-tgi:
+    build:
+      context: GenAIComps
+      dockerfile: comps/llms/text-generation/tgi/Dockerfile
+    extends: translation
+    image: ${REGISTRY:-opea}/llm-tgi:${TAG:-latest}
diff --git a/Translation/tests/test_translation_on_gaudi.sh b/Translation/tests/test_translation_on_gaudi.sh
index 47aa96a259..8262c54f08 100644
--- a/Translation/tests/test_translation_on_gaudi.sh
+++ b/Translation/tests/test_translation_on_gaudi.sh
@@ -2,7 +2,7 @@
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-set -x
+set -xe
 IMAGE_REPO=${IMAGE_REPO:-"opea"}
 IMAGE_TAG=${IMAGE_TAG:-"latest"}
 echo "REGISTRY=IMAGE_REPO=${IMAGE_REPO}"
@@ -42,12 +42,12 @@ function start_services() {
     docker compose up -d
 
     n=0
-    until [[ "$n" -ge 500 ]]; do
+    until [[ "$n" -ge 100 ]]; do
         docker logs tgi-gaudi-server > ${LOG_PATH}/tgi_service_start.log
         if grep -q Connected ${LOG_PATH}/tgi_service_start.log; then
             break
         fi
-        sleep 1s
+        sleep 5s
         n=$((n+1))
     done
 }
diff --git a/Translation/tests/test_translation_on_xeon.sh b/Translation/tests/test_translation_on_xeon.sh
index 2b67833d66..e0e61523cf 100644
--- a/Translation/tests/test_translation_on_xeon.sh
+++ b/Translation/tests/test_translation_on_xeon.sh
@@ -2,7 +2,7 @@
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-set -x
+set -xe
 IMAGE_REPO=${IMAGE_REPO:-"opea"}
 IMAGE_TAG=${IMAGE_TAG:-"latest"}
 echo "REGISTRY=IMAGE_REPO=${IMAGE_REPO}"

From d3b4e085da67fa529adc5cea816c59c1c0a3921f Mon Sep 17 00:00:00 2001
From: "chen, suyue" <suyue.chen@intel.com>
Date: Fri, 16 Aug 2024 00:22:40 +0800
Subject: [PATCH 07/57] Add BoM collect workflow and image publish workflow
 (#600)

Signed-off-by: chensuyue <suyue.chen@intel.com>
---
 .github/workflows/_example-workflow.yml       | 41 ++--------
 .github/workflows/manual-bom-scan.yml         | 74 +++++++++++++++++++
 .github/workflows/manual-docker-publish.yml   | 68 +++++++++++++++++
 ...rkflow.yml => manual-example-workflow.yml} | 16 +---
 4 files changed, 151 insertions(+), 48 deletions(-)
 create mode 100644 .github/workflows/manual-bom-scan.yml
 create mode 100644 .github/workflows/manual-docker-publish.yml
 rename .github/workflows/{manual-cd-workflow.yml => manual-example-workflow.yml} (82%)

diff --git a/.github/workflows/_example-workflow.yml b/.github/workflows/_example-workflow.yml
index c293a8b1ef..7e86ed288b 100644
--- a/.github/workflows/_example-workflow.yml
+++ b/.github/workflows/_example-workflow.yml
@@ -32,14 +32,6 @@ on:
         default: false
         required: false
         type: boolean
-      publish:
-        default: false
-        required: false
-        type: boolean
-      publish_tags:
-        default: "latest"
-        required: false
-        type: string
       GenAIComps_branch:
         default: "main"
         required: false
@@ -83,7 +75,7 @@ jobs:
 ####################################################################################################
 # Trivy Scan
 ####################################################################################################
-  image-list:
+  get-image-list:
     needs: [build-images]
     if: ${{ fromJSON(inputs.scan) && inputs.node == 'gaudi' }}
     runs-on: ubuntu-latest
@@ -97,16 +89,16 @@ jobs:
         id: scan-matrix
         run: |
           pip install yq
-          compose_path=${{ github.workspace }}/.github/workflows/docker/compose/${{ inputs.example }}-compose.yaml
+          compose_path=${{ github.workspace }}/${{ inputs.example }}/docker/docker_build_compose.yaml
           echo "matrix=$(cat ${compose_path} | yq -r '.[]' | jq 'keys' | jq -c '.')" >> $GITHUB_OUTPUT
 
   scan-images:
-    needs: [image-list, build-images]
+    needs: [get-image-list, build-images]
     if: ${{ fromJSON(inputs.scan) && inputs.node == 'gaudi'}}
     runs-on: "docker-build-${{ inputs.node }}"
     strategy:
       matrix:
-        image: ${{ fromJSON(needs.image-list.outputs.matrix) }}
+        image: ${{ fromJSON(needs.get-image-list.outputs.matrix) }}
       fail-fast: false
     steps:
       - name: Pull Image
@@ -118,7 +110,7 @@ jobs:
         uses: opea-project/validation/actions/trivy-scan@main
         with:
           image-ref: ${{ env.OPEA_IMAGE_REPO }}opea/${{ matrix.image }}:${{ inputs.tag }}
-          output: ${{ inputs.example }}-${{ matrix.image }}-scan.txt
+          output: ${{ matrix.image }}-scan.txt
 
       - name: Cleanup
         if: always()
@@ -126,8 +118,8 @@ jobs:
 
       - uses: actions/upload-artifact@v4.3.4
         with:
-          name: ${{ inputs.example }}-${{ matrix.image }}-scan
-          path: ${{ inputs.example }}-${{ matrix.image }}-scan.txt
+          name: ${{ matrix.image }}-scan
+          path: ${{ matrix.image }}-scan.txt
           overwrite: true
 
 ####################################################################################################
@@ -156,22 +148,3 @@ jobs:
       hardware: ${{ inputs.node }}
       tag: ${{ inputs.tag }}
     secrets: inherit
-
-
-####################################################################################################
-# Publish
-####################################################################################################
-  publish:
-    needs: [image-list, build-images, scan-images, test-example-compose]
-    if: ${{ fromJSON(inputs.publish) && inputs.node == 'gaudi' }}
-    strategy:
-      matrix:
-        image: ${{ fromJSON(needs.image-list.outputs.matrix) }}
-    runs-on: "docker-build-gaudi"
-    steps:
-      - name: Image Publish
-        uses: opea-project/validation/actions/image-publish@main
-        with:
-          local_image_ref: ${OPEA_IMAGE_REPO}opea/${{ matrix.image }}:${{ inputs.tag }}
-          image_name: opea/${{ matrix.image }}
-          publish_tags: ${{ inputs.publish_tags }}
diff --git a/.github/workflows/manual-bom-scan.yml b/.github/workflows/manual-bom-scan.yml
new file mode 100644
index 0000000000..4be4600f48
--- /dev/null
+++ b/.github/workflows/manual-bom-scan.yml
@@ -0,0 +1,74 @@
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
+
+name: Examples docker images BoM scan
+on:
+  workflow_dispatch:
+    inputs:
+      node:
+        default: "gaudi"
+        description: "Hardware to run test"
+        required: true
+        type: string
+      examples:
+        default: "ChatQnA"
+        description: 'List of examples to test [AudioQnA,ChatQnA,CodeGen,CodeTrans,DocSum,FaqGen,SearchQnA,Translation]'
+        required: true
+        type: string
+      tag:
+        default: "latest"
+        description: "Tag to apply to images"
+        required: true
+        type: string
+
+permissions: read-all
+jobs:
+  get-image-list:
+    runs-on: ubuntu-latest
+    outputs:
+      matrix: ${{ steps.scan-matrix.outputs.matrix }}
+    steps:
+      - name: Checkout out Repo
+        uses: actions/checkout@v4
+
+      - name: Set Matrix
+        id: scan-matrix
+        run: |
+          pip install yq
+          examples=($(echo ${{ inputs.examples }} | tr ',' ' '))
+          image_list=[]
+          for example in ${examples[@]}
+          do
+              images=$(cat ${{ github.workspace }}/${example}/docker/docker_build_compose.yaml | yq -r '.[]' | jq 'keys' | jq -c '.')
+              image_list=$(echo ${image_list} | jq -s '.[0] + .[1] | unique' - <(echo ${images}))
+          done
+          echo "matrix=$(echo ${image_list} | jq -c '.')" >> $GITHUB_OUTPUT
+
+  scan-license:
+    needs: get-image-list
+    runs-on: "docker-build-${{ inputs.node }}"
+    strategy:
+      matrix:
+        image: ${{ fromJson(needs.get-image-list.outputs.matrix) }}
+      fail-fast: false
+    steps:
+      - name: Pull Image
+        run: |
+          docker pull ${OPEA_IMAGE_REPO}opea/${{ matrix.image }}:${{ inputs.tag }}
+          echo "OPEA_IMAGE_REPO=${OPEA_IMAGE_REPO}" >> $GITHUB_ENV
+
+      - name: Scan Container
+        uses: opea-project/validation/actions/license-scan@main # TODO
+        with:
+          image-ref: ${{ env.OPEA_IMAGE_REPO }}opea/${{ matrix.image }}:${{ inputs.tag }}
+          output: ${{ matrix.image }}-scan.txt
+
+      - name: Cleanup
+        if: always()
+        run: docker rmi -f ${OPEA_IMAGE_REPO}opea/${{ matrix.image }}:${{ inputs.tag }}
+
+      - uses: actions/upload-artifact@v4.3.4
+        with:
+          name: ${{ matrix.image }}-scan
+          path: ${{ matrix.image }}-scan.txt
+          overwrite: true
diff --git a/.github/workflows/manual-docker-publish.yml b/.github/workflows/manual-docker-publish.yml
new file mode 100644
index 0000000000..44315a6df4
--- /dev/null
+++ b/.github/workflows/manual-docker-publish.yml
@@ -0,0 +1,68 @@
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
+
+name: Examples CD workflow on manual event
+on:
+  workflow_dispatch:
+    inputs:
+      nodes:
+        default: "gaudi"
+        description: "Hardware to run test"
+        required: true
+        type: string
+      examples:
+        default: "ChatQnA"
+        description: 'List of examples to test [AudioQnA,ChatQnA,CodeGen,CodeTrans,DocSum,FaqGen,SearchQnA,Translation]'
+        required: true
+        type: string
+      tag:
+        default: "latest"
+        description: "Tag to apply to images"
+        required: true
+        type: string
+      publish:
+        default: false
+        description: 'Publish images to docker hub'
+        required: false
+        type: boolean
+      publish_tags:
+        default: "latest,v1.0"
+        description: 'Tag list apply to publish images'
+        required: false
+        type: string
+
+permissions: read-all
+jobs:
+  get-image-list:
+    runs-on: ${{ inputs.node }}
+    outputs:
+      matrix: ${{ steps.scan-matrix.outputs.matrix }}
+    steps:
+      - name: Checkout out Repo
+        uses: actions/checkout@v4
+
+      - name: Set Matrix
+        id: scan-matrix
+        run: |
+          examples=($(echo ${{ inputs.examples }} | tr ',' ' '))
+          image_list=[]
+          for example in ${examples[@]}
+          do
+              images=$(cat ${{ github.workspace }}/${example}/docker/docker_build_compose.yaml | yq -r '.[]' | jq 'keys' | jq -c '.')
+              image_list=$(echo ${image_list} | jq -s '.[0] + .[1] | unique' - <(echo ${images}))
+          done
+          echo "matrix=$(echo ${image_list} | jq -c '.')" >> $GITHUB_OUTPUT
+
+  publish:
+    needs: [get-image-list]
+    strategy:
+      matrix:
+        image: ${{ fromJSON(needs.get-image-list.outputs.matrix) }}
+    runs-on: "docker-build-${{ inputs.node }}"
+    steps:
+      - name: Image Publish
+        uses: opea-project/validation/actions/image-publish@main
+        with:
+          local_image_ref: ${OPEA_IMAGE_REPO}opea/${{ matrix.image }}:${{ inputs.tag }}
+          image_name: opea/${{ matrix.image }}
+          publish_tags: ${{ inputs.publish_tags }}
diff --git a/.github/workflows/manual-cd-workflow.yml b/.github/workflows/manual-example-workflow.yml
similarity index 82%
rename from .github/workflows/manual-cd-workflow.yml
rename to .github/workflows/manual-example-workflow.yml
index 7159ba6321..561183685c 100644
--- a/.github/workflows/manual-cd-workflow.yml
+++ b/.github/workflows/manual-example-workflow.yml
@@ -40,16 +40,6 @@ on:
         description: 'Test examples with k8s'
         required: false
         type: boolean
-      publish:
-        default: false
-        description: 'Publish images to docker hub'
-        required: false
-        type: boolean
-      publish_tags:
-        default: "latest,v1.0"
-        description: 'Tag list apply to publish images'
-        required: false
-        type: string
       GenAIComps_branch:
         default: "main"
         description: 'GenAIComps branch for image build'
@@ -67,10 +57,10 @@ jobs:
     - name: Create Matrix
       id: get-matrix
       run: |
-        examples=($(echo ${{ github.event.inputs.examples }} | tr ',' ' '))
+        examples=($(echo ${{ inputs.examples }} | tr ',' ' '))
         examples_json=$(printf '%s\n' "${examples[@]}" | sort -u | jq -R '.' | jq -sc '.')
         echo "examples=$examples_json" >> $GITHUB_OUTPUT
-        nodes=($(echo ${{ github.event.inputs.nodes }} | tr ',' ' '))
+        nodes=($(echo ${{ inputs.nodes }} | tr ',' ' '))
         nodes_json=$(printf '%s\n' "${nodes[@]}" | sort -u | jq -R '.' | jq -sc '.')
         echo "nodes=$nodes_json" >> $GITHUB_OUTPUT
 
@@ -90,7 +80,5 @@ jobs:
       scan: ${{ fromJSON(inputs.scan) }}
       test_compose: ${{ fromJSON(inputs.test_compose) }}
       test_k8s: ${{ fromJSON(inputs.test_k8s) }}
-      publish: ${{ fromJSON(inputs.publish) }}
-      publish_tags: ${{ inputs.publish_tags }}
       GenAIComps_branch: ${{ inputs.GenAIComps_branch }}
     secrets: inherit

From a934a28d90193470460dd5cf92b036baac909521 Mon Sep 17 00:00:00 2001
From: "chen, suyue" <suyue.chen@intel.com>
Date: Fri, 16 Aug 2024 00:31:01 +0800
Subject: [PATCH 08/57] set action back to pull_request_target (#602)

Signed-off-by: chensuyue <suyue.chen@intel.com>
---
 .github/workflows/pr-docker-compose-e2e.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/pr-docker-compose-e2e.yml b/.github/workflows/pr-docker-compose-e2e.yml
index e02c60fb83..66d9417e9c 100644
--- a/.github/workflows/pr-docker-compose-e2e.yml
+++ b/.github/workflows/pr-docker-compose-e2e.yml
@@ -4,7 +4,7 @@
 name: E2E test with docker compose
 
 on:
-  pull_request:
+  pull_request_target:
     branches: [main]
     types: [opened, reopened, ready_for_review, synchronize] # added `ready_for_review` since draft is skipped
     paths:

From b10b76004a25d583c7d3a5a8bd7f4cd78b2aa2af Mon Sep 17 00:00:00 2001
From: dmsuehir <dina.s.jones@intel.com>
Date: Wed, 14 Aug 2024 13:55:25 -0700
Subject: [PATCH 09/57] Fix the CodeGen Kubernetes ConfigMap 'nil' proxy var
 error

Signed-off-by: dmsuehir <dina.s.jones@intel.com>
---
 CodeGen/kubernetes/manifests/README.md         |  5 +++--
 CodeGen/kubernetes/manifests/xeon/codegen.yaml | 12 ++++++------
 2 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/CodeGen/kubernetes/manifests/README.md b/CodeGen/kubernetes/manifests/README.md
index f6a0763726..1fc3db5105 100644
--- a/CodeGen/kubernetes/manifests/README.md
+++ b/CodeGen/kubernetes/manifests/README.md
@@ -6,7 +6,7 @@
 
 > You can also customize the "MODEL_ID" if needed.
 
-> You need to make sure you have created the directory `/mnt/opea-models` to save the cached model on the node where the CodeGEn workload is running. Otherwise, you need to modify the `codegen.yaml` file to change the `model-volume` to a directory that exists on the node.
+> You need to make sure you have created the directory `/mnt/opea-models` to save the cached model on the node where the CodeGen workload is running. Otherwise, you need to modify the `codegen.yaml` file to change the `model-volume` to a directory that exists on the node.
 
 ## Deploy On Xeon
 
@@ -30,7 +30,7 @@ kubectl apply -f codegen.yaml
 
 To verify the installation, run the command `kubectl get pod` to make sure all pods are running.
 
-Then run the command `kubectl port-forward svc/codegen 7778:7778` to expose the CodeGEn service for access.
+Then run the command `kubectl port-forward svc/codegen 7778:7778` to expose the CodeGen service for access.
 
 Open another terminal and run the following command to verify the service if working:
 
@@ -40,3 +40,4 @@ curl http://localhost:7778/v1/codegen -H "Content-Type: application/json" -d '{
      "messages": "Implement a high-level API for a TODO list application. The API takes as input an operation request and updates the TODO list in place. If the request is invalid, raise an exception."
      }'
 ```
+
diff --git a/CodeGen/kubernetes/manifests/xeon/codegen.yaml b/CodeGen/kubernetes/manifests/xeon/codegen.yaml
index 06b8a75445..9edadc88c0 100644
--- a/CodeGen/kubernetes/manifests/xeon/codegen.yaml
+++ b/CodeGen/kubernetes/manifests/xeon/codegen.yaml
@@ -17,9 +17,9 @@ data:
   TGI_LLM_ENDPOINT: "http://codegen-tgi"
   HUGGINGFACEHUB_API_TOKEN: "insert-your-huggingface-token-here"
   HF_HOME: "/tmp/.cache/huggingface"
-  http_proxy:
-  https_proxy:
-  no_proxy:
+  http_proxy: ""
+  https_proxy: ""
+  no_proxy: ""
   LANGCHAIN_TRACING_V2: "false"
   LANGCHAIN_API_KEY: insert-your-langchain-key-here
   LANGCHAIN_PROJECT: "opea-llm-uservice"
@@ -45,9 +45,9 @@ data:
   HF_TOKEN: "insert-your-huggingface-token-here"
   MAX_INPUT_TOKENS: "1024"
   MAX_TOTAL_TOKENS: "4096"
-  http_proxy:
-  https_proxy:
-  no_proxy:
+  http_proxy: ""
+  https_proxy: ""
+  no_proxy: ""
   HABANA_LOGS: "/tmp/habana_logs"
   NUMBA_CACHE_DIR: "/tmp"
   TRANSFORMERS_CACHE: "/tmp/transformers_cache"

From 808d96d79c81995629699025cc396cd1d70be622 Mon Sep 17 00:00:00 2001
From: dmsuehir <dina.s.jones@intel.com>
Date: Wed, 14 Aug 2024 14:48:07 -0700
Subject: [PATCH 10/57] Updates after running on Gaudi to add
 hugepages-2Mi/memory resources

Signed-off-by: dmsuehir <dina.s.jones@intel.com>
---
 CodeGen/kubernetes/manifests/README.md          |  4 ++++
 CodeGen/kubernetes/manifests/gaudi/codegen.yaml | 14 ++++++++------
 2 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/CodeGen/kubernetes/manifests/README.md b/CodeGen/kubernetes/manifests/README.md
index 1fc3db5105..a2cf126397 100644
--- a/CodeGen/kubernetes/manifests/README.md
+++ b/CodeGen/kubernetes/manifests/README.md
@@ -7,6 +7,7 @@
 > You can also customize the "MODEL_ID" if needed.
 
 > You need to make sure you have created the directory `/mnt/opea-models` to save the cached model on the node where the CodeGen workload is running. Otherwise, you need to modify the `codegen.yaml` file to change the `model-volume` to a directory that exists on the node.
+> Alternatively, you can change the `codegen.yaml` to use a different type of volume, such as a persistent volume claim.
 
 ## Deploy On Xeon
 
@@ -34,6 +35,9 @@ Then run the command `kubectl port-forward svc/codegen 7778:7778` to expose the
 
 Open another terminal and run the following command to verify the service if working:
 
+> Note that it may take a couple of minutes for the service to be ready. If the `curl` command below fails, you
+> can check the logs of the codegen-tgi pod to see it's status or check for errors.
+
 ```
 kubectl get pods
 curl http://localhost:7778/v1/codegen -H "Content-Type: application/json" -d '{
diff --git a/CodeGen/kubernetes/manifests/gaudi/codegen.yaml b/CodeGen/kubernetes/manifests/gaudi/codegen.yaml
index 810c90f360..1471faf131 100644
--- a/CodeGen/kubernetes/manifests/gaudi/codegen.yaml
+++ b/CodeGen/kubernetes/manifests/gaudi/codegen.yaml
@@ -17,9 +17,9 @@ data:
   TGI_LLM_ENDPOINT: "http://codegen-tgi"
   HUGGINGFACEHUB_API_TOKEN: "insert-your-huggingface-token-here"
   HF_HOME: "/tmp/.cache/huggingface"
-  http_proxy:
-  https_proxy:
-  no_proxy:
+  http_proxy: ""
+  https_proxy: ""
+  no_proxy: ""
   LANGCHAIN_TRACING_V2: "false"
   LANGCHAIN_API_KEY: insert-your-langchain-key-here
   LANGCHAIN_PROJECT: "opea-llm-uservice"
@@ -45,9 +45,9 @@ data:
   HF_TOKEN: "insert-your-huggingface-token-here"
   MAX_INPUT_TOKENS: "1024"
   MAX_TOTAL_TOKENS: "4096"
-  http_proxy:
-  https_proxy:
-  no_proxy:
+  http_proxy: ""
+  https_proxy: ""
+  no_proxy: ""
   HABANA_LOGS: "/tmp/habana_logs"
   NUMBA_CACHE_DIR: "/tmp"
   TRANSFORMERS_CACHE: "/tmp/transformers_cache"
@@ -243,6 +243,8 @@ spec:
           resources:
             limits:
               habana.ai/gaudi: 1
+              memory: 64Gi
+              hugepages-2Mi: 4400Mi
       volumes:
         - name: model-volume
           hostPath:

From 3c1cfec13c959a37a251e8913a95f8766c694b91 Mon Sep 17 00:00:00 2001
From: dmsuehir <dina.s.jones@intel.com>
Date: Wed, 14 Aug 2024 14:50:37 -0700
Subject: [PATCH 11/57] Fix typo

Signed-off-by: dmsuehir <dina.s.jones@intel.com>
---
 CodeGen/kubernetes/manifests/README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/CodeGen/kubernetes/manifests/README.md b/CodeGen/kubernetes/manifests/README.md
index a2cf126397..dbda67429b 100644
--- a/CodeGen/kubernetes/manifests/README.md
+++ b/CodeGen/kubernetes/manifests/README.md
@@ -36,7 +36,7 @@ Then run the command `kubectl port-forward svc/codegen 7778:7778` to expose the
 Open another terminal and run the following command to verify the service if working:
 
 > Note that it may take a couple of minutes for the service to be ready. If the `curl` command below fails, you
-> can check the logs of the codegen-tgi pod to see it's status or check for errors.
+> can check the logs of the codegen-tgi pod to see its status or check for errors.
 
 ```
 kubectl get pods

From 2c6fa68c11624de369ca3dccb83c57ce148ce0f5 Mon Sep 17 00:00:00 2001
From: dmsuehir <dina.s.jones@intel.com>
Date: Wed, 14 Aug 2024 14:52:30 -0700
Subject: [PATCH 12/57] Removing blank line

Signed-off-by: dmsuehir <dina.s.jones@intel.com>
---
 CodeGen/kubernetes/manifests/README.md | 1 -
 1 file changed, 1 deletion(-)

diff --git a/CodeGen/kubernetes/manifests/README.md b/CodeGen/kubernetes/manifests/README.md
index dbda67429b..4e0a0e0b69 100644
--- a/CodeGen/kubernetes/manifests/README.md
+++ b/CodeGen/kubernetes/manifests/README.md
@@ -44,4 +44,3 @@ curl http://localhost:7778/v1/codegen -H "Content-Type: application/json" -d '{
      "messages": "Implement a high-level API for a TODO list application. The API takes as input an operation request and updates the TODO list in place. If the request is invalid, raise an exception."
      }'
 ```
-

From a160348eda1ada0cb7dce6a334775159a4b2b9e6 Mon Sep 17 00:00:00 2001
From: "chen, suyue" <suyue.chen@intel.com>
Date: Thu, 15 Aug 2024 22:39:21 +0800
Subject: [PATCH 13/57] Enhance CI/CD infrastructure (#593)

Signed-off-by: chensuyue <suyue.chen@intel.com>
Signed-off-by: Sun, Xuehao <xuehao.sun@intel.com>
Signed-off-by: dmsuehir <dina.s.jones@intel.com>
---
 .github/workflows/_example-workflow.yml       |  77 +++++++------
 .github/workflows/_run-docker-compose.yml     |   3 +-
 .github/workflows/manual-cd-workflow.yml      |  31 +++--
 .github/workflows/pr-docker-compose-e2e.yml   |  21 +---
 AudioQnA/docker/docker_build_compose.yaml     |  54 +++++++++
 AudioQnA/docker/gaudi/compose.yaml            |  15 +--
 AudioQnA/docker/xeon/compose.yaml             |  15 +--
 AudioQnA/tests/test_audioqna_on_gaudi.sh      |  50 ++++----
 AudioQnA/tests/test_audioqna_on_xeon.sh       |  37 ++----
 ChatQnA/docker/aipc/compose.yaml              |  16 ++-
 ChatQnA/docker/docker_build_compose.yaml      | 108 ++++++++++++++++++
 ChatQnA/docker/gaudi/compose.yaml             |  19 ++-
 ChatQnA/docker/gaudi/compose_guardrails.yaml  |  21 ++--
 ChatQnA/docker/gaudi/compose_vllm.yaml        |  21 ++--
 ChatQnA/docker/gaudi/compose_vllm_ray.yaml    |  21 ++--
 ChatQnA/docker/gpu/compose.yaml               |  17 ++-
 ChatQnA/docker/xeon/compose.yaml              |  17 ++-
 ChatQnA/docker/xeon/compose_qdrant.yaml       |  17 ++-
 ChatQnA/docker/xeon/compose_vllm.yaml         |  19 ++-
 ChatQnA/tests/test_chatqna_on_gaudi.sh        |  64 +++--------
 ChatQnA/tests/test_chatqna_on_xeon.sh         |  53 ++++-----
 ChatQnA/tests/test_chatqna_qdrant_on_xeon.sh  |  36 ++----
 ChatQnA/tests/test_chatqna_vllm_on_gaudi.sh   |  61 +++-------
 ChatQnA/tests/test_chatqna_vllm_on_xeon.sh    |  66 ++++-------
 .../tests/test_chatqna_vllm_ray_on_gaudi.sh   |  60 +++-------
 CodeGen/docker/docker_build_compose.yaml      |  30 +++++
 CodeGen/docker/gaudi/README.md                |  22 ++--
 CodeGen/docker/gaudi/compose.yaml             |  19 +--
 CodeGen/docker/xeon/README.md                 |  22 ++--
 CodeGen/docker/xeon/compose.yaml              |  18 +--
 CodeGen/tests/test_codegen_on_gaudi.sh        |  44 +++----
 CodeGen/tests/test_codegen_on_xeon.sh         |  43 +++----
 CodeTrans/docker/docker_build_compose.yaml    |  24 ++++
 CodeTrans/docker/gaudi/compose.yaml           |   9 +-
 CodeTrans/docker/xeon/compose.yaml            |   9 +-
 CodeTrans/tests/test_codetrans_on_gaudi.sh    |  43 +++----
 CodeTrans/tests/test_codetrans_on_xeon.sh     |  41 +++----
 DocSum/docker/docker_build_compose.yaml       |  30 +++++
 DocSum/docker/gaudi/README.md                 |  19 ++-
 DocSum/docker/gaudi/compose.yaml              |  18 +--
 DocSum/docker/xeon/README.md                  |  20 +++-
 DocSum/docker/xeon/compose.yaml               |  18 +--
 DocSum/tests/test_docsum_on_gaudi.sh          |  45 +++-----
 DocSum/tests/test_docsum_on_xeon.sh           |  45 +++-----
 FaqGen/docker/docker_build_compose.yaml       |  30 +++++
 FaqGen/docker/gaudi/compose.yaml              |   8 +-
 FaqGen/docker/xeon/compose.yaml               |   8 +-
 FaqGen/tests/test_faqgen_on_gaudi.sh          |  41 +++----
 FaqGen/tests/test_faqgen_on_xeon.sh           |  40 +++----
 SearchQnA/docker/docker_build_compose.yaml    |  48 ++++++++
 SearchQnA/docker/gaudi/compose.yaml           |  17 ++-
 SearchQnA/docker/xeon/compose.yaml            |  15 +--
 SearchQnA/tests/test_searchqna_on_gaudi.sh    |  57 +++------
 SearchQnA/tests/test_searchqna_on_xeon.sh     |  72 ++++++------
 Translation/docker/docker_build_compose.yaml  |  18 +++
 Translation/docker/gaudi/compose.yaml         |  23 +---
 Translation/docker/xeon/compose.yaml          |  23 +---
 .../tests/test_translation_on_gaudi.sh        |  40 +++----
 Translation/tests/test_translation_on_xeon.sh |  41 +++----
 VisualQnA/docker/gaudi/compose.yaml           |  11 +-
 VisualQnA/docker/xeon/compose.yaml            |  11 +-
 61 files changed, 987 insertions(+), 954 deletions(-)
 create mode 100644 AudioQnA/docker/docker_build_compose.yaml
 create mode 100644 ChatQnA/docker/docker_build_compose.yaml
 create mode 100644 CodeGen/docker/docker_build_compose.yaml
 create mode 100644 CodeTrans/docker/docker_build_compose.yaml
 create mode 100644 DocSum/docker/docker_build_compose.yaml
 create mode 100644 FaqGen/docker/docker_build_compose.yaml
 create mode 100644 SearchQnA/docker/docker_build_compose.yaml
 create mode 100644 Translation/docker/docker_build_compose.yaml

diff --git a/.github/workflows/_example-workflow.yml b/.github/workflows/_example-workflow.yml
index 48edbb65cd..c293a8b1ef 100644
--- a/.github/workflows/_example-workflow.yml
+++ b/.github/workflows/_example-workflow.yml
@@ -6,6 +6,9 @@ permissions: read-all
 on:
   workflow_call:
     inputs:
+      node:
+        required: true
+        type: string
       example:
         required: true
         type: string
@@ -37,30 +40,43 @@ on:
         default: "latest"
         required: false
         type: string
+      GenAIComps_branch:
+        default: "main"
+        required: false
+        type: string
 jobs:
 ####################################################################################################
 # Image Build
 ####################################################################################################
   build-images:
-    if: ${{ fromJSON(inputs.build) }}
-    strategy:
-      matrix:
-        node: ["docker-build-xeon", "docker-build-gaudi"]
-    runs-on: ${{ matrix.node }}
+    runs-on: "docker-build-${{ inputs.node }}"
     continue-on-error: true
     steps:
       - name: Clean Up Working Directory
-        run: |
-          sudo rm -rf ${{github.workspace}}/*
+        run: sudo rm -rf ${{github.workspace}}/*
 
       - name: Checkout out Repo
         uses: actions/checkout@v4
 
+      - name: Clone required Repo
+        run: |
+          cd ${{ github.workspace }}/${{ inputs.example }}/docker
+          build_compose_path=${{ github.workspace }}/${{ inputs.example }}/docker/docker_build_compose.yaml
+          if [[ $(grep -c "tei-gaudi:" ${docker_compose_path}) != 0 ]]; then
+              git clone https://github.com/huggingface/tei-gaudi.git
+          fi
+          if [[ $(grep -c "vllm:" ${docker_compose_path}) != 0 ]]; then
+              git clone https://github.com/huggingface/tei-gaudi.git
+          fi
+          git clone https://github.com/opea-project/GenAIComps.git
+          cd GenAIComps && checkout ${{ inputs.GenAIComps_branch }} && cd ../
+
       - name: Build Image
+        if: ${{ fromJSON(inputs.build) }}
         uses: opea-project/validation/actions/image-build@main
         with:
-          work_dir: ${{ github.workspace }}/${{ inputs.example }}
-          docker_compose_path: ${{ github.workspace }}/.github/workflows/docker/compose/${{ inputs.example }}-compose.yaml
+          work_dir: ${{ github.workspace }}/${{ inputs.example }}/docker
+          docker_compose_path: ${{ github.workspace }}/${{ inputs.example }}/docker/docker_build_compose.yaml
           registry: ${OPEA_IMAGE_REPO}opea
           tag: ${{ inputs.tag }}
 
@@ -68,17 +84,12 @@ jobs:
 # Trivy Scan
 ####################################################################################################
   image-list:
-    needs: [ build-images ]
-    if: ${{ fromJSON(inputs.scan) }}
+    needs: [build-images]
+    if: ${{ fromJSON(inputs.scan) && inputs.node == 'gaudi' }}
     runs-on: ubuntu-latest
     outputs:
       matrix: ${{ steps.scan-matrix.outputs.matrix }}
     steps:
-      - name: Harden Runner
-        uses: step-security/harden-runner@v2.8.1
-        with:
-          egress-policy: audit
-
       - name: Checkout out Repo
         uses: actions/checkout@v4
 
@@ -90,34 +101,32 @@ jobs:
           echo "matrix=$(cat ${compose_path} | yq -r '.[]' | jq 'keys' | jq -c '.')" >> $GITHUB_OUTPUT
 
   scan-images:
-    needs: [image-list]
-    if: ${{ fromJSON(inputs.scan) }}
-    runs-on: "docker-build-gaudi"
+    needs: [image-list, build-images]
+    if: ${{ fromJSON(inputs.scan) && inputs.node == 'gaudi'}}
+    runs-on: "docker-build-${{ inputs.node }}"
     strategy:
       matrix:
         image: ${{ fromJSON(needs.image-list.outputs.matrix) }}
       fail-fast: false
     steps:
-      - name: Harden Runner
-        uses: step-security/harden-runner@v2.8.1
-        with:
-          egress-policy: audit
-
       - name: Pull Image
-        run: docker pull ${OPEA_IMAGE_REPO}opea/${{ matrix.image }}:${{ inputs.tag }}
+        run: |
+          docker pull ${OPEA_IMAGE_REPO}opea/${{ matrix.image }}:${{ inputs.tag }}
+          echo "OPEA_IMAGE_REPO=${OPEA_IMAGE_REPO}" >> $GITHUB_ENV
 
       - name: Scan Container
         uses: opea-project/validation/actions/trivy-scan@main
         with:
-          image-ref: ${OPEA_IMAGE_REPO}opea/${{ matrix.image }}:${{ inputs.tag }}
+          image-ref: ${{ env.OPEA_IMAGE_REPO }}opea/${{ matrix.image }}:${{ inputs.tag }}
           output: ${{ inputs.example }}-${{ matrix.image }}-scan.txt
 
       - name: Cleanup
         if: always()
         run: docker rmi -f ${OPEA_IMAGE_REPO}opea/${{ matrix.image }}:${{ inputs.tag }}
+
       - uses: actions/upload-artifact@v4.3.4
         with:
-          name: ${{ inputs.example }}-scan
+          name: ${{ inputs.example }}-${{ matrix.image }}-scan
           path: ${{ inputs.example }}-${{ matrix.image }}-scan.txt
           overwrite: true
 
@@ -127,15 +136,11 @@ jobs:
   test-example-compose:
     needs: [build-images]
     if: ${{ fromJSON(inputs.test_compose) }}
-    strategy:
-      matrix:
-        hardware: ["xeon", "gaudi"]
-      fail-fast: false
     uses: ./.github/workflows/_run-docker-compose.yml
     with:
       tag: ${{ inputs.tag }}
       example: ${{ inputs.example }}
-      hardware: ${{ matrix.hardware }}
+      hardware: ${{ inputs.node }}
     secrets: inherit
 
 
@@ -145,14 +150,10 @@ jobs:
   test-k8s-manifest:
     needs: [build-images]
     if: ${{ fromJSON(inputs.test_k8s) }}
-    strategy:
-      matrix:
-        hardware: ["xeon", "gaudi"]
-      fail-fast: false
     uses: ./.github/workflows/_manifest-e2e.yml
     with:
       example: ${{ inputs.example }}
-      hardware: ${{ matrix.hardware }}
+      hardware: ${{ inputs.node }}
       tag: ${{ inputs.tag }}
     secrets: inherit
 
@@ -162,7 +163,7 @@ jobs:
 ####################################################################################################
   publish:
     needs: [image-list, build-images, scan-images, test-example-compose]
-    if: ${{ fromJSON(inputs.publish) }}
+    if: ${{ fromJSON(inputs.publish) && inputs.node == 'gaudi' }}
     strategy:
       matrix:
         image: ${{ fromJSON(needs.image-list.outputs.matrix) }}
diff --git a/.github/workflows/_run-docker-compose.yml b/.github/workflows/_run-docker-compose.yml
index 39b2b9d342..d7c778a089 100644
--- a/.github/workflows/_run-docker-compose.yml
+++ b/.github/workflows/_run-docker-compose.yml
@@ -72,6 +72,7 @@ jobs:
           sudo rm -rf ${{github.workspace}}/* || true
           docker system prune -f
           docker rmi $(docker images --filter reference="*/*/*:latest" -q) || true
+          docker rmi $(docker images --filter reference="*/*:ci" -q) || true
 
       - name: Checkout out Repo
         uses: actions/checkout@v4
@@ -93,7 +94,7 @@ jobs:
           test_case: ${{ matrix.test_case }}
         run: |
           cd ${{ github.workspace }}/$example/tests
-          export IMAGE_REPO=${OPEA_IMAGE_REPO}
+          if [[ "$IMAGE_REPO" == "" ]]; then export IMAGE_REPO="${OPEA_IMAGE_REPO}opea"; fi
           if [ -f ${test_case} ]; then timeout 30m bash ${test_case}; else echo "Test script {${test_case}} not found, skip test!"; fi
 
       - name: Clean up container
diff --git a/.github/workflows/manual-cd-workflow.yml b/.github/workflows/manual-cd-workflow.yml
index 52be4230f9..7159ba6321 100644
--- a/.github/workflows/manual-cd-workflow.yml
+++ b/.github/workflows/manual-cd-workflow.yml
@@ -5,9 +5,14 @@ name: Examples CD workflow on manual event
 on:
   workflow_dispatch:
     inputs:
+      nodes:
+        default: "gaudi,xeon"
+        description: "Hardware to run test"
+        required: true
+        type: string
       examples:
-        default: "AudioQnA,ChatQnA,CodeGen,CodeTrans,DocSum,FaqGen,SearchQnA,Translation"
-        description: 'List of examples to test'
+        default: "ChatQnA"
+        description: 'List of examples to test [AudioQnA,ChatQnA,CodeGen,CodeTrans,DocSum,FaqGen,SearchQnA,Translation]'
         required: true
         type: string
       tag:
@@ -41,33 +46,44 @@ on:
         required: false
         type: boolean
       publish_tags:
-        default: "latest,v0.9"
+        default: "latest,v1.0"
         description: 'Tag list apply to publish images'
         required: false
         type: string
+      GenAIComps_branch:
+        default: "main"
+        description: 'GenAIComps branch for image build'
+        required: false
+        type: string
 
 permissions: read-all
 jobs:
   get-test-matrix:
     runs-on: ubuntu-latest
     outputs:
-      matrix: ${{ steps.get-matrix.outputs.matrix }}
+      examples: ${{ steps.get-matrix.outputs.examples }}
+      nodes: ${{ steps.get-matrix.outputs.nodes }}
     steps:
     - name: Create Matrix
       id: get-matrix
       run: |
         examples=($(echo ${{ github.event.inputs.examples }} | tr ',' ' '))
         examples_json=$(printf '%s\n' "${examples[@]}" | sort -u | jq -R '.' | jq -sc '.')
-        echo "matrix=$examples_json" >> $GITHUB_OUTPUT
+        echo "examples=$examples_json" >> $GITHUB_OUTPUT
+        nodes=($(echo ${{ github.event.inputs.nodes }} | tr ',' ' '))
+        nodes_json=$(printf '%s\n' "${nodes[@]}" | sort -u | jq -R '.' | jq -sc '.')
+        echo "nodes=$nodes_json" >> $GITHUB_OUTPUT
 
   run-examples:
     needs: [get-test-matrix]
     strategy:
       matrix:
-        example: ${{ fromJson(needs.get-test-matrix.outputs.matrix) }}
+        example: ${{ fromJson(needs.get-test-matrix.outputs.examples) }}
+        node: ${{ fromJson(needs.get-test-matrix.outputs.nodes) }}
       fail-fast: false
     uses: ./.github/workflows/_example-workflow.yml
     with:
+      node: ${{ matrix.node }}
       example: ${{ matrix.example }}
       tag: ${{ inputs.tag }}
       build: ${{ fromJSON(inputs.build) }}
@@ -75,5 +91,6 @@ jobs:
       test_compose: ${{ fromJSON(inputs.test_compose) }}
       test_k8s: ${{ fromJSON(inputs.test_k8s) }}
       publish: ${{ fromJSON(inputs.publish) }}
-      publish_tags: ${{ fromJSON(inputs.publish_tags) }}
+      publish_tags: ${{ inputs.publish_tags }}
+      GenAIComps_branch: ${{ inputs.GenAIComps_branch }}
     secrets: inherit
diff --git a/.github/workflows/pr-docker-compose-e2e.yml b/.github/workflows/pr-docker-compose-e2e.yml
index 7706f4f111..e02c60fb83 100644
--- a/.github/workflows/pr-docker-compose-e2e.yml
+++ b/.github/workflows/pr-docker-compose-e2e.yml
@@ -4,7 +4,7 @@
 name: E2E test with docker compose
 
 on:
-  pull_request_target:
+  pull_request:
     branches: [main]
     types: [opened, reopened, ready_for_review, synchronize] # added `ready_for_review` since draft is skipped
     paths:
@@ -21,29 +21,20 @@ concurrency:
   cancel-in-progress: true
 
 jobs:
-  job1:
+  get-test-matrix:
     uses: ./.github/workflows/_get-test-matrix.yml
     with:
       diff_excluded_files: '.github|README.md|*.txt|deprecate|kubernetes|manifest|gmc|assets'
 
-  mega-image-build:
-    needs: job1
-    strategy:
-      matrix: ${{ fromJSON(needs.job1.outputs.run_matrix) }}
-    uses: ./.github/workflows/_image-build.yml
-    with:
-      image_tag: ${{ github.event.pull_request.head.sha }}
-      mega_service: "${{ matrix.example }}"
-      runner_label: "docker-build-${{ matrix.hardware }}"
-
   example-test:
-    needs: [job1, mega-image-build]
+    needs: [get-test-matrix]
     strategy:
-      matrix: ${{ fromJSON(needs.job1.outputs.run_matrix) }}
+      matrix: ${{ fromJSON(needs.get-test-matrix.outputs.run_matrix) }}
       fail-fast: false
     uses: ./.github/workflows/_run-docker-compose.yml
     with:
-      tag: ${{ needs.mega-image-build.outputs.image_tag }}
+      registry: "opea"
+      tag: "ci"
       example: ${{ matrix.example }}
       hardware: ${{ matrix.hardware }}
     secrets: inherit
diff --git a/AudioQnA/docker/docker_build_compose.yaml b/AudioQnA/docker/docker_build_compose.yaml
new file mode 100644
index 0000000000..e78d44af72
--- /dev/null
+++ b/AudioQnA/docker/docker_build_compose.yaml
@@ -0,0 +1,54 @@
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
+
+services:
+  audioqna:
+    build:
+      args:
+        http_proxy: ${http_proxy}
+        https_proxy: ${https_proxy}
+        no_proxy: ${no_proxy}
+      dockerfile: ./Dockerfile
+    image: ${REGISTRY:-opea}/audioqna:${TAG:-latest}
+  whisper-gaudi:
+    build:
+      context: GenAIComps
+      dockerfile: comps/asr/whisper/Dockerfile_hpu
+    extends: audioqna
+    image: ${REGISTRY:-opea}/whisper-gaudi:${TAG:-latest}
+  whisper:
+    build:
+      context: GenAIComps
+      dockerfile: comps/asr/whisper/Dockerfile
+    extends: audioqna
+    image: ${REGISTRY:-opea}/whisper:${TAG:-latest}
+  asr:
+    build:
+      context: GenAIComps
+      dockerfile: comps/asr/Dockerfile
+    extends: audioqna
+    image: ${REGISTRY:-opea}/asr:${TAG:-latest}
+  llm-tgi:
+    build:
+      context: GenAIComps
+      dockerfile: comps/llms/text-generation/tgi/Dockerfile
+    extends: audioqna
+    image: ${REGISTRY:-opea}/llm-tgi:${TAG:-latest}
+  speecht5-gaudi:
+    build:
+      context: GenAIComps
+      dockerfile: comps/tts/speecht5/Dockerfile_hpu
+    extends: audioqna
+    image: ${REGISTRY:-opea}/speecht5-gaudi:${TAG:-latest}
+  speecht5:
+    build:
+      context: GenAIComps
+      dockerfile: comps/tts/speecht5/Dockerfile
+    extends: audioqna
+    image: ${REGISTRY:-opea}/speecht5:${TAG:-latest}
+  tts:
+    build:
+      context: GenAIComps
+      dockerfile: comps/tts/Dockerfile
+    extends: audioqna
+    image: ${REGISTRY:-opea}/tts:${TAG:-latest}
diff --git a/AudioQnA/docker/gaudi/compose.yaml b/AudioQnA/docker/gaudi/compose.yaml
index 5d8b34a6bf..c781bcb144 100644
--- a/AudioQnA/docker/gaudi/compose.yaml
+++ b/AudioQnA/docker/gaudi/compose.yaml
@@ -1,12 +1,9 @@
-
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-version: "3.8"
-
 services:
   whisper-service:
-    image: opea/whisper-gaudi:latest
+    image: ${REGISTRY:-opea}/whisper-gaudi:${TAG:-latest}
     container_name: whisper-service
     ports:
       - "7066:7066"
@@ -22,7 +19,7 @@ services:
       - SYS_NICE
     restart: unless-stopped
   asr:
-    image: opea/asr:latest
+    image: ${REGISTRY:-opea}/asr:${TAG:-latest}
     container_name: asr-service
     ports:
       - "3001:9099"
@@ -30,7 +27,7 @@ services:
     environment:
       ASR_ENDPOINT: ${ASR_ENDPOINT}
   speecht5-service:
-    image: opea/speecht5-gaudi:latest
+    image: ${REGISTRY:-opea}/speecht5-gaudi:${TAG:-latest}
     container_name: speecht5-service
     ports:
       - "7055:7055"
@@ -46,7 +43,7 @@ services:
       - SYS_NICE
     restart: unless-stopped
   tts:
-    image: opea/tts:latest
+    image: ${REGISTRY:-opea}/tts:${TAG:-latest}
     container_name: tts-service
     ports:
       - "3002:9088"
@@ -75,7 +72,7 @@ services:
     ipc: host
     command: --model-id ${LLM_MODEL_ID} --max-input-length 1024 --max-total-tokens 2048
   llm:
-    image: opea/llm-tgi:latest
+    image: ${REGISTRY:-opea}/llm-tgi:${TAG:-latest}
     container_name: llm-tgi-gaudi-server
     depends_on:
       - tgi-service
@@ -90,7 +87,7 @@ services:
       HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
     restart: unless-stopped
   audioqna-gaudi-backend-server:
-    image: opea/audioqna:latest
+    image: ${REGISTRY:-opea}/audioqna:${TAG:-latest}
     container_name: audioqna-gaudi-backend-server
     depends_on:
       - asr
diff --git a/AudioQnA/docker/xeon/compose.yaml b/AudioQnA/docker/xeon/compose.yaml
index b8966c7192..7c111176de 100644
--- a/AudioQnA/docker/xeon/compose.yaml
+++ b/AudioQnA/docker/xeon/compose.yaml
@@ -1,12 +1,9 @@
-
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-version: "3.8"
-
 services:
   whisper-service:
-    image: opea/whisper:latest
+    image: ${REGISTRY:-opea}/whisper:${TAG:-latest}
     container_name: whisper-service
     ports:
       - "7066:7066"
@@ -17,7 +14,7 @@ services:
       https_proxy: ${https_proxy}
     restart: unless-stopped
   asr:
-    image: opea/asr:latest
+    image: ${REGISTRY:-opea}/asr:${TAG:-latest}
     container_name: asr-service
     ports:
       - "3001:9099"
@@ -25,7 +22,7 @@ services:
     environment:
       ASR_ENDPOINT: ${ASR_ENDPOINT}
   speecht5-service:
-    image: opea/speecht5:latest
+    image: ${REGISTRY:-opea}/speecht5:${TAG:-latest}
     container_name: speecht5-service
     ports:
       - "7055:7055"
@@ -36,7 +33,7 @@ services:
       https_proxy: ${https_proxy}
     restart: unless-stopped
   tts:
-    image: opea/tts:latest
+    image: ${REGISTRY:-opea}/tts:${TAG:-latest}
     container_name: tts-service
     ports:
       - "3002:9088"
@@ -58,7 +55,7 @@ services:
       HF_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
     command: --model-id ${LLM_MODEL_ID}
   llm:
-    image: opea/llm-tgi:latest
+    image: ${REGISTRY:-opea}/llm-tgi:${TAG:-latest}
     container_name: llm-tgi-server
     depends_on:
       - tgi-service
@@ -73,7 +70,7 @@ services:
       HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
     restart: unless-stopped
   audioqna-xeon-backend-server:
-    image: opea/audioqna:latest
+    image: ${REGISTRY:-opea}/audioqna:${TAG:-latest}
     container_name: audioqna-xeon-backend-server
     depends_on:
       - asr
diff --git a/AudioQnA/tests/test_audioqna_on_gaudi.sh b/AudioQnA/tests/test_audioqna_on_gaudi.sh
index 7493f8f8ae..5feb6eec59 100644
--- a/AudioQnA/tests/test_audioqna_on_gaudi.sh
+++ b/AudioQnA/tests/test_audioqna_on_gaudi.sh
@@ -3,34 +3,26 @@
 # SPDX-License-Identifier: Apache-2.0
 
 set -e
-echo "IMAGE_REPO=${IMAGE_REPO}"
+IMAGE_REPO=${IMAGE_REPO:-"opea"}
+IMAGE_TAG=${IMAGE_TAG:-"latest"}
+echo "REGISTRY=IMAGE_REPO=${IMAGE_REPO}"
+echo "TAG=IMAGE_TAG=${IMAGE_TAG}"
+export REGISTRY=${IMAGE_REPO}
+export TAG=${IMAGE_TAG}
 
 WORKPATH=$(dirname "$PWD")
 LOG_PATH="$WORKPATH/tests"
 ip_address=$(hostname -I | awk '{print $1}')
 
 function build_docker_images() {
-    cd $WORKPATH
+    cd $WORKPATH/docker
     git clone https://github.com/opea-project/GenAIComps.git
-    cd GenAIComps
-
-    docker build -t opea/whisper-gaudi:latest  -f comps/asr/whisper/Dockerfile_hpu .
 
-    docker build -t opea/asr:latest  -f comps/asr/Dockerfile .
-    docker build -t opea/llm-tgi:latest -f comps/llms/text-generation/tgi/Dockerfile .
-    docker build -t opea/speecht5-gaudi:latest  -f comps/tts/speecht5/Dockerfile_hpu .
-    docker build -t opea/tts:latest  -f comps/tts/Dockerfile .
+    echo "Build all the images with --no-cache, check docker_image_build.log for details..."
+    service_list="audioqna whisper-gaudi asr llm-tgi speecht5-gaudi tts"
+    docker compose -f docker_build_compose.yaml build ${service_list} --no-cache > ${LOG_PATH}/docker_image_build.log
 
     docker pull ghcr.io/huggingface/tgi-gaudi:2.0.1
-
-    cd ..
-
-    cd $WORKPATH/docker
-    docker build --no-cache -t opea/audioqna:latest -f Dockerfile .
-
-    # cd $WORKPATH/docker/ui
-    # docker build --no-cache -t opea/audioqna-ui:latest -f docker/Dockerfile .
-
     docker images
 }
 
@@ -55,16 +47,6 @@ function start_services() {
 
     # sed -i "s/backend_address/$ip_address/g" $WORKPATH/docker/ui/svelte/.env
 
-    if [[ "$IMAGE_REPO" != "" ]]; then
-        # Replace the container name with a test-specific name
-        echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
-        sed -i "s#image: opea/audioqna:latest#image: opea/audioqna:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/audioqna-ui:latest#image: opea/audioqna-ui:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose.yaml
-        echo "cat compose.yaml"
-        cat compose.yaml
-    fi
-
     # Start Docker Containers
     docker compose up -d
     n=0
@@ -76,6 +58,16 @@ function start_services() {
        sleep 1s
        n=$((n+1))
     done
+
+    n=0
+    until [[ "$n" -ge 200 ]]; do
+       docker logs whisper-service > $LOG_PATH/whisper_service_start.log
+       if grep -q "Uvicorn server setup on port" $LOG_PATH/whisper_service_start.log; then
+           break
+       fi
+       sleep 1s
+       n=$((n+1))
+    done
 }
 
 
@@ -131,7 +123,7 @@ function stop_docker() {
 function main() {
 
     stop_docker
-    if [[ "$IMAGE_REPO" == "" ]]; then build_docker_images; fi
+    if [[ "$IMAGE_REPO" == "opea" ]]; then build_docker_images; fi
     start_services
 
     # validate_microservices
diff --git a/AudioQnA/tests/test_audioqna_on_xeon.sh b/AudioQnA/tests/test_audioqna_on_xeon.sh
index bb63402103..020a86999e 100644
--- a/AudioQnA/tests/test_audioqna_on_xeon.sh
+++ b/AudioQnA/tests/test_audioqna_on_xeon.sh
@@ -3,31 +3,26 @@
 # SPDX-License-Identifier: Apache-2.0
 
 set -e
-echo "IMAGE_REPO=${IMAGE_REPO}"
+IMAGE_REPO=${IMAGE_REPO:-"opea"}
+IMAGE_TAG=${IMAGE_TAG:-"latest"}
+echo "REGISTRY=IMAGE_REPO=${IMAGE_REPO}"
+echo "TAG=IMAGE_TAG=${IMAGE_TAG}"
+export REGISTRY=${IMAGE_REPO}
+export TAG=${IMAGE_TAG}
 
 WORKPATH=$(dirname "$PWD")
 LOG_PATH="$WORKPATH/tests"
 ip_address=$(hostname -I | awk '{print $1}')
 
 function build_docker_images() {
-    cd $WORKPATH
+    cd $WORKPATH/docker
     git clone https://github.com/opea-project/GenAIComps.git
-    cd GenAIComps
 
-    docker build -t opea/whisper:latest -f comps/asr/whisper/Dockerfile .
-    docker build -t opea/asr:latest -f comps/asr/Dockerfile .
-    docker build -t opea/llm-tgi:latest -f comps/llms/text-generation/tgi/Dockerfile .
-    docker build -t opea/speecht5:latest -f comps/tts/speecht5/Dockerfile .
-    docker build -t opea/tts:latest -f comps/tts/Dockerfile .
+    echo "Build all the images with --no-cache, check docker_image_build.log for details..."
+    service_list="audioqna whisper asr llm-tgi speecht5 tts"
+    docker compose -f docker_build_compose.yaml build ${service_list} --no-cache > ${LOG_PATH}/docker_image_build.log
 
     docker pull ghcr.io/huggingface/tgi-gaudi:2.0.1
-
-    cd $WORKPATH/docker
-    docker build --no-cache -t opea/audioqna:latest -f Dockerfile .
-
-    # cd $WORKPATH/docker/ui
-    # docker build --no-cache -t opea/audioqna-ui:latest -f docker/Dockerfile .
-
     docker images
 }
 
@@ -51,16 +46,6 @@ function start_services() {
 
     # sed -i "s/backend_address/$ip_address/g" $WORKPATH/docker/ui/svelte/.env
 
-    if [[ "$IMAGE_REPO" != "" ]]; then
-        # Replace the container name with a test-specific name
-        echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
-        sed -i "s#image: opea/audioqna:latest#image: opea/audioqna:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/audioqna-ui:latest#image: opea/audioqna-ui:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose.yaml
-        echo "cat compose.yaml"
-        cat compose.yaml
-    fi
-
     # Start Docker Containers
     docker compose up -d
     n=0
@@ -128,7 +113,7 @@ function stop_docker() {
 function main() {
 
     stop_docker
-    if [[ "$IMAGE_REPO" == "" ]]; then build_docker_images; fi
+    if [[ "$IMAGE_REPO" == "opea" ]]; then build_docker_images; fi
     start_services
 
     validate_megaservice
diff --git a/ChatQnA/docker/aipc/compose.yaml b/ChatQnA/docker/aipc/compose.yaml
index ec0970f645..fedbe12a8d 100644
--- a/ChatQnA/docker/aipc/compose.yaml
+++ b/ChatQnA/docker/aipc/compose.yaml
@@ -1,8 +1,6 @@
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-version: "3.8"
-
 services:
   redis-vector-db:
     image: redis/redis-stack:7.2.0-v9
@@ -11,7 +9,7 @@ services:
       - "6379:6379"
       - "8001:8001"
   dataprep-redis-service:
-    image: opea/dataprep-redis:latest
+    image: ${REGISTRY:-opea}/dataprep-redis:${TAG:-latest}
     container_name: dataprep-redis-server
     depends_on:
       - redis-vector-db
@@ -39,7 +37,7 @@ services:
       https_proxy: ${https_proxy}
     command: --model-id ${EMBEDDING_MODEL_ID} --auto-truncate
   embedding:
-    image: opea/embedding-tei:latest
+    image: ${REGISTRY:-opea}/embedding-tei:${TAG:-latest}
     container_name: embedding-tei-server
     depends_on:
       - tei-embedding-service
@@ -53,7 +51,7 @@ services:
       TEI_EMBEDDING_ENDPOINT: ${TEI_EMBEDDING_ENDPOINT}
     restart: unless-stopped
   retriever:
-    image: opea/retriever-redis:latest
+    image: ${REGISTRY:-opea}/retriever-redis:${TAG:-latest}
     container_name: retriever-redis-server
     depends_on:
       - redis-vector-db
@@ -85,7 +83,7 @@ services:
       HF_HUB_ENABLE_HF_TRANSFER: 0
     command: --model-id ${RERANK_MODEL_ID} --auto-truncate
   reranking:
-    image: opea/reranking-tei:latest
+    image: ${REGISTRY:-opea}/reranking-tei:${TAG:-latest}
     container_name: reranking-tei-aipc-server
     depends_on:
       - tei-reranking-service
@@ -102,7 +100,7 @@ services:
       HF_HUB_ENABLE_HF_TRANSFER: 0
     restart: unless-stopped
   llm:
-    image: opea/llm-ollama
+    image: ${REGISTRY:-opea}/llm-ollama
     container_name: llm-ollama
     ports:
       - "9000:9000"
@@ -118,7 +116,7 @@ services:
       OLLAMA_ENDPOINT: ${OLLAMA_ENDPOINT}
       OLLAMA_MODEL: ${OLLAMA_MODEL}
   chaqna-aipc-backend-server:
-    image: opea/chatqna:latest
+    image: ${REGISTRY:-opea}/chatqna:${TAG:-latest}
     container_name: chatqna-aipc-backend-server
     depends_on:
       - redis-vector-db
@@ -142,7 +140,7 @@ services:
     ipc: host
     restart: always
   chaqna-aipc-ui-server:
-    image: opea/chatqna-ui:latest
+    image: ${REGISTRY:-opea}/chatqna-ui:${TAG:-latest}
     container_name: chatqna-aipc-ui-server
     depends_on:
       - chaqna-aipc-backend-server
diff --git a/ChatQnA/docker/docker_build_compose.yaml b/ChatQnA/docker/docker_build_compose.yaml
new file mode 100644
index 0000000000..b55327ac5b
--- /dev/null
+++ b/ChatQnA/docker/docker_build_compose.yaml
@@ -0,0 +1,108 @@
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
+
+services:
+  chatqna:
+    build:
+      args:
+        http_proxy: ${http_proxy}
+        https_proxy: ${https_proxy}
+        no_proxy: ${no_proxy}
+      dockerfile: ./Dockerfile
+    image: ${REGISTRY:-opea}/chatqna:${TAG:-latest}
+  chatqna-ui:
+    build:
+      context: ui
+      dockerfile: ./docker/Dockerfile
+    extends: chatqna
+    image: ${REGISTRY:-opea}/chatqna-ui:${TAG:-latest}
+  chatqna-conversation-ui:
+    build:
+      context: ui
+      dockerfile: ./docker/Dockerfile.react
+    extends: chatqna
+    image: ${REGISTRY:-opea}/chatqna-conversation-ui:${TAG:-latest}
+  embedding-tei:
+    build:
+      context: GenAIComps
+      dockerfile: comps/embeddings/langchain/docker/Dockerfile
+    extends: chatqna
+    image: ${REGISTRY:-opea}/embedding-tei:${TAG:-latest}
+  retriever-redis:
+    build:
+      context: GenAIComps
+      dockerfile: comps/retrievers/langchain/redis/docker/Dockerfile
+    extends: chatqna
+    image: ${REGISTRY:-opea}/retriever-redis:${TAG:-latest}
+  retriever-qdrant:
+    build:
+      context: GenAIComps
+      dockerfile: comps/retrievers/haystack/qdrant/docker/Dockerfile
+    extends: chatqna
+    image: ${REGISTRY:-opea}/retriever-qdrant:${TAG:-latest}
+  reranking-tei:
+    build:
+      context: GenAIComps
+      dockerfile: comps/reranks/tei/docker/Dockerfile
+    extends: chatqna
+    image: ${REGISTRY:-opea}/reranking-tei:${TAG:-latest}
+  llm-tgi:
+    build:
+      context: GenAIComps
+      dockerfile: comps/llms/text-generation/tgi/Dockerfile
+    extends: chatqna
+    image: ${REGISTRY:-opea}/llm-tgi:${TAG:-latest}
+  llm-ollama:
+    build:
+      context: GenAIComps
+      dockerfile: comps/llms/text-generation/ollama/Dockerfile
+    extends: chatqna
+    image: ${REGISTRY:-opea}/llm-ollama:${TAG:-latest}
+  llm-vllm:
+    build:
+      context: GenAIComps
+      dockerfile: comps/llms/text-generation/vllm/docker/Dockerfile.microservice
+    extends: chatqna
+    image: ${REGISTRY:-opea}/llm-vllm:${TAG:-latest}
+  llm-vllm-hpu:
+    build:
+      context: GenAIComps
+      dockerfile: comps/llms/text-generation/vllm/docker/Dockerfile.hpu
+    extends: chatqna
+    image: ${REGISTRY:-opea}/llm-vllm-hpu:${TAG:-latest}
+  llm-vllm-ray:
+    build:
+      context: GenAIComps
+      dockerfile: comps/llms/text-generation/vllm-ray/docker/Dockerfile.microservice
+    extends: chatqna
+    image: ${REGISTRY:-opea}/llm-vllm-ray:${TAG:-latest}
+  llm-vllm-ray-hpu:
+    build:
+      context: GenAIComps
+      dockerfile: comps/llms/text-generation/vllm-ray/docker/Dockerfile.vllmray
+    extends: chatqna
+    image: ${REGISTRY:-opea}/llm-vllm-ray-hpu:${TAG:-latest}
+  dataprep-redis:
+    build:
+      context: GenAIComps
+      dockerfile: comps/dataprep/redis/langchain/docker/Dockerfile
+    extends: chatqna
+    image: ${REGISTRY:-opea}/dataprep-redis:${TAG:-latest}
+  dataprep-qdrant:
+    build:
+      context: GenAIComps
+      dockerfile: comps/dataprep/qdrant/docker/Dockerfile
+    extends: chatqna
+    image: ${REGISTRY:-opea}/dataprep-qdrant:${TAG:-latest}
+  tei-gaudi:
+    build:
+      context: tei-gaudi
+      dockerfile: Dockerfile-hpu
+    extends: chatqna
+    image: ${REGISTRY:-opea}/tei-gaudi:${TAG:-latest}
+  vllm:
+    build:
+      context: vllm
+      dockerfile: Dockerfile.cpu
+    extends: chatqna
+    image: ${REGISTRY:-opea}/vllm:${TAG:-latest}
diff --git a/ChatQnA/docker/gaudi/compose.yaml b/ChatQnA/docker/gaudi/compose.yaml
index 82b8d0b77d..e5327b6234 100644
--- a/ChatQnA/docker/gaudi/compose.yaml
+++ b/ChatQnA/docker/gaudi/compose.yaml
@@ -1,9 +1,6 @@
-
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-version: "3.8"
-
 services:
   redis-vector-db:
     image: redis/redis-stack:7.2.0-v9
@@ -12,7 +9,7 @@ services:
       - "6379:6379"
       - "8001:8001"
   dataprep-redis-service:
-    image: opea/dataprep-redis:latest
+    image: ${REGISTRY:-opea}/dataprep-redis:${TAG:-latest}
     container_name: dataprep-redis-server
     depends_on:
       - redis-vector-db
@@ -28,7 +25,7 @@ services:
       TEI_ENDPOINT: ${TEI_EMBEDDING_ENDPOINT}
       HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
   tei-embedding-service:
-    image: opea/tei-gaudi:latest
+    image: ${REGISTRY:-opea}/tei-gaudi:${TAG:-latest}
     container_name: tei-embedding-gaudi-server
     ports:
       - "8090:80"
@@ -49,7 +46,7 @@ services:
       ENABLE_EXPERIMENTAL_FLAGS: true
     command: --model-id ${EMBEDDING_MODEL_ID} --auto-truncate
   embedding:
-    image: opea/embedding-tei:latest
+    image: ${REGISTRY:-opea}/embedding-tei:${TAG:-latest}
     container_name: embedding-tei-server
     depends_on:
       - tei-embedding-service
@@ -63,7 +60,7 @@ services:
       TEI_EMBEDDING_ENDPOINT: ${TEI_EMBEDDING_ENDPOINT}
     restart: unless-stopped
   retriever:
-    image: opea/retriever-redis:latest
+    image: ${REGISTRY:-opea}/retriever-redis:${TAG:-latest}
     container_name: retriever-redis-server
     depends_on:
       - redis-vector-db
@@ -94,7 +91,7 @@ services:
       HF_HUB_ENABLE_HF_TRANSFER: 0
     command: --model-id ${RERANK_MODEL_ID} --auto-truncate
   reranking:
-    image: opea/reranking-tei:latest
+    image: ${REGISTRY:-opea}/reranking-tei:${TAG:-latest}
     container_name: reranking-tei-gaudi-server
     depends_on:
       - tei-reranking-service
@@ -132,7 +129,7 @@ services:
     ipc: host
     command: --model-id ${LLM_MODEL_ID} --max-input-length 1024 --max-total-tokens 2048
   llm:
-    image: opea/llm-tgi:latest
+    image: ${REGISTRY:-opea}/llm-tgi:${TAG:-latest}
     container_name: llm-tgi-gaudi-server
     depends_on:
       - tgi-service
@@ -149,7 +146,7 @@ services:
       HF_HUB_ENABLE_HF_TRANSFER: 0
     restart: unless-stopped
   chaqna-gaudi-backend-server:
-    image: opea/chatqna:latest
+    image: ${REGISTRY:-opea}/chatqna:${TAG:-latest}
     container_name: chatqna-gaudi-backend-server
     depends_on:
       - redis-vector-db
@@ -174,7 +171,7 @@ services:
     ipc: host
     restart: always
   chaqna-gaudi-ui-server:
-    image: opea/chatqna-ui:latest
+    image: ${REGISTRY:-opea}/chatqna-ui:${TAG:-latest}
     container_name: chatqna-gaudi-ui-server
     depends_on:
       - chaqna-gaudi-backend-server
diff --git a/ChatQnA/docker/gaudi/compose_guardrails.yaml b/ChatQnA/docker/gaudi/compose_guardrails.yaml
index 0454bb161d..5680155bd9 100644
--- a/ChatQnA/docker/gaudi/compose_guardrails.yaml
+++ b/ChatQnA/docker/gaudi/compose_guardrails.yaml
@@ -1,9 +1,6 @@
-
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-version: "3.8"
-
 services:
   redis-vector-db:
     image: redis/redis-stack:7.2.0-v9
@@ -12,7 +9,7 @@ services:
       - "6379:6379"
       - "8001:8001"
   dataprep-redis-service:
-    image: opea/dataprep-redis:latest
+    image: ${REGISTRY:-opea}/dataprep-redis:${TAG:-latest}
     container_name: dataprep-redis-server
     depends_on:
       - redis-vector-db
@@ -49,7 +46,7 @@ services:
     ipc: host
     command: --model-id ${GURADRAILS_MODEL_ID} --max-input-length 1024 --max-total-tokens 2048
   guardrails:
-    image: opea/guardrails-tgi:latest
+    image: ${REGISTRY:-opea}/guardrails-tgi:${TAG:-latest}
     container_name: guardrails-tgi-gaudi-server
     ports:
       - "9090:9090"
@@ -63,7 +60,7 @@ services:
       HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
     restart: unless-stopped
   tei-embedding-service:
-    image: opea/tei-gaudi:latest
+    image: ${REGISTRY:-opea}/tei-gaudi:${TAG:-latest}
     container_name: tei-embedding-gaudi-server
     ports:
       - "8090:80"
@@ -82,7 +79,7 @@ services:
       MAX_WARMUP_SEQUENCE_LENGTH: 512
     command: --model-id ${EMBEDDING_MODEL_ID} --auto-truncate
   embedding:
-    image: opea/embedding-tei:latest
+    image: ${REGISTRY:-opea}/embedding-tei:${TAG:-latest}
     container_name: embedding-tei-server
     depends_on:
       - tei-embedding-service
@@ -96,7 +93,7 @@ services:
       TEI_EMBEDDING_ENDPOINT: ${TEI_EMBEDDING_ENDPOINT}
     restart: unless-stopped
   retriever:
-    image: opea/retriever-redis:latest
+    image: ${REGISTRY:-opea}/retriever-redis:${TAG:-latest}
     container_name: retriever-redis-server
     depends_on:
       - redis-vector-db
@@ -127,7 +124,7 @@ services:
       HF_HUB_ENABLE_HF_TRANSFER: 0
     command: --model-id ${RERANK_MODEL_ID} --auto-truncate
   reranking:
-    image: opea/reranking-tei:latest
+    image: ${REGISTRY:-opea}/reranking-tei:${TAG:-latest}
     container_name: reranking-tei-gaudi-server
     depends_on:
       - tei-reranking-service
@@ -165,7 +162,7 @@ services:
     ipc: host
     command: --model-id ${LLM_MODEL_ID} --max-input-length 1024 --max-total-tokens 2048
   llm:
-    image: opea/llm-tgi:latest
+    image: ${REGISTRY:-opea}/llm-tgi:${TAG:-latest}
     container_name: llm-tgi-gaudi-server
     depends_on:
       - tgi-service
@@ -182,7 +179,7 @@ services:
       HF_HUB_ENABLE_HF_TRANSFER: 0
     restart: unless-stopped
   chaqna-gaudi-backend-server:
-    image: opea/chatqna-guardrails:latest
+    image: ${REGISTRY:-opea}/chatqna-guardrails:${TAG:-latest}
     container_name: chatqna-gaudi-guardrails-server
     depends_on:
       - redis-vector-db
@@ -210,7 +207,7 @@ services:
     ipc: host
     restart: always
   chaqna-gaudi-ui-server:
-    image: opea/chatqna-ui:latest
+    image: ${REGISTRY:-opea}/chatqna-ui:${TAG:-latest}
     container_name: chatqna-gaudi-ui-server
     depends_on:
       - chaqna-gaudi-backend-server
diff --git a/ChatQnA/docker/gaudi/compose_vllm.yaml b/ChatQnA/docker/gaudi/compose_vllm.yaml
index ec82c9f22e..5548b33557 100644
--- a/ChatQnA/docker/gaudi/compose_vllm.yaml
+++ b/ChatQnA/docker/gaudi/compose_vllm.yaml
@@ -1,9 +1,6 @@
-
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-version: "3.8"
-
 services:
   redis-vector-db:
     image: redis/redis-stack:7.2.0-v9
@@ -12,7 +9,7 @@ services:
       - "6379:6379"
       - "8001:8001"
   dataprep-redis-service:
-    image: opea/dataprep-redis:latest
+    image: ${REGISTRY:-opea}/dataprep-redis:${TAG:-latest}
     container_name: dataprep-redis-server
     depends_on:
       - redis-vector-db
@@ -28,7 +25,7 @@ services:
       TEI_ENDPOINT: ${TEI_EMBEDDING_ENDPOINT}
       HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
   tei-embedding-service:
-    image: opea/tei-gaudi:latest
+    image: ${REGISTRY:-opea}/tei-gaudi:${TAG:-latest}
     container_name: tei-embedding-gaudi-server
     ports:
       - "8090:80"
@@ -47,7 +44,7 @@ services:
       MAX_WARMUP_SEQUENCE_LENGTH: 512
     command: --model-id ${EMBEDDING_MODEL_ID}
   embedding:
-    image: opea/embedding-tei:latest
+    image: ${REGISTRY:-opea}/embedding-tei:${TAG:-latest}
     container_name: embedding-tei-server
     depends_on:
       - tei-embedding-service
@@ -61,7 +58,7 @@ services:
       TEI_EMBEDDING_ENDPOINT: ${TEI_EMBEDDING_ENDPOINT}
     restart: unless-stopped
   retriever:
-    image: opea/retriever-redis:latest
+    image: ${REGISTRY:-opea}/retriever-redis:${TAG:-latest}
     container_name: retriever-redis-server
     depends_on:
       - redis-vector-db
@@ -92,7 +89,7 @@ services:
       HF_HUB_ENABLE_HF_TRANSFER: 0
     command: --model-id ${RERANK_MODEL_ID} --auto-truncate
   reranking:
-    image: opea/reranking-tei:latest
+    image: ${REGISTRY:-opea}/reranking-tei:${TAG:-latest}
     container_name: reranking-tei-gaudi-server
     depends_on:
       - tei-reranking-service
@@ -109,7 +106,7 @@ services:
       HF_HUB_ENABLE_HF_TRANSFER: 0
     restart: unless-stopped
   vllm-service:
-    image: opea/llm-vllm-hpu:latest
+    image: ${REGISTRY:-opea}/llm-vllm-hpu:${TAG:-latest}
     container_name: vllm-gaudi-server
     ports:
       - "8007:80"
@@ -129,7 +126,7 @@ services:
     ipc: host
     command: /bin/bash -c "export VLLM_CPU_KVCACHE_SPACE=40 && python3 -m vllm.entrypoints.openai.api_server --enforce-eager --model $LLM_MODEL_ID --tensor-parallel-size 1 --host 0.0.0.0 --port 80 --block-size 128 --max-num-seqs 256 --max-seq_len-to-capture 2048"
   llm:
-    image: opea/llm-vllm:latest
+    image: ${REGISTRY:-opea}/llm-vllm:${TAG:-latest}
     container_name: llm-vllm-gaudi-server
     depends_on:
       - vllm-service
@@ -145,7 +142,7 @@ services:
       LLM_MODEL: ${LLM_MODEL_ID}
     restart: unless-stopped
   chaqna-gaudi-backend-server:
-    image: opea/chatqna:latest
+    image: ${REGISTRY:-opea}/chatqna:${TAG:-latest}
     container_name: chatqna-gaudi-backend-server
     depends_on:
       - redis-vector-db
@@ -171,7 +168,7 @@ services:
     ipc: host
     restart: always
   chaqna-gaudi-ui-server:
-    image: opea/chatqna-ui:latest
+    image: ${REGISTRY:-opea}/chatqna-ui:${TAG:-latest}
     container_name: chatqna-gaudi-ui-server
     depends_on:
       - chaqna-gaudi-backend-server
diff --git a/ChatQnA/docker/gaudi/compose_vllm_ray.yaml b/ChatQnA/docker/gaudi/compose_vllm_ray.yaml
index 5d98a16004..a0a00ea15a 100644
--- a/ChatQnA/docker/gaudi/compose_vllm_ray.yaml
+++ b/ChatQnA/docker/gaudi/compose_vllm_ray.yaml
@@ -1,9 +1,6 @@
-
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-version: "3.8"
-
 services:
   redis-vector-db:
     image: redis/redis-stack:7.2.0-v9
@@ -12,7 +9,7 @@ services:
       - "6379:6379"
       - "8001:8001"
   dataprep-redis-service:
-    image: opea/dataprep-redis:latest
+    image: ${REGISTRY:-opea}/dataprep-redis:${TAG:-latest}
     container_name: dataprep-redis-server
     depends_on:
       - redis-vector-db
@@ -28,7 +25,7 @@ services:
       TEI_ENDPOINT: ${TEI_EMBEDDING_ENDPOINT}
       HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
   tei-embedding-service:
-    image: opea/tei-gaudi:latest
+    image: ${REGISTRY:-opea}/tei-gaudi:${TAG:-latest}
     container_name: tei-embedding-gaudi-server
     ports:
       - "8090:80"
@@ -47,7 +44,7 @@ services:
       MAX_WARMUP_SEQUENCE_LENGTH: 512
     command: --model-id ${EMBEDDING_MODEL_ID}
   embedding:
-    image: opea/embedding-tei:latest
+    image: ${REGISTRY:-opea}/embedding-tei:${TAG:-latest}
     container_name: embedding-tei-server
     depends_on:
       - tei-embedding-service
@@ -61,7 +58,7 @@ services:
       TEI_EMBEDDING_ENDPOINT: ${TEI_EMBEDDING_ENDPOINT}
     restart: unless-stopped
   retriever:
-    image: opea/retriever-redis:latest
+    image: ${REGISTRY:-opea}/retriever-redis:${TAG:-latest}
     container_name: retriever-redis-server
     depends_on:
       - redis-vector-db
@@ -92,7 +89,7 @@ services:
       HF_HUB_ENABLE_HF_TRANSFER: 0
     command: --model-id ${RERANK_MODEL_ID} --auto-truncate
   reranking:
-    image: opea/reranking-tei:latest
+    image: ${REGISTRY:-opea}/reranking-tei:${TAG:-latest}
     container_name: reranking-tei-gaudi-server
     depends_on:
       - tei-reranking-service
@@ -109,7 +106,7 @@ services:
       HF_HUB_ENABLE_HF_TRANSFER: 0
     restart: unless-stopped
   vllm-ray-service:
-    image: opea/llm-vllm-ray-hpu:latest
+    image: ${REGISTRY:-opea}/llm-vllm-ray-hpu:${TAG:-latest}
     container_name: vllm-ray-gaudi-server
     ports:
       - "8006:8000"
@@ -129,7 +126,7 @@ services:
     ipc: host
     command: /bin/bash -c "ray start --head && python vllm_ray_openai.py --port_number 8000 --model_id_or_path $LLM_MODEL_ID --tensor_parallel_size 2 --enforce_eager True"
   llm:
-    image: opea/llm-vllm-ray:latest
+    image: ${REGISTRY:-opea}/llm-vllm-ray:${TAG:-latest}
     container_name: llm-vllm-ray-gaudi-server
     depends_on:
       - vllm-ray-service
@@ -145,7 +142,7 @@ services:
       LLM_MODEL: ${LLM_MODEL_ID}
     restart: unless-stopped
   chaqna-gaudi-backend-server:
-    image: opea/chatqna:latest
+    image: ${REGISTRY:-opea}/chatqna:${TAG:-latest}
     container_name: chatqna-gaudi-backend-server
     depends_on:
       - redis-vector-db
@@ -171,7 +168,7 @@ services:
     ipc: host
     restart: always
   chaqna-gaudi-ui-server:
-    image: opea/chatqna-ui:latest
+    image: ${REGISTRY:-opea}/chatqna-ui:${TAG:-latest}
     container_name: chatqna-gaudi-ui-server
     depends_on:
       - chaqna-gaudi-backend-server
diff --git a/ChatQnA/docker/gpu/compose.yaml b/ChatQnA/docker/gpu/compose.yaml
index 13f0a3fbc3..31bcfac9ac 100644
--- a/ChatQnA/docker/gpu/compose.yaml
+++ b/ChatQnA/docker/gpu/compose.yaml
@@ -1,9 +1,6 @@
-
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-version: "3.8"
-
 services:
   redis-vector-db:
     image: redis/redis-stack:7.2.0-v9
@@ -12,7 +9,7 @@ services:
       - "6379:6379"
       - "8001:8001"
   dataprep-redis-service:
-    image: opea/dataprep-redis:latest
+    image: ${REGISTRY:-opea}/dataprep-redis:${TAG:-latest}
     container_name: dataprep-redis-server
     depends_on:
       - redis-vector-db
@@ -50,7 +47,7 @@ services:
               count: 1
               capabilities: [gpu]
   embedding:
-    image: opea/embedding-tei:latest
+    image: ${REGISTRY:-opea}/embedding-tei:${TAG:-latest}
     container_name: embedding-tei-server
     depends_on:
       - tei-embedding-service
@@ -64,7 +61,7 @@ services:
       TEI_EMBEDDING_ENDPOINT: ${TEI_EMBEDDING_ENDPOINT}
     restart: unless-stopped
   retriever:
-    image: opea/retriever-redis:latest
+    image: ${REGISTRY:-opea}/retriever-redis:${TAG:-latest}
     container_name: retriever-redis-server
     depends_on:
       - redis-vector-db
@@ -102,7 +99,7 @@ services:
               count: 1
               capabilities: [gpu]
   reranking:
-    image: opea/reranking-tei:latest
+    image: ${REGISTRY:-opea}/reranking-tei:${TAG:-latest}
     container_name: reranking-tei-server
     depends_on:
       - tei-reranking-service
@@ -142,7 +139,7 @@ services:
               count: 1
               capabilities: [gpu]
   llm:
-    image: opea/llm-tgi:latest
+    image: ${REGISTRY:-opea}/llm-tgi:${TAG:-latest}
     container_name: llm-tgi-server
     depends_on:
       - tgi-service
@@ -159,7 +156,7 @@ services:
       HF_HUB_ENABLE_HF_TRANSFER: 0
     restart: unless-stopped
   chaqna-backend-server:
-    image: opea/chatqna:latest
+    image: ${REGISTRY:-opea}/chatqna:${TAG:-latest}
     container_name: chatqna-backend-server
     depends_on:
       - redis-vector-db
@@ -184,7 +181,7 @@ services:
     ipc: host
     restart: always
   chaqna-ui-server:
-    image: opea/chatqna-ui:latest
+    image: ${REGISTRY:-opea}/chatqna-ui:${TAG:-latest}
     container_name: chatqna-ui-server
     depends_on:
       - chaqna-backend-server
diff --git a/ChatQnA/docker/xeon/compose.yaml b/ChatQnA/docker/xeon/compose.yaml
index 6c996a7357..3bad42f577 100644
--- a/ChatQnA/docker/xeon/compose.yaml
+++ b/ChatQnA/docker/xeon/compose.yaml
@@ -1,9 +1,6 @@
-
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-version: "3.8"
-
 services:
   redis-vector-db:
     image: redis/redis-stack:7.2.0-v9
@@ -12,7 +9,7 @@ services:
       - "6379:6379"
       - "8001:8001"
   dataprep-redis-service:
-    image: opea/dataprep-redis:latest
+    image: ${REGISTRY:-opea}/dataprep-redis:${TAG:-latest}
     container_name: dataprep-redis-server
     depends_on:
       - redis-vector-db
@@ -42,7 +39,7 @@ services:
       https_proxy: ${https_proxy}
     command: --model-id ${EMBEDDING_MODEL_ID} --auto-truncate
   embedding:
-    image: opea/embedding-tei:latest
+    image: ${REGISTRY:-opea}/embedding-tei:${TAG:-latest}
     container_name: embedding-tei-server
     depends_on:
       - tei-embedding-service
@@ -56,7 +53,7 @@ services:
       TEI_EMBEDDING_ENDPOINT: ${TEI_EMBEDDING_ENDPOINT}
     restart: unless-stopped
   retriever:
-    image: opea/retriever-redis:latest
+    image: ${REGISTRY:-opea}/retriever-redis:${TAG:-latest}
     container_name: retriever-redis-server
     depends_on:
       - redis-vector-db
@@ -88,7 +85,7 @@ services:
       HF_HUB_ENABLE_HF_TRANSFER: 0
     command: --model-id ${RERANK_MODEL_ID} --auto-truncate
   reranking:
-    image: opea/reranking-tei:latest
+    image: ${REGISTRY:-opea}/reranking-tei:${TAG:-latest}
     container_name: reranking-tei-xeon-server
     depends_on:
       - tei-reranking-service
@@ -121,7 +118,7 @@ services:
       HF_HUB_ENABLE_HF_TRANSFER: 0
     command: --model-id ${LLM_MODEL_ID}
   llm:
-    image: opea/llm-tgi:latest
+    image: ${REGISTRY:-opea}/llm-tgi:${TAG:-latest}
     container_name: llm-tgi-server
     depends_on:
       - tgi-service
@@ -138,7 +135,7 @@ services:
       HF_HUB_ENABLE_HF_TRANSFER: 0
     restart: unless-stopped
   chaqna-xeon-backend-server:
-    image: opea/chatqna:latest
+    image: ${REGISTRY:-opea}/chatqna:${TAG:-latest}
     container_name: chatqna-xeon-backend-server
     depends_on:
       - redis-vector-db
@@ -164,7 +161,7 @@ services:
     ipc: host
     restart: always
   chaqna-xeon-ui-server:
-    image: opea/chatqna-ui:latest
+    image: ${REGISTRY:-opea}/chatqna-ui:${TAG:-latest}
     container_name: chatqna-xeon-ui-server
     depends_on:
       - chaqna-xeon-backend-server
diff --git a/ChatQnA/docker/xeon/compose_qdrant.yaml b/ChatQnA/docker/xeon/compose_qdrant.yaml
index b64dced553..9c4bbf023f 100644
--- a/ChatQnA/docker/xeon/compose_qdrant.yaml
+++ b/ChatQnA/docker/xeon/compose_qdrant.yaml
@@ -1,9 +1,6 @@
-
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-version: "3.8"
-
 services:
   qdrant-vector-db:
     image: qdrant/qdrant
@@ -12,7 +9,7 @@ services:
       - "6333:6333"
       - "6334:6334"
   dataprep-qdrant-service:
-    image: opea/dataprep-qdrant:latest
+    image: ${REGISTRY:-opea}/dataprep-qdrant:${TAG:-latest}
     container_name: dataprep-qdrant-server
     depends_on:
       - qdrant-vector-db
@@ -42,7 +39,7 @@ services:
       https_proxy: ${https_proxy}
     command: --model-id ${EMBEDDING_MODEL_ID} --auto-truncate
   embedding:
-    image: opea/embedding-tei:latest
+    image: ${REGISTRY:-opea}/embedding-tei:${TAG:-latest}
     container_name: embedding-tei-server
     depends_on:
       - tei-embedding-service
@@ -56,7 +53,7 @@ services:
       TEI_EMBEDDING_ENDPOINT: ${TEI_EMBEDDING_ENDPOINT}
     restart: unless-stopped
   retriever:
-    image: opea/retriever-qdrant:latest
+    image: ${REGISTRY:-opea}/retriever-qdrant:${TAG:-latest}
     container_name: retriever-qdrant-server
     depends_on:
       - qdrant-vector-db
@@ -88,7 +85,7 @@ services:
       HF_HUB_ENABLE_HF_TRANSFER: 0
     command: --model-id ${RERANK_MODEL_ID} --auto-truncate
   reranking:
-    image: opea/reranking-tei:latest
+    image: ${REGISTRY:-opea}/reranking-tei:${TAG:-latest}
     container_name: reranking-tei-xeon-server
     depends_on:
       - tei-reranking-service
@@ -121,7 +118,7 @@ services:
       HF_HUB_ENABLE_HF_TRANSFER: 0
     command: --model-id ${LLM_MODEL_ID}
   llm:
-    image: opea/llm-tgi:latest
+    image: ${REGISTRY:-opea}/llm-tgi:${TAG:-latest}
     container_name: llm-tgi-server
     depends_on:
       - tgi-service
@@ -138,7 +135,7 @@ services:
       HF_HUB_ENABLE_HF_TRANSFER: 0
     restart: unless-stopped
   chaqna-xeon-backend-server:
-    image: opea/chatqna:latest
+    image: ${REGISTRY:-opea}/chatqna:${TAG:-latest}
     container_name: chatqna-xeon-backend-server
     depends_on:
       - qdrant-vector-db
@@ -167,7 +164,7 @@ services:
     ipc: host
     restart: always
   chaqna-xeon-ui-server:
-    image: opea/chatqna-ui:latest
+    image: ${REGISTRY:-opea}/chatqna-ui:${TAG:-latest}
     container_name: chatqna-xeon-ui-server
     depends_on:
       - chaqna-xeon-backend-server
diff --git a/ChatQnA/docker/xeon/compose_vllm.yaml b/ChatQnA/docker/xeon/compose_vllm.yaml
index b66218c9aa..4cca92c1f9 100644
--- a/ChatQnA/docker/xeon/compose_vllm.yaml
+++ b/ChatQnA/docker/xeon/compose_vllm.yaml
@@ -1,9 +1,6 @@
-
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-version: "3.8"
-
 services:
   redis-vector-db:
     image: redis/redis-stack:7.2.0-v9
@@ -12,7 +9,7 @@ services:
       - "6379:6379"
       - "8001:8001"
   dataprep-redis-service:
-    image: opea/dataprep-redis:latest
+    image: ${REGISTRY:-opea}/dataprep-redis:${TAG:-latest}
     container_name: dataprep-redis-server
     depends_on:
       - redis-vector-db
@@ -41,7 +38,7 @@ services:
       https_proxy: ${https_proxy}
     command: --model-id ${EMBEDDING_MODEL_ID} --auto-truncate
   embedding:
-    image: opea/embedding-tei:latest
+    image: ${REGISTRY:-opea}/embedding-tei:${TAG:-latest}
     container_name: embedding-tei-server
     depends_on:
       - tei-embedding-service
@@ -58,7 +55,7 @@ services:
       LANGCHAIN_PROJECT: "opea-embedding-service"
     restart: unless-stopped
   retriever:
-    image: opea/retriever-redis:latest
+    image: ${REGISTRY:-opea}/retriever-redis:${TAG:-latest}
     container_name: retriever-redis-server
     depends_on:
       - redis-vector-db
@@ -93,7 +90,7 @@ services:
       HF_HUB_ENABLE_HF_TRANSFER: 0
     command: --model-id ${RERANK_MODEL_ID} --auto-truncate
   reranking:
-    image: opea/reranking-tei:latest
+    image: ${REGISTRY:-opea}/reranking-tei:${TAG:-latest}
     container_name: reranking-tei-xeon-server
     depends_on:
       - tei-reranking-service
@@ -113,7 +110,7 @@ services:
       LANGCHAIN_PROJECT: "opea-reranking-service"
     restart: unless-stopped
   vllm_service:
-    image: opea/vllm:latest
+    image: ${REGISTRY:-opea}/vllm:${TAG:-latest}
     container_name: vllm-service
     ports:
       - "9009:80"
@@ -128,7 +125,7 @@ services:
       LLM_MODEL_ID: ${LLM_MODEL_ID}
     command: --model $LLM_MODEL_ID --host 0.0.0.0 --port 80
   llm:
-    image: opea/llm-vllm:latest
+    image: ${REGISTRY:-opea}/llm-vllm:${TAG:-latest}
     container_name: llm-vllm-server
     depends_on:
       - vllm_service
@@ -149,7 +146,7 @@ services:
       LANGCHAIN_PROJECT: "opea-llm-service"
     restart: unless-stopped
   chaqna-xeon-backend-server:
-    image: opea/chatqna:latest
+    image: ${REGISTRY:-opea}/chatqna:${TAG:-latest}
     container_name: chatqna-xeon-backend-server
     depends_on:
       - redis-vector-db
@@ -174,7 +171,7 @@ services:
     ipc: host
     restart: always
   chaqna-xeon-ui-server:
-    image: opea/chatqna-ui:latest
+    image: ${REGISTRY:-opea}/chatqna-ui:${TAG:-latest}
     container_name: chatqna-xeon-ui-server
     depends_on:
       - chaqna-xeon-backend-server
diff --git a/ChatQnA/tests/test_chatqna_on_gaudi.sh b/ChatQnA/tests/test_chatqna_on_gaudi.sh
index 7c25cb0033..a50e256eab 100644
--- a/ChatQnA/tests/test_chatqna_on_gaudi.sh
+++ b/ChatQnA/tests/test_chatqna_on_gaudi.sh
@@ -3,47 +3,33 @@
 # SPDX-License-Identifier: Apache-2.0
 
 set -e
-echo "IMAGE_REPO=${IMAGE_REPO}"
+IMAGE_REPO=${IMAGE_REPO:-"opea"}
+IMAGE_TAG=${IMAGE_TAG:-"latest"}
+echo "REGISTRY=IMAGE_REPO=${IMAGE_REPO}"
+echo "TAG=IMAGE_TAG=${IMAGE_TAG}"
+export REGISTRY=${IMAGE_REPO}
+export TAG=${IMAGE_TAG}
 
 WORKPATH=$(dirname "$PWD")
 LOG_PATH="$WORKPATH/tests"
 ip_address=$(hostname -I | awk '{print $1}')
 
 function build_docker_images() {
-    cd $WORKPATH
+    cd $WORKPATH/docker
     git clone https://github.com/opea-project/GenAIComps.git
-    cd GenAIComps
-
-    docker build -t opea/embedding-tei:latest -f comps/embeddings/langchain/docker/Dockerfile .
-    docker build -t opea/retriever-redis:latest -f comps/retrievers/langchain/redis/docker/Dockerfile .
-    docker build -t opea/reranking-tei:latest -f comps/reranks/tei/docker/Dockerfile .
-    docker build -t opea/llm-tgi:latest -f comps/llms/text-generation/tgi/Dockerfile .
-    docker build -t opea/dataprep-redis:latest -f comps/dataprep/redis/langchain/docker/Dockerfile .
+    git clone https://github.com/huggingface/tei-gaudi
 
-#    cd ..
-#    git clone https://github.com/huggingface/tei-gaudi
-#    cd tei-gaudi/
-#    docker build --no-cache -f Dockerfile-hpu -t opea/tei-gaudi:latest .
+    echo "Build all the images with --no-cache, check docker_image_build.log for details..."
+    service_list="chatqna chatqna-ui dataprep-redis embedding-tei retriever-redis reranking-tei llm-tgi tei-gaudi"
+    docker compose -f docker_build_compose.yaml build ${service_list} --no-cache > ${LOG_PATH}/docker_image_build.log
 
     docker pull ghcr.io/huggingface/tgi-gaudi:2.0.1
     docker pull ghcr.io/huggingface/text-embeddings-inference:cpu-1.5
 
-    cd $WORKPATH/docker
-    docker build --no-cache -t opea/chatqna:latest -f Dockerfile .
-
-    cd $WORKPATH/docker/ui
-    docker build --no-cache -t opea/chatqna-ui:latest -f docker/Dockerfile .
-
     docker images
 }
 
 function start_services() {
-    # build tei-gaudi for each test instead of pull from local registry
-    cd $WORKPATH
-    git clone https://github.com/huggingface/tei-gaudi
-    cd tei-gaudi/
-    docker build --no-cache -q -f Dockerfile-hpu -t opea/tei-gaudi:latest .
-
     cd $WORKPATH/docker/gaudi
     export EMBEDDING_MODEL_ID="BAAI/bge-base-en-v1.5"
     export RERANK_MODEL_ID="BAAI/bge-reranker-base"
@@ -67,24 +53,9 @@ function start_services() {
 
     sed -i "s/backend_address/$ip_address/g" $WORKPATH/docker/ui/svelte/.env
 
-    if [[ "$IMAGE_REPO" != "" ]]; then
-        # Replace the container name with a test-specific name
-        echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
-        if [ "${mode}" == "perf" ]; then
-            sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose.yaml
-        else
-            sed -i "s#image: opea/chatqna:latest#image: opea/chatqna:${IMAGE_TAG}#g" compose.yaml
-            sed -i "s#image: opea/chatqna-ui:latest#image: opea/chatqna-ui:${IMAGE_TAG}#g" compose.yaml
-            sed -i "s#image: opea/chatqna-conversation-ui:latest#image: opea/chatqna-conversation-ui:${IMAGE_TAG}#g" compose.yaml
-            sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose.yaml
-            sed -i "s#image: ${IMAGE_REPO}opea/tei-gaudi:latest#image: opea/tei-gaudi:latest#g" compose.yaml
-        fi
-        echo "cat compose.yaml"
-        cat compose.yaml
-    fi
-
     # Start Docker Containers
     docker compose up -d
+
     n=0
     until [[ "$n" -ge 400 ]]; do
         docker logs tgi-gaudi-server > ${LOG_PATH}/tgi_service_start.log
@@ -246,13 +217,16 @@ function validate_frontend() {
     cd $WORKPATH/docker/ui/svelte
     local conda_env_name="OPEA_e2e"
     export PATH=${HOME}/miniforge3/bin/:$PATH
-#    conda remove -n ${conda_env_name} --all -y
-#    conda create -n ${conda_env_name} python=3.12 -y
+    if conda info --envs | grep -q "$conda_env_name"; then
+        echo "$conda_env_name exist!"
+    else
+        conda create -n ${conda_env_name} python=3.12 -y
+    fi
     source activate ${conda_env_name}
 
     sed -i "s/localhost/$ip_address/g" playwright.config.ts
 
-#    conda install -c conda-forge nodejs -y
+    conda install -c conda-forge nodejs -y
     npm install && npm ci && npx playwright install --with-deps
     node -v && npm -v && pip list
 
@@ -275,7 +249,7 @@ function stop_docker() {
 function main() {
 
     stop_docker
-    if [[ "$IMAGE_REPO" == "" ]]; then build_docker_images; fi
+    if [[ "$IMAGE_REPO" == "opea" ]]; then build_docker_images; fi
     start_time=$(date +%s)
     start_services
     end_time=$(date +%s)
diff --git a/ChatQnA/tests/test_chatqna_on_xeon.sh b/ChatQnA/tests/test_chatqna_on_xeon.sh
index bff1c55277..9d9c9215d2 100644
--- a/ChatQnA/tests/test_chatqna_on_xeon.sh
+++ b/ChatQnA/tests/test_chatqna_on_xeon.sh
@@ -2,29 +2,28 @@
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-set -xe
-echo "IMAGE_REPO=${IMAGE_REPO}"
+set -e
+IMAGE_REPO=${IMAGE_REPO:-"opea"}
+IMAGE_TAG=${IMAGE_TAG:-"latest"}
+echo "REGISTRY=IMAGE_REPO=${IMAGE_REPO}"
+echo "TAG=IMAGE_TAG=${IMAGE_TAG}"
+export REGISTRY=${IMAGE_REPO}
+export TAG=${IMAGE_TAG}
 
 WORKPATH=$(dirname "$PWD")
 LOG_PATH="$WORKPATH/tests"
 ip_address=$(hostname -I | awk '{print $1}')
 
 function build_docker_images() {
-    cd $WORKPATH
+    cd $WORKPATH/docker
     git clone https://github.com/opea-project/GenAIComps.git
-    cd GenAIComps
-
-    docker build -t opea/embedding-tei:latest -f comps/embeddings/langchain/docker/Dockerfile .
-    docker build -t opea/retriever-redis:latest -f comps/retrievers/langchain/redis/docker/Dockerfile .
-    docker build -t opea/reranking-tei:latest -f comps/reranks/tei/docker/Dockerfile .
-    docker build -t opea/llm-tgi:latest -f comps/llms/text-generation/tgi/Dockerfile .
-    docker build -t opea/dataprep-redis:latest -f comps/dataprep/redis/langchain/docker/Dockerfile .
 
-    cd $WORKPATH/docker
-    docker build --no-cache -t opea/chatqna:latest -f Dockerfile .
+    echo "Build all the images with --no-cache, check docker_image_build.log for details..."
+    service_list="chatqna chatqna-ui chatqna-conversation-ui dataprep-redis embedding-tei retriever-redis reranking-tei llm-tgi"
+    docker compose -f docker_build_compose.yaml build ${service_list} --no-cache > ${LOG_PATH}/docker_image_build.log
 
-    cd $WORKPATH/docker/ui
-    docker build --no-cache -t opea/chatqna-ui:latest -f docker/Dockerfile .
+    docker pull ghcr.io/huggingface/tgi-gaudi:2.0.1
+    docker pull ghcr.io/huggingface/text-embeddings-inference:cpu-1.5
 
     docker images
 }
@@ -54,21 +53,6 @@ function start_services() {
 
     sed -i "s/backend_address/$ip_address/g" $WORKPATH/docker/ui/svelte/.env
 
-    if [[ "$IMAGE_REPO" != "" ]]; then
-        # Replace the container name with a test-specific name
-        echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
-        if [ "${mode}" == "perf" ]; then
-            sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose.yaml
-        else
-            sed -i "s#image: opea/chatqna:latest#image: opea/chatqna:${IMAGE_TAG}#g" compose.yaml
-            sed -i "s#image: opea/chatqna-ui:latest#image: opea/chatqna-ui:${IMAGE_TAG}#g" compose.yaml
-            sed -i "s#image: opea/chatqna-conversation-ui:latest#image: opea/chatqna-conversation-ui:${IMAGE_TAG}#g" compose.yaml
-            sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose.yaml
-        fi
-        echo "cat compose.yaml"
-        cat compose.yaml
-    fi
-
     # Start Docker Containers
     docker compose up -d
     n=0
@@ -233,14 +217,17 @@ function validate_frontend() {
     cd $WORKPATH/docker/ui/svelte
     local conda_env_name="OPEA_e2e"
     export PATH=${HOME}/miniforge3/bin/:$PATH
-#    conda remove -n ${conda_env_name} --all -y
-#    conda create -n ${conda_env_name} python=3.12 -y
+    if conda info --envs | grep -q "$conda_env_name"; then
+        echo "$conda_env_name exist!"
+    else
+        conda create -n ${conda_env_name} python=3.12 -y
+    fi
     source activate ${conda_env_name}
     echo "[ TEST INFO ]: --------- conda env activated ---------"
 
     sed -i "s/localhost/$ip_address/g" playwright.config.ts
 
-#    conda install -c conda-forge nodejs -y
+    conda install -c conda-forge nodejs -y
     npm install && npm ci && npx playwright install --with-deps
     node -v && npm -v && pip list
 
@@ -263,7 +250,7 @@ function stop_docker() {
 function main() {
 
     stop_docker
-    if [[ "$IMAGE_REPO" == "" ]]; then build_docker_images; fi
+    if [[ "$IMAGE_REPO" == "opea" ]]; then build_docker_images; fi
     start_time=$(date +%s)
     start_services
     end_time=$(date +%s)
diff --git a/ChatQnA/tests/test_chatqna_qdrant_on_xeon.sh b/ChatQnA/tests/test_chatqna_qdrant_on_xeon.sh
index 774a6bfb6c..18154764bc 100644
--- a/ChatQnA/tests/test_chatqna_qdrant_on_xeon.sh
+++ b/ChatQnA/tests/test_chatqna_qdrant_on_xeon.sh
@@ -3,28 +3,24 @@
 # SPDX-License-Identifier: Apache-2.0
 
 set -e
-echo "IMAGE_REPO=${IMAGE_REPO}"
+IMAGE_REPO=${IMAGE_REPO:-"opea"}
+IMAGE_TAG=${IMAGE_TAG:-"latest"}
+echo "REGISTRY=IMAGE_REPO=${IMAGE_REPO}"
+echo "TAG=IMAGE_TAG=${IMAGE_TAG}"
+export REGISTRY=${IMAGE_REPO}
+export TAG=${IMAGE_TAG}
 
 WORKPATH=$(dirname "$PWD")
 LOG_PATH="$WORKPATH/tests"
 ip_address=$(hostname -I | awk '{print $1}')
 
 function build_docker_images() {
-    cd $WORKPATH
-    git clone https://github.com/opea-project/GenAIComps.git
-    cd GenAIComps
-
-    docker build -t opea/embedding-tei:latest -f comps/embeddings/langchain/docker/Dockerfile .
-    docker build -t opea/retriever-qdrant:latest -f comps/retrievers/haystack/qdrant/docker/Dockerfile .
-    docker build -t opea/reranking-tei:latest -f comps/reranks/tei/docker/Dockerfile .
-    docker build -t opea/llm-tgi:latest -f comps/llms/text-generation/tgi/Dockerfile .
-    docker build -t opea/dataprep-qdrant:latest -f comps/dataprep/qdrant/docker/Dockerfile .
-
     cd $WORKPATH/docker
-    docker build --no-cache -t opea/chatqna:latest -f Dockerfile .
+    git clone https://github.com/opea-project/GenAIComps.git
 
-    cd $WORKPATH/docker/ui
-    docker build --no-cache -t opea/chatqna-ui:latest -f docker/Dockerfile .
+    echo "Build all the images with --no-cache, check docker_image_build.log for details..."
+    service_list="chatqna chatqna-ui dataprep-qdrant embedding-tei retriever-qdrant reranking-tei llm-tgi"
+    docker compose -f docker_build_compose.yaml build ${service_list} --no-cache > ${LOG_PATH}/docker_image_build.log
 
     docker images
 }
@@ -56,16 +52,6 @@ function start_services() {
 
     sed -i "s/backend_address/$ip_address/g" $WORKPATH/docker/ui/svelte/.env
 
-    if [[ "$IMAGE_REPO" != "" ]]; then
-        # Replace the container name with a test-specific name
-        echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
-        sed -i "s#image: opea/chatqna:latest#image: opea/chatqna:${IMAGE_TAG}#g" compose_qdrant.yaml
-        sed -i "s#image: opea/chatqna-ui:latest#image: opea/chatqna-ui:${IMAGE_TAG}#g" compose_qdrant.yaml
-        sed -i "s#image: opea/chatqna-conversation-ui:latest#image: opea/chatqna-conversation-ui:${IMAGE_TAG}#g" compose_qdrant.yaml
-        sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose_qdrant.yaml
-        cat compose_qdrant.yaml
-    fi
-
     # Start Docker Containers
     docker compose -f compose_qdrant.yaml up -d
     n=0
@@ -235,7 +221,7 @@ function stop_docker() {
 function main() {
 
     stop_docker
-    if [[ "$IMAGE_REPO" == "" ]]; then build_docker_images; fi
+    if [[ "$IMAGE_REPO" == "opea" ]]; then build_docker_images; fi
     start_time=$(date +%s)
     start_services
     end_time=$(date +%s)
diff --git a/ChatQnA/tests/test_chatqna_vllm_on_gaudi.sh b/ChatQnA/tests/test_chatqna_vllm_on_gaudi.sh
index 99e63e06ba..cff22f6e05 100644
--- a/ChatQnA/tests/test_chatqna_vllm_on_gaudi.sh
+++ b/ChatQnA/tests/test_chatqna_vllm_on_gaudi.sh
@@ -3,47 +3,31 @@
 # SPDX-License-Identifier: Apache-2.0
 
 set -e
-echo "IMAGE_REPO=${IMAGE_REPO}"
+IMAGE_REPO=${IMAGE_REPO:-"opea"}
+IMAGE_TAG=${IMAGE_TAG:-"latest"}
+echo "REGISTRY=IMAGE_REPO=${IMAGE_REPO}"
+echo "TAG=IMAGE_TAG=${IMAGE_TAG}"
+export REGISTRY=${IMAGE_REPO}
+export TAG=${IMAGE_TAG}
 
 WORKPATH=$(dirname "$PWD")
 LOG_PATH="$WORKPATH/tests"
 ip_address=$(hostname -I | awk '{print $1}')
 
 function build_docker_images() {
-    cd $WORKPATH
+    cd $WORKPATH/docker
     git clone https://github.com/opea-project/GenAIComps.git
-    cd GenAIComps
-
-    docker build -t opea/embedding-tei:latest -f comps/embeddings/langchain/docker/Dockerfile .
-    docker build -t opea/retriever-redis:latest -f comps/retrievers/langchain/redis/docker/Dockerfile .
-    docker build -t opea/reranking-tei:latest -f comps/reranks/tei/docker/Dockerfile .
-    docker build -t opea/llm-vllm-hpu:latest -f comps/llms/text-generation/vllm/docker/Dockerfile.hpu .
-    docker build -t opea/llm-vllm:latest -f comps/llms/text-generation/vllm/docker/Dockerfile.microservice .
-    docker build -t opea/dataprep-redis:latest -f comps/dataprep/redis/langchain/docker/Dockerfile .
+    git clone https://github.com/huggingface/tei-gaudi
 
-#    cd ..
-#    git clone https://github.com/huggingface/tei-gaudi
-#    cd tei-gaudi/
-#    docker build --no-cache -f Dockerfile-hpu -t opea/tei-gaudi:latest .
+    echo "Build all the images with --no-cache, check docker_image_build.log for details..."
+    service_list="chatqna chatqna-ui dataprep-redis embedding-tei retriever-redis reranking-tei tei-gaudi llm-vllm-hpu llm-vllm"
+    docker compose -f docker_build_compose.yaml build ${service_list} --no-cache > ${LOG_PATH}/docker_image_build.log
 
     docker pull ghcr.io/huggingface/text-embeddings-inference:cpu-1.2
-
-    cd $WORKPATH/docker
-    docker build --no-cache -t opea/chatqna:latest -f Dockerfile .
-
-    cd $WORKPATH/docker/ui
-    docker build --no-cache -t opea/chatqna-ui:latest -f docker/Dockerfile .
-
     docker images
 }
 
 function start_services() {
-    # build tei-gaudi for each test instead of pull from local registry
-    cd $WORKPATH
-    git clone https://github.com/huggingface/tei-gaudi
-    cd tei-gaudi/
-    docker build --no-cache -q -f Dockerfile-hpu -t opea/tei-gaudi:latest .
-
     cd $WORKPATH/docker/gaudi
     export EMBEDDING_MODEL_ID="BAAI/bge-base-en-v1.5"
     export RERANK_MODEL_ID="BAAI/bge-reranker-base"
@@ -65,18 +49,6 @@ function start_services() {
 
     sed -i "s/backend_address/$ip_address/g" $WORKPATH/docker/ui/svelte/.env
 
-    if [[ "$IMAGE_REPO" != "" ]]; then
-        # Replace the container name with a test-specific name
-        echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
-        sed -i "s#image: opea/chatqna:latest#image: opea/chatqna:${IMAGE_TAG}#g" compose_vllm.yaml
-        sed -i "s#image: opea/chatqna-ui:latest#image: opea/chatqna-ui:${IMAGE_TAG}#g" compose_vllm.yaml
-        sed -i "s#image: opea/chatqna-conversation-ui:latest#image: opea/chatqna-conversation-ui:${IMAGE_TAG}#g" compose_vllm.yaml
-        sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose_vllm.yaml
-        sed -i "s#image: ${IMAGE_REPO}opea/tei-gaudi:latest#image: opea/tei-gaudi:latest#g" compose_vllm.yaml
-        echo "cat compose_vllm.yaml"
-        cat compose_vllm.yaml
-    fi
-
     # Start Docker Containers
     docker compose -f compose_vllm.yaml up -d
     n=0
@@ -198,13 +170,16 @@ function validate_frontend() {
     cd $WORKPATH/docker/ui/svelte
     local conda_env_name="OPEA_e2e"
     export PATH=${HOME}/miniforge3/bin/:$PATH
-#    conda remove -n ${conda_env_name} --all -y
-#    conda create -n ${conda_env_name} python=3.12 -y
+    if conda info --envs | grep -q "$conda_env_name"; then
+        echo "$conda_env_name exist!"
+    else
+        conda create -n ${conda_env_name} python=3.12 -y
+    fi
     source activate ${conda_env_name}
 
     sed -i "s/localhost/$ip_address/g" playwright.config.ts
 
-#    conda install -c conda-forge nodejs -y
+    conda install -c conda-forge nodejs -y
     npm install && npm ci && npx playwright install --with-deps
     node -v && npm -v && pip list
 
@@ -227,7 +202,7 @@ function stop_docker() {
 function main() {
 
     stop_docker
-    if [[ "$IMAGE_REPO" == "" ]]; then build_docker_images; fi
+    if [[ "$IMAGE_REPO" == "opea" ]]; then build_docker_images; fi
     start_time=$(date +%s)
     start_services
     end_time=$(date +%s)
diff --git a/ChatQnA/tests/test_chatqna_vllm_on_xeon.sh b/ChatQnA/tests/test_chatqna_vllm_on_xeon.sh
index a424187cd8..f27def0213 100644
--- a/ChatQnA/tests/test_chatqna_vllm_on_xeon.sh
+++ b/ChatQnA/tests/test_chatqna_vllm_on_xeon.sh
@@ -3,43 +3,33 @@
 # SPDX-License-Identifier: Apache-2.0
 
 set -e
-echo "IMAGE_REPO=${IMAGE_REPO}"
+IMAGE_REPO=${IMAGE_REPO:-"opea"}
+IMAGE_TAG=${IMAGE_TAG:-"latest"}
+echo "REGISTRY=IMAGE_REPO=${IMAGE_REPO}"
+echo "TAG=IMAGE_TAG=${IMAGE_TAG}"
+export REGISTRY=${IMAGE_REPO}
+export TAG=${IMAGE_TAG}
 
 WORKPATH=$(dirname "$PWD")
 LOG_PATH="$WORKPATH/tests"
 ip_address=$(hostname -I | awk '{print $1}')
 
 function build_docker_images() {
-    cd $WORKPATH
-    git clone https://github.com/opea-project/GenAIComps.git
-    cd GenAIComps
-
-    docker build -t opea/embedding-tei:latest -f comps/embeddings/langchain/docker/Dockerfile .
-    docker build -t opea/retriever-redis:latest -f comps/retrievers/langchain/redis/docker/Dockerfile .
-    docker build -t opea/reranking-tei:latest -f comps/reranks/tei/docker/Dockerfile .
-    docker build -t opea/llm-vllm:latest -f comps/llms/text-generation/vllm/docker/Dockerfile.microservice .
-    docker build -t opea/dataprep-redis:latest -f comps/dataprep/redis/langchain/docker/Dockerfile .
-
     cd $WORKPATH/docker
-    docker build --no-cache -t opea/chatqna:latest -f Dockerfile .
+    git clone https://github.com/opea-project/GenAIComps.git
+    git clone https://github.com/vllm-project/vllm.git
 
-    cd $WORKPATH/docker/ui
-    docker build --no-cache -t opea/chatqna-ui:latest -f docker/Dockerfile .
+    echo "Build all the images with --no-cache, check docker_image_build.log for details..."
+    service_list="chatqna chatqna-ui dataprep-redis embedding-tei retriever-redis reranking-tei llm-vllm vllm"
+    docker compose -f docker_build_compose.yaml build ${service_list} --no-cache > ${LOG_PATH}/docker_image_build.log
 
-    # cd $WORKPATH
-    # git clone https://github.com/vllm-project/vllm.git
-    # cd vllm
-    # docker build --no-cache -t opea/vllm:latest -f Dockerfile.cpu .
+    docker pull ghcr.io/huggingface/tgi-gaudi:2.0.1
+    docker pull ghcr.io/huggingface/text-embeddings-inference:cpu-1.5
 
     docker images
 }
 
 function start_services() {
-    cd $WORKPATH
-    git clone https://github.com/vllm-project/vllm.git
-    cd vllm
-    docker build --no-cache -t opea/vllm:latest -f Dockerfile.cpu .
-
     cd $WORKPATH/docker/xeon
 
     export EMBEDDING_MODEL_ID="BAAI/bge-base-en-v1.5"
@@ -62,29 +52,15 @@ function start_services() {
 
     sed -i "s/backend_address/$ip_address/g" $WORKPATH/docker/ui/svelte/.env
 
-    if [[ "$IMAGE_REPO" != "" ]]; then
-        # Replace the container name with a test-specific name
-        echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
-        if [ "${mode}" == "perf" ]; then
-            sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose_vllm.yaml
-        else
-            sed -i "s#image: opea/chatqna:latest#image: opea/chatqna:${IMAGE_TAG}#g" compose_vllm.yaml
-            sed -i "s#image: opea/chatqna-ui:latest#image: opea/chatqna-ui:${IMAGE_TAG}#g" compose_vllm.yaml
-            sed -i "s#image: opea/chatqna-conversation-ui:latest#image: opea/chatqna-conversation-ui:${IMAGE_TAG}#g" compose_vllm.yaml
-            sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose_vllm.yaml
-            sed -i "s#image: ${IMAGE_REPO}opea/vllm:latest#image: opea/vllm:latest#g" compose_vllm.yaml
-        fi
-    fi
-
     # Start Docker Containers
     docker compose -f compose_vllm.yaml up -d
     n=0
-    until [[ "$n" -ge 10 ]]; do
+    until [[ "$n" -ge 100 ]]; do
         docker logs vllm-service > ${LOG_PATH}/vllm_service_start.log
         if grep -q Connected ${LOG_PATH}/vllm_service_start.log; then
             break
         fi
-        sleep 10s
+        sleep 5s
         n=$((n+1))
     done
 }
@@ -196,13 +172,17 @@ function validate_frontend() {
     cd $WORKPATH/docker/ui/svelte
     local conda_env_name="OPEA_e2e"
     export PATH=${HOME}/miniforge3/bin/:$PATH
-#    conda remove -n ${conda_env_name} --all -y
-#    conda create -n ${conda_env_name} python=3.12 -y
+    if conda info --envs | grep -q "$conda_env_name"; then
+        echo "$conda_env_name exist!"
+    else
+        conda create -n ${conda_env_name} python=3.12 -y
+    fi
+
     source activate ${conda_env_name}
 
     sed -i "s/localhost/$ip_address/g" playwright.config.ts
 
-#    conda install -c conda-forge nodejs -y
+    conda install -c conda-forge nodejs -y
     npm install && npm ci && npx playwright install --with-deps
     node -v && npm -v && pip list
 
@@ -225,7 +205,7 @@ function stop_docker() {
 function main() {
 
     stop_docker
-    if [[ "$IMAGE_REPO" == "" ]]; then build_docker_images; fi
+    if [[ "$IMAGE_REPO" == "opea" ]]; then build_docker_images; fi
     start_time=$(date +%s)
     start_services
     end_time=$(date +%s)
diff --git a/ChatQnA/tests/test_chatqna_vllm_ray_on_gaudi.sh b/ChatQnA/tests/test_chatqna_vllm_ray_on_gaudi.sh
index 9099598bb5..3000479119 100644
--- a/ChatQnA/tests/test_chatqna_vllm_ray_on_gaudi.sh
+++ b/ChatQnA/tests/test_chatqna_vllm_ray_on_gaudi.sh
@@ -3,46 +3,31 @@
 # SPDX-License-Identifier: Apache-2.0
 
 set -e
-echo "IMAGE_REPO=${IMAGE_REPO}"
+IMAGE_REPO=${IMAGE_REPO:-"opea"}
+IMAGE_TAG=${IMAGE_TAG:-"latest"}
+echo "REGISTRY=IMAGE_REPO=${IMAGE_REPO}"
+echo "TAG=IMAGE_TAG=${IMAGE_TAG}"
+export REGISTRY=${IMAGE_REPO}
+export TAG=${IMAGE_TAG}
 
 WORKPATH=$(dirname "$PWD")
 LOG_PATH="$WORKPATH/tests"
 ip_address=$(hostname -I | awk '{print $1}')
 
 function build_docker_images() {
-    cd $WORKPATH
+    cd $WORKPATH/docker
     git clone https://github.com/opea-project/GenAIComps.git
-    cd GenAIComps
-
-    docker build -t opea/embedding-tei:latest -f comps/embeddings/langchain/docker/Dockerfile .
-    docker build -t opea/retriever-redis:latest -f comps/retrievers/langchain/redis/docker/Dockerfile .
-    docker build -t opea/reranking-tei:latest -f comps/reranks/tei/docker/Dockerfile .
-    docker build -t opea/llm-vllm-ray-hpu:latest -f comps/llms/text-generation/vllm-ray/docker/Dockerfile.vllmray .
-    docker build -t opea/llm-vllm-ray:latest -f comps/llms/text-generation/vllm-ray/docker/Dockerfile.microservice .
-    docker build -t opea/dataprep-redis:latest -f comps/dataprep/redis/langchain/docker/Dockerfile .
+    git clone https://github.com/huggingface/tei-gaudi
 
-#    cd ..
-#    git clone https://github.com/huggingface/tei-gaudi
-#    cd tei-gaudi/
-#    docker build --no-cache -f Dockerfile-hpu -t opea/tei-gaudi:latest .
+    echo "Build all the images with --no-cache, check docker_image_build.log for details..."
+    service_list="chatqna chatqna-ui dataprep-redis embedding-tei retriever-redis reranking-tei tei-gaudi llm-vllm-ray-hpu llm-vllm-ray"
+    docker compose -f docker_build_compose.yaml build ${service_list} --no-cache > ${LOG_PATH}/docker_image_build.log
 
     docker pull ghcr.io/huggingface/text-embeddings-inference:cpu-1.2
-
-    cd $WORKPATH/docker
-    docker build --no-cache -t opea/chatqna:latest -f Dockerfile .
-
-    cd $WORKPATH/docker/ui
-    docker build --no-cache -t opea/chatqna-ui:latest -f docker/Dockerfile .
-
     docker images
 }
 
 function start_services() {
-    # build tei-gaudi for each test instead of pull from local registry
-    cd $WORKPATH
-    git clone https://github.com/huggingface/tei-gaudi
-    cd tei-gaudi/
-    docker build --no-cache -q -f Dockerfile-hpu -t opea/tei-gaudi:latest .
 
     cd $WORKPATH/docker/gaudi
     export EMBEDDING_MODEL_ID="BAAI/bge-base-en-v1.5"
@@ -65,18 +50,6 @@ function start_services() {
 
     sed -i "s/backend_address/$ip_address/g" $WORKPATH/docker/ui/svelte/.env
 
-    if [[ "$IMAGE_REPO" != "" ]]; then
-        # Replace the container name with a test-specific name
-        echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
-        sed -i "s#image: opea/chatqna:latest#image: opea/chatqna:${IMAGE_TAG}#g" compose_vllm_ray.yaml
-        sed -i "s#image: opea/chatqna-ui:latest#image: opea/chatqna-ui:${IMAGE_TAG}#g" compose_vllm_ray.yaml
-        sed -i "s#image: opea/chatqna-conversation-ui:latest#image: opea/chatqna-conversation-ui:${IMAGE_TAG}#g" compose_vllm_ray.yaml
-        sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose_vllm_ray.yaml
-        sed -i "s#image: ${IMAGE_REPO}opea/tei-gaudi:latest#image: opea/tei-gaudi:latest#g" compose_vllm_ray.yaml
-        echo "cat compose_vllm_ray.yaml"
-        cat compose_vllm_ray.yaml
-    fi
-
     # Start Docker Containers
     docker compose -f compose_vllm_ray.yaml up -d
     n=0
@@ -198,13 +171,16 @@ function validate_frontend() {
     cd $WORKPATH/docker/ui/svelte
     local conda_env_name="OPEA_e2e"
     export PATH=${HOME}/miniforge3/bin/:$PATH
-#    conda remove -n ${conda_env_name} --all -y
-#    conda create -n ${conda_env_name} python=3.12 -y
+    if conda info --envs | grep -q "$conda_env_name"; then
+        echo "$conda_env_name exist!"
+    else
+        conda create -n ${conda_env_name} python=3.12 -y
+    fi
     source activate ${conda_env_name}
 
     sed -i "s/localhost/$ip_address/g" playwright.config.ts
 
-#    conda install -c conda-forge nodejs -y
+    conda install -c conda-forge nodejs -y
     npm install && npm ci && npx playwright install --with-deps
     node -v && npm -v && pip list
 
@@ -227,7 +203,7 @@ function stop_docker() {
 function main() {
 
     stop_docker
-    if [[ "$IMAGE_REPO" == "" ]]; then build_docker_images; fi
+    if [[ "$IMAGE_REPO" == "opea" ]]; then build_docker_images; fi
     start_time=$(date +%s)
     start_services
     end_time=$(date +%s)
diff --git a/CodeGen/docker/docker_build_compose.yaml b/CodeGen/docker/docker_build_compose.yaml
new file mode 100644
index 0000000000..bc1db1194a
--- /dev/null
+++ b/CodeGen/docker/docker_build_compose.yaml
@@ -0,0 +1,30 @@
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
+
+services:
+  codegen:
+    build:
+      args:
+        http_proxy: ${http_proxy}
+        https_proxy: ${https_proxy}
+        no_proxy: ${no_proxy}
+      dockerfile: ./Dockerfile
+    image: ${REGISTRY:-opea}/codegen:${TAG:-latest}
+  codegen-ui:
+    build:
+      context: ui
+      dockerfile: ./docker/Dockerfile
+    extends: codegen
+    image: ${REGISTRY:-opea}/codegen-ui:${TAG:-latest}
+  codegen-react-ui:
+    build:
+      context: ui
+      dockerfile: ./docker/Dockerfile.react
+    extends: codegen
+    image: ${REGISTRY:-opea}/codegen-conversation-ui:${TAG:-latest}
+  llm-tgi:
+    build:
+      context: GenAIComps
+      dockerfile: comps/llms/text-generation/tgi/Dockerfile
+    extends: codegen
+    image: ${REGISTRY}opea/llm-tgi:${TAG:-latest}
diff --git a/CodeGen/docker/gaudi/README.md b/CodeGen/docker/gaudi/README.md
index a3ffc8a72f..a563f416ba 100644
--- a/CodeGen/docker/gaudi/README.md
+++ b/CodeGen/docker/gaudi/README.md
@@ -148,16 +148,24 @@ To access the frontend, open the following URL in your browser: `http://{host_ip
 
 ![project-screenshot](../../assets/img/codeGen_ui_init.jpg)
 
-## 🚀 Launch the React Based UI
+## 🚀 Launch the React Based UI (Optional)
 
-To access the frontend, open the following URL in your browser: `http://{host_ip}:5174`. By default, the UI runs on port 5174 internally. If you prefer to use a different host port to access the frontend, you can modify the port mapping in the `compose.yaml` file as shown below:
+To access the React-based frontend, modify the UI service in the `compose.yaml` file. Replace `codegen-gaudi-ui-server` service with the `codegen-gaudi-react-ui-server` service as per the config below:
 
 ```yaml
-  codegen-gaudi-react-ui-server:
-    image: opea/codegen-react-ui:latest
-    ...
-    ports:
-      - "80:5174"
+codegen-gaudi-react-ui-server:
+  image: ${REGISTRY:-opea}/codegen-react-ui:${TAG:-latest}
+  container_name: codegen-gaudi-react-ui-server
+  environment:
+    - no_proxy=${no_proxy}
+    - https_proxy=${https_proxy}
+    - http_proxy=${http_proxy}
+  depends_on:
+    - codegen-gaudi-backend-server
+  ports:
+    - "5174:80"
+  ipc: host
+  restart: always
 ```
 
 ![project-screenshot](../../assets/img/codegen_react.png)
diff --git a/CodeGen/docker/gaudi/compose.yaml b/CodeGen/docker/gaudi/compose.yaml
index 074743015f..c1bae7b902 100644
--- a/CodeGen/docker/gaudi/compose.yaml
+++ b/CodeGen/docker/gaudi/compose.yaml
@@ -1,9 +1,6 @@
-
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-version: "3.8"
-
 services:
   tgi-service:
     image: ghcr.io/huggingface/tgi-gaudi:2.0.1
@@ -25,7 +22,7 @@ services:
     ipc: host
     command: --model-id ${LLM_MODEL_ID} --max-input-length 1024 --max-total-tokens 2048
   llm:
-    image: opea/llm-tgi:latest
+    image: ${REGISTRY:-opea}/llm-tgi:${TAG:-latest}
     container_name: llm-tgi-gaudi-server
     depends_on:
       - tgi-service
@@ -40,7 +37,7 @@ services:
       HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
     restart: unless-stopped
   codegen-gaudi-backend-server:
-    image: opea/codegen:latest
+    image: ${REGISTRY:-opea}/codegen:${TAG:-latest}
     container_name: codegen-gaudi-backend-server
     depends_on:
       - llm
@@ -55,7 +52,7 @@ services:
     ipc: host
     restart: always
   codegen-gaudi-ui-server:
-    image: opea/codegen-ui:latest
+    image: ${REGISTRY:-opea}/codegen-ui:${TAG:-latest}
     container_name: codegen-gaudi-ui-server
     depends_on:
       - codegen-gaudi-backend-server
@@ -69,16 +66,6 @@ services:
     ipc: host
     restart: always
 
-  codegen-gaudi-react-ui-server:
-    image: opea/codegen-react-ui:latest
-    container_name: codegen-gaudi-react-ui-server
-    depends_on:
-      - codegen-gaudi-backend-server
-    ports:
-      - "5174:80"
-    ipc: host
-    restart: always
-
 networks:
   default:
     driver: bridge
diff --git a/CodeGen/docker/xeon/README.md b/CodeGen/docker/xeon/README.md
index 29efec031a..74b5a2b7c2 100644
--- a/CodeGen/docker/xeon/README.md
+++ b/CodeGen/docker/xeon/README.md
@@ -155,16 +155,24 @@ Here is an example of running CodeGen in the UI:
 
 ![project-screenshot](../../assets/img/codeGen_ui_response.png)
 
-## 🚀 Launch the React Based UI
+## 🚀 Launch the React Based UI (Optional)
 
-To access the frontend, open the following URL in your browser: `http://{host_ip}:5174`. By default, the UI runs on port 5174 internally. If you prefer to use a different host port to access the frontend, you can modify the port mapping in the `compose.yaml` file as shown below:
+To access the React-based frontend, modify the UI service in the `compose.yaml` file. Replace `codegen-xeon-ui-server` service with the `codegen-xeon-react-ui-server` service as per the config below:
 
 ```yaml
-  codegen-xeon-react-ui-server:
-    image: opea/codegen-react-ui:latest
-    ...
-    ports:
-      - "80:5174"
+codegen-xeon-react-ui-server:
+  image: ${REGISTRY:-opea}/codegen-react-ui:${TAG:-latest}
+  container_name: codegen-xeon-react-ui-server
+  environment:
+    - no_proxy=${no_proxy}
+    - https_proxy=${https_proxy}
+    - http_proxy=${http_proxy}
+  depends_on:
+    - codegen-xeon-backend-server
+  ports:
+    - "5174:80"
+  ipc: host
+  restart: always
 ```
 
 ![project-screenshot](../../assets/img/codegen_react.png)
diff --git a/CodeGen/docker/xeon/compose.yaml b/CodeGen/docker/xeon/compose.yaml
index b002a39840..c33a12ef49 100644
--- a/CodeGen/docker/xeon/compose.yaml
+++ b/CodeGen/docker/xeon/compose.yaml
@@ -1,9 +1,6 @@
-
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-version: "3.8"
-
 services:
   tgi-service:
     image: ghcr.io/huggingface/text-generation-inference:1.4
@@ -20,7 +17,7 @@ services:
       HF_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
     command: --model-id ${LLM_MODEL_ID}
   llm:
-    image: opea/llm-tgi:latest
+    image: ${REGISTRY:-opea}/llm-tgi:${TAG:-latest}
     container_name: llm-tgi-server
     depends_on:
       - tgi-service
@@ -35,7 +32,7 @@ services:
       HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
     restart: unless-stopped
   codegen-xeon-backend-server:
-    image: opea/codegen:latest
+    image: ${REGISTRY:-opea}/codegen:${TAG:-latest}
     container_name: codegen-xeon-backend-server
     depends_on:
       - llm
@@ -50,7 +47,7 @@ services:
     ipc: host
     restart: always
   codegen-xeon-ui-server:
-    image: opea/codegen-ui:latest
+    image: ${REGISTRY:-opea}/codegen-ui:${TAG:-latest}
     container_name: codegen-xeon-ui-server
     depends_on:
       - codegen-xeon-backend-server
@@ -63,15 +60,6 @@ services:
       - BASIC_URL=${BACKEND_SERVICE_ENDPOINT}
     ipc: host
     restart: always
-  codegen-xeon-react-ui-server:
-    image: opea/codegen-react-ui:latest
-    container_name: codegen-xeon-react-ui-server
-    depends_on:
-      - codegen-xeon-backend-server
-    ports:
-      - "5174:80"
-    ipc: host
-    restart: always
 
 networks:
   default:
diff --git a/CodeGen/tests/test_codegen_on_gaudi.sh b/CodeGen/tests/test_codegen_on_gaudi.sh
index dd2005a712..2727ca75df 100644
--- a/CodeGen/tests/test_codegen_on_gaudi.sh
+++ b/CodeGen/tests/test_codegen_on_gaudi.sh
@@ -3,33 +3,31 @@
 # SPDX-License-Identifier: Apache-2.0
 
 set -xe
+IMAGE_REPO=${IMAGE_REPO:-"opea"}
+IMAGE_TAG=${IMAGE_TAG:-"latest"}
+echo "REGISTRY=IMAGE_REPO=${IMAGE_REPO}"
+echo "TAG=IMAGE_TAG=${IMAGE_TAG}"
+export REGISTRY=${IMAGE_REPO}
+export TAG=${IMAGE_TAG}
 
 WORKPATH=$(dirname "$PWD")
 LOG_PATH="$WORKPATH/tests"
 ip_address=$(hostname -I | awk '{print $1}')
 
 function build_docker_images() {
-    cd $WORKPATH
+    cd $WORKPATH/docker
     git clone https://github.com/opea-project/GenAIComps.git
-    cd GenAIComps
 
-    docker build -t opea/llm-tgi:latest -f comps/llms/text-generation/tgi/Dockerfile .
+    echo "Build all the images with --no-cache, check docker_image_build.log for details..."
+    service_list="codegen codegen-ui llm-tgi"
+    docker compose -f docker_build_compose.yaml build ${service_list} --no-cache > ${LOG_PATH}/docker_image_build.log
 
     docker pull ghcr.io/huggingface/tgi-gaudi:2.0.1
-
-    cd $WORKPATH/docker
-    docker build --no-cache -t opea/codegen:latest -f Dockerfile .
-
-    cd $WORKPATH/docker/ui
-    docker build --no-cache -t opea/codegen-ui:latest -f docker/Dockerfile .
-    docker build --no-cache --build-arg BACKEND_SERVICE_ENDPOINT=http://${ip_address}:7778/v1/codegen -t opea/codegen--react-ui:latest -f docker/Dockerfile.react .
-
     docker images
 }
 
 function start_services() {
     cd $WORKPATH/docker/gaudi
-
     export LLM_MODEL_ID="Intel/neural-chat-7b-v3-3"
     export TGI_LLM_ENDPOINT="http://${ip_address}:8028"
     export HUGGINGFACEHUB_API_TOKEN=${HUGGINGFACEHUB_API_TOKEN}
@@ -39,17 +37,6 @@ function start_services() {
 
     sed -i "s/backend_address/$ip_address/g" $WORKPATH/docker/ui/svelte/.env
 
-    if [[ "$IMAGE_REPO" != "" ]]; then
-        # Replace the container name with a test-specific name
-        echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
-        sed -i "s#image: opea/codegen:latest#image: opea/codegen:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/codegen-ui:latest#image: opea/codegen-ui:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/codegen-react-ui:latest#image: opea/codegen-react-ui:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose.yaml
-        echo "cat compose.yaml"
-        cat compose.yaml
-    fi
-
     # Start Docker Containers
     docker compose up -d
 
@@ -126,13 +113,16 @@ function validate_frontend() {
     cd $WORKPATH/docker/ui/svelte
     local conda_env_name="OPEA_e2e"
     export PATH=${HOME}/miniforge3/bin/:$PATH
-#    conda remove -n ${conda_env_name} --all -y
-#    conda create -n ${conda_env_name} python=3.12 -y
+    if conda info --envs | grep -q "$conda_env_name"; then
+        echo "$conda_env_name exist!"
+    else
+        conda create -n ${conda_env_name} python=3.12 -y
+    fi
     source activate ${conda_env_name}
 
     sed -i "s/localhost/$ip_address/g" playwright.config.ts
 
-#    conda install -c conda-forge nodejs -y
+    conda install -c conda-forge nodejs -y
     npm install && npm ci && npx playwright install --with-deps
     node -v && npm -v && pip list
 
@@ -156,7 +146,7 @@ function main() {
 
     stop_docker
 
-    if [[ "$IMAGE_REPO" == "" ]]; then build_docker_images; fi
+    if [[ "$IMAGE_REPO" == "opea" ]]; then build_docker_images; fi
     start_services
 
     validate_microservices
diff --git a/CodeGen/tests/test_codegen_on_xeon.sh b/CodeGen/tests/test_codegen_on_xeon.sh
index 987fb8b813..0a781452a4 100644
--- a/CodeGen/tests/test_codegen_on_xeon.sh
+++ b/CodeGen/tests/test_codegen_on_xeon.sh
@@ -3,27 +3,26 @@
 # SPDX-License-Identifier: Apache-2.0
 
 set -xe
+IMAGE_REPO=${IMAGE_REPO:-"opea"}
+IMAGE_TAG=${IMAGE_TAG:-"latest"}
+echo "REGISTRY=IMAGE_REPO=${IMAGE_REPO}"
+echo "TAG=IMAGE_TAG=${IMAGE_TAG}"
+export REGISTRY=${IMAGE_REPO}
+export TAG=${IMAGE_TAG}
 
 WORKPATH=$(dirname "$PWD")
 LOG_PATH="$WORKPATH/tests"
 ip_address=$(hostname -I | awk '{print $1}')
 
 function build_docker_images() {
-    cd $WORKPATH
+    cd $WORKPATH/docker
     git clone https://github.com/opea-project/GenAIComps.git
-    cd GenAIComps
 
-    docker build -t opea/llm-tgi:latest -f comps/llms/text-generation/tgi/Dockerfile .
+    echo "Build all the images with --no-cache, check docker_image_build.log for details..."
+    service_list="codegen codegen-ui llm-tgi"
+    docker compose -f docker_build_compose.yaml build ${service_list} --no-cache > ${LOG_PATH}/docker_image_build.log
 
     docker pull ghcr.io/huggingface/text-generation-inference:1.4
-
-    cd $WORKPATH/docker
-    docker build --no-cache -t opea/codegen:latest -f Dockerfile .
-
-    cd $WORKPATH/docker/ui
-    docker build --no-cache -t opea/codegen-ui:latest -f docker/Dockerfile .
-    docker build --no-cache --build-arg BACKEND_SERVICE_ENDPOINT=http://${ip_address}:7778/v1/codegen -t opea/codegen-react-ui:latest -f docker/Dockerfile.react .
-
     docker images
 }
 
@@ -39,17 +38,6 @@ function start_services() {
 
     sed -i "s/backend_address/$ip_address/g" $WORKPATH/docker/ui/svelte/.env
 
-    if [[ "$IMAGE_REPO" != "" ]]; then
-        # Replace the container name with a test-specific name
-        echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
-        sed -i "s#image: opea/codegen:latest#image: opea/codegen:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/codegen-ui:latest#image: opea/codegen-ui:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/codegen-react-ui:latest#image: opea/codegen-react-ui:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose.yaml
-        echo "cat compose.yaml"
-        cat compose.yaml
-    fi
-
     # Start Docker Containers
     docker compose up -d
 
@@ -126,13 +114,16 @@ function validate_frontend() {
     cd $WORKPATH/docker/ui/svelte
     local conda_env_name="OPEA_e2e"
     export PATH=${HOME}/miniforge3/bin/:$PATH
-#    conda remove -n ${conda_env_name} --all -y
-#    conda create -n ${conda_env_name} python=3.12 -y
+    if conda info --envs | grep -q "$conda_env_name"; then
+        echo "$conda_env_name exist!"
+    else
+        conda create -n ${conda_env_name} python=3.12 -y
+    fi
     source activate ${conda_env_name}
 
     sed -i "s/localhost/$ip_address/g" playwright.config.ts
 
-#    conda install -c conda-forge nodejs -y
+    conda install -c conda-forge nodejs -y
     npm install && npm ci && npx playwright install --with-deps
     node -v && npm -v && pip list
 
@@ -157,7 +148,7 @@ function main() {
 
     stop_docker
 
-    if [[ "$IMAGE_REPO" == "" ]]; then build_docker_images; fi
+    if [[ "$IMAGE_REPO" == "opea" ]]; then build_docker_images; fi
     start_services
 
     validate_microservices
diff --git a/CodeTrans/docker/docker_build_compose.yaml b/CodeTrans/docker/docker_build_compose.yaml
new file mode 100644
index 0000000000..2f2849619d
--- /dev/null
+++ b/CodeTrans/docker/docker_build_compose.yaml
@@ -0,0 +1,24 @@
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
+
+services:
+  codetrans:
+    build:
+      args:
+        http_proxy: ${http_proxy}
+        https_proxy: ${https_proxy}
+        no_proxy: ${no_proxy}
+      dockerfile: ./Dockerfile
+    image: ${REGISTRY:-opea}/codetrans:${TAG:-latest}
+  codetrans-ui:
+    build:
+      context: ui
+      dockerfile: ./docker/Dockerfile
+    extends: codetrans
+    image: ${REGISTRY:-opea}/codetrans-ui:${TAG:-latest}
+  llm-tgi:
+    build:
+      context: GenAIComps
+      dockerfile: comps/llms/text-generation/tgi/Dockerfile
+    extends: codetrans
+    image: ${REGISTRY:-opea}/llm-tgi:${TAG:-latest}
diff --git a/CodeTrans/docker/gaudi/compose.yaml b/CodeTrans/docker/gaudi/compose.yaml
index 88ba9dc72e..e206d13bef 100644
--- a/CodeTrans/docker/gaudi/compose.yaml
+++ b/CodeTrans/docker/gaudi/compose.yaml
@@ -1,9 +1,6 @@
-
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-version: "3.8"
-
 services:
   tgi-service:
     image: ghcr.io/huggingface/tgi-gaudi:2.0.1
@@ -25,7 +22,7 @@ services:
     ipc: host
     command: --model-id ${LLM_MODEL_ID} --max-input-length 1024 --max-total-tokens 2048
   llm:
-    image: opea/llm-tgi:latest
+    image: ${REGISTRY:-opea}/llm-tgi:${TAG:-latest}
     container_name: llm-tgi-gaudi-server
     ports:
       - "9000:9000"
@@ -38,7 +35,7 @@ services:
       HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
     restart: unless-stopped
   codetrans-gaudi-backend-server:
-    image: opea/codetrans:latest
+    image: ${REGISTRY:-opea}/codetrans:${TAG:-latest}
     container_name: codetrans-gaudi-backend-server
     depends_on:
       - tgi-service
@@ -54,7 +51,7 @@ services:
     ipc: host
     restart: always
   codetrans-gaudi-ui-server:
-    image: opea/codetrans-ui:latest
+    image: ${REGISTRY:-opea}/codetrans-ui:${TAG:-latest}
     container_name: codetrans-gaudi-ui-server
     depends_on:
       - codetrans-gaudi-backend-server
diff --git a/CodeTrans/docker/xeon/compose.yaml b/CodeTrans/docker/xeon/compose.yaml
index a236b88769..f4a5ad68aa 100644
--- a/CodeTrans/docker/xeon/compose.yaml
+++ b/CodeTrans/docker/xeon/compose.yaml
@@ -1,9 +1,6 @@
-
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-version: "3.8"
-
 services:
   tgi-service:
     image: ghcr.io/huggingface/text-generation-inference:1.4
@@ -20,7 +17,7 @@ services:
       HF_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
     command: --model-id ${LLM_MODEL_ID}
   llm:
-    image: opea/llm-tgi:latest
+    image: ${REGISTRY:-opea}/llm-tgi:${TAG:-latest}
     container_name: llm-tgi-server
     ports:
       - "9000:9000"
@@ -33,7 +30,7 @@ services:
       HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
     restart: unless-stopped
   codetrans-xeon-backend-server:
-    image: opea/codetrans:latest
+    image: ${REGISTRY:-opea}/codetrans:${TAG:-latest}
     container_name: codetrans-xeon-backend-server
     depends_on:
       - tgi-service
@@ -49,7 +46,7 @@ services:
     ipc: host
     restart: always
   codetrans-xeon-ui-server:
-    image: opea/codetrans-ui:latest
+    image: ${REGISTRY:-opea}/codetrans-ui:${TAG:-latest}
     container_name: codetrans-xeon-ui-server
     depends_on:
       - codetrans-xeon-backend-server
diff --git a/CodeTrans/tests/test_codetrans_on_gaudi.sh b/CodeTrans/tests/test_codetrans_on_gaudi.sh
index c3b22f5237..fc48a5139c 100644
--- a/CodeTrans/tests/test_codetrans_on_gaudi.sh
+++ b/CodeTrans/tests/test_codetrans_on_gaudi.sh
@@ -2,27 +2,27 @@
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-set -x
+set -xe
+IMAGE_REPO=${IMAGE_REPO:-"opea"}
+IMAGE_TAG=${IMAGE_TAG:-"latest"}
+echo "REGISTRY=IMAGE_REPO=${IMAGE_REPO}"
+echo "TAG=IMAGE_TAG=${IMAGE_TAG}"
+export REGISTRY=${IMAGE_REPO}
+export TAG=${IMAGE_TAG}
 
 WORKPATH=$(dirname "$PWD")
 LOG_PATH="$WORKPATH/tests"
 ip_address=$(hostname -I | awk '{print $1}')
 
 function build_docker_images() {
-    cd $WORKPATH
+    cd $WORKPATH/docker
     git clone https://github.com/opea-project/GenAIComps.git
-    cd GenAIComps
 
-    docker build -t opea/llm-tgi:latest -f comps/llms/text-generation/tgi/Dockerfile .
+    echo "Build all the images with --no-cache, check docker_image_build.log for details..."
+    service_list="codetrans codetrans-ui llm-tgi"
+    docker compose -f docker_build_compose.yaml build ${service_list} --no-cache > ${LOG_PATH}/docker_image_build.log
 
     docker pull ghcr.io/huggingface/tgi-gaudi:2.0.1
-
-    cd $WORKPATH/docker
-    docker build --no-cache -t opea/codetrans:latest -f Dockerfile .
-
-    cd $WORKPATH/docker/ui
-    docker build --no-cache -t opea/codetrans-ui:latest -f docker/Dockerfile .
-
     docker images
 }
 
@@ -40,16 +40,6 @@ function start_services() {
 
     sed -i "s/backend_address/$ip_address/g" $WORKPATH/docker/ui/svelte/.env
 
-    if [[ "$IMAGE_REPO" != "" ]]; then
-        # Replace the container name with a test-specific name
-        echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
-        sed -i "s#image: opea/codetrans:latest#image: opea/codetrans:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/codetrans-ui:latest#image: opea/codetrans-ui:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose.yaml
-        echo "cat compose.yaml"
-        cat compose.yaml
-    fi
-
     # Start Docker Containers
     docker compose up -d
 
@@ -124,13 +114,16 @@ function validate_frontend() {
     cd $WORKPATH/docker/ui/svelte
     local conda_env_name="OPEA_e2e"
     export PATH=${HOME}/miniforge3/bin/:$PATH
-#    conda remove -n ${conda_env_name} --all -y
-#    conda create -n ${conda_env_name} python=3.12 -y
+    if conda info --envs | grep -q "$conda_env_name"; then
+        echo "$conda_env_name exist!"
+    else
+        conda create -n ${conda_env_name} python=3.12 -y
+    fi
     source activate ${conda_env_name}
 
     sed -i "s/localhost/$ip_address/g" playwright.config.ts
 
-#    conda install -c conda-forge nodejs -y
+    conda install -c conda-forge nodejs -y
     npm install && npm ci && npx playwright install --with-deps
     node -v && npm -v && pip list
 
@@ -155,7 +148,7 @@ function main() {
 
     stop_docker
 
-    if [[ "$IMAGE_REPO" == "" ]]; then build_docker_images; fi
+    if [[ "$IMAGE_REPO" == "opea" ]]; then build_docker_images; fi
     start_services
 
     validate_microservices
diff --git a/CodeTrans/tests/test_codetrans_on_xeon.sh b/CodeTrans/tests/test_codetrans_on_xeon.sh
index fdb134edfe..4ae4d8024e 100644
--- a/CodeTrans/tests/test_codetrans_on_xeon.sh
+++ b/CodeTrans/tests/test_codetrans_on_xeon.sh
@@ -3,24 +3,26 @@
 # SPDX-License-Identifier: Apache-2.0
 
 set -xe
+IMAGE_REPO=${IMAGE_REPO:-"opea"}
+IMAGE_TAG=${IMAGE_TAG:-"latest"}
+echo "REGISTRY=IMAGE_REPO=${IMAGE_REPO}"
+echo "TAG=IMAGE_TAG=${IMAGE_TAG}"
+export REGISTRY=${IMAGE_REPO}
+export TAG=${IMAGE_TAG}
 
 WORKPATH=$(dirname "$PWD")
 LOG_PATH="$WORKPATH/tests"
 ip_address=$(hostname -I | awk '{print $1}')
 
 function build_docker_images() {
-    cd $WORKPATH
-    git clone https://github.com/opea-project/GenAIComps.git
-    cd GenAIComps
-
-    docker build -t opea/llm-tgi:latest -f comps/llms/text-generation/tgi/Dockerfile .
-
     cd $WORKPATH/docker
-    docker build --no-cache -t opea/codetrans:latest -f Dockerfile .
+    git clone https://github.com/opea-project/GenAIComps.git
 
-    cd $WORKPATH/docker/ui
-    docker build --no-cache -t opea/codetrans-ui:latest -f docker/Dockerfile .
+    echo "Build all the images with --no-cache, check docker_image_build.log for details..."
+    service_list="codetrans codetrans-ui llm-tgi"
+    docker compose -f docker_build_compose.yaml build ${service_list} --no-cache > ${LOG_PATH}/docker_image_build.log
 
+    docker pull ghcr.io/huggingface/text-generation-inference:1.4
     docker images
 }
 
@@ -37,16 +39,6 @@ function start_services() {
 
     sed -i "s/backend_address/$ip_address/g" $WORKPATH/docker/ui/svelte/.env
 
-    if [[ "$IMAGE_REPO" != "" ]]; then
-        # Replace the container name with a test-specific name
-        echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
-        sed -i "s#image: opea/codetrans:latest#image: opea/codetrans:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/codetrans-ui:latest#image: opea/codetrans-ui:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose.yaml
-        echo "cat compose.yaml"
-        cat compose.yaml
-    fi
-
     # Start Docker Containers
     docker compose up -d
 
@@ -123,13 +115,16 @@ function validate_frontend() {
     cd $WORKPATH/docker/ui/svelte
     local conda_env_name="OPEA_e2e"
     export PATH=${HOME}/miniforge3/bin/:$PATH
-#    conda remove -n ${conda_env_name} --all -y
-#    conda create -n ${conda_env_name} python=3.12 -y
+    if conda info --envs | grep -q "$conda_env_name"; then
+        echo "$conda_env_name exist!"
+    else
+        conda create -n ${conda_env_name} python=3.12 -y
+    fi
     source activate ${conda_env_name}
 
     sed -i "s/localhost/$ip_address/g" playwright.config.ts
 
-#    conda install -c conda-forge nodejs -y
+    conda install -c conda-forge nodejs -y
     npm install && npm ci && npx playwright install --with-deps
     node -v && npm -v && pip list
 
@@ -153,7 +148,7 @@ function main() {
 
     stop_docker
 
-    if [[ "$IMAGE_REPO" == "" ]]; then build_docker_images; fi
+    if [[ "$IMAGE_REPO" == "opea" ]]; then build_docker_images; fi
     start_services
 
     validate_microservices
diff --git a/DocSum/docker/docker_build_compose.yaml b/DocSum/docker/docker_build_compose.yaml
new file mode 100644
index 0000000000..a7e4a565dd
--- /dev/null
+++ b/DocSum/docker/docker_build_compose.yaml
@@ -0,0 +1,30 @@
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
+
+services:
+  docsum:
+    build:
+      args:
+        http_proxy: ${http_proxy}
+        https_proxy: ${https_proxy}
+        no_proxy: ${no_proxy}
+      dockerfile: ./Dockerfile
+    image: ${REGISTRY:-opea}/docsum:${TAG:-latest}
+  docsum-ui:
+    build:
+      context: ui
+      dockerfile: ./docker/Dockerfile
+    extends: docsum
+    image: ${REGISTRY:-opea}/docsum-ui:${TAG:-latest}
+  docsum-react-ui:
+    build:
+      context: ui
+      dockerfile: ./docker/Dockerfile.react
+    extends: docsum
+    image: ${REGISTRY:-opea}/docsum-react-ui:${TAG:-latest}
+  llm-docsum-tgi:
+    build:
+      context: GenAIComps
+      dockerfile: comps/llms/summarization/tgi/Dockerfile
+    extends: docsum
+    image: ${REGISTRY:-opea}/llm-docsum-tgi:${TAG:-latest}
diff --git a/DocSum/docker/gaudi/README.md b/DocSum/docker/gaudi/README.md
index d7a3202e54..742e7202fa 100644
--- a/DocSum/docker/gaudi/README.md
+++ b/DocSum/docker/gaudi/README.md
@@ -127,7 +127,24 @@ Here is an example for summarizing a article.
 
 ![image](https://github.com/intel-ai-tce/GenAIExamples/assets/21761437/67ecb2ec-408d-4e81-b124-6ded6b833f55)
 
-## 🚀 Launch the React UI
+## 🚀 Launch the React UI (Optional)
+
+To access the React-based frontend, modify the UI service in the `compose.yaml` file. Replace `docsum-xeon-ui-server` service with the `docsum-xeon-react-ui-server` service as per the config below:
+
+```yaml
+docsum-gaudi-react-ui-server:
+  image: ${REGISTRY:-opea}/docsum-react-ui:${TAG:-latest}
+  container_name: docsum-gaudi-react-ui-server
+  depends_on:
+    - docsum-gaudi-backend-server
+  ports:
+    - "5174:80"
+  environment:
+    - no_proxy=${no_proxy}
+    - https_proxy=${https_proxy}
+    - http_proxy=${http_proxy}
+    - DOC_BASE_URL=${BACKEND_SERVICE_ENDPOINT}
+```
 
 Open this URL `http://{host_ip}:5175` in your browser to access the frontend.
 
diff --git a/DocSum/docker/gaudi/compose.yaml b/DocSum/docker/gaudi/compose.yaml
index 2a2a8dbaaf..78cb90ae1c 100644
--- a/DocSum/docker/gaudi/compose.yaml
+++ b/DocSum/docker/gaudi/compose.yaml
@@ -1,9 +1,6 @@
-
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-version: "3.8"
-
 services:
   tgi-service:
     image: ghcr.io/huggingface/tgi-gaudi:2.0.1
@@ -24,7 +21,7 @@ services:
     ipc: host
     command: --model-id ${LLM_MODEL_ID} --max-input-length 1024 --max-total-tokens 2048
   llm:
-    image: opea/llm-docsum-tgi:latest
+    image: ${REGISTRY:-opea}/llm-docsum-tgi:${TAG:-latest}
     container_name: llm-docsum-gaudi-server
     depends_on:
       - tgi-service
@@ -39,7 +36,7 @@ services:
       HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
     restart: unless-stopped
   docsum-gaudi-backend-server:
-    image: opea/docsum:latest
+    image: ${REGISTRY:-opea}/docsum:${TAG:-latest}
     container_name: docsum-gaudi-backend-server
     depends_on:
       - tgi-service
@@ -55,7 +52,7 @@ services:
     ipc: host
     restart: always
   docsum-gaudi-ui-server:
-    image: opea/docsum-ui:latest
+    image: ${REGISTRY:-opea}/docsum-ui:${TAG:-latest}
     container_name: docsum-gaudi-ui-server
     depends_on:
       - docsum-gaudi-backend-server
@@ -68,15 +65,6 @@ services:
       - DOC_BASE_URL=${BACKEND_SERVICE_ENDPOINT}
     ipc: host
     restart: always
-  docsum-xeon-react-ui-server:
-    image: opea/docsum-react-ui:latest
-    container_name: docsum-gaudi-react-ui-server
-    depends_on:
-      - docsum-gaudi-backend-server
-    ports:
-      - "5174:80"
-    environment:
-      - DOC_BASE_URL=${BACKEND_SERVICE_ENDPOINT}
 
 networks:
   default:
diff --git a/DocSum/docker/xeon/README.md b/DocSum/docker/xeon/README.md
index c272d1619b..7d310c98b2 100644
--- a/DocSum/docker/xeon/README.md
+++ b/DocSum/docker/xeon/README.md
@@ -135,6 +135,24 @@ Open this URL `http://{host_ip}:5174` in your browser to access the React based
 
 ![project-screenshot](../../assets/img/docSum_ui_text.png)
 
-### React UI
+### React UI (Optional)
+
+To access the React-based frontend, modify the UI service in the `compose.yaml` file. Replace `docsum-xeon-ui-server` service with the `docsum-xeon-react-ui-server` service as per the config below:
+
+```yaml
+docsum-xeon-react-ui-server:
+  image: ${REGISTRY:-opea}/docsum-react-ui:${TAG:-latest}
+  container_name: docsum-xeon-react-ui-server
+  depends_on:
+    - docsum-xeon-backend-server
+  ports:
+    - "5174:80"
+  environment:
+    - no_proxy=${no_proxy}
+    - https_proxy=${https_proxy}
+    - http_proxy=${http_proxy}
+  ipc: host
+  restart: always
+```
 
 ![preject-react-screenshot](../../assets/img/docsum-ui-react.png)
diff --git a/DocSum/docker/xeon/compose.yaml b/DocSum/docker/xeon/compose.yaml
index facd70463f..33c92ce52d 100644
--- a/DocSum/docker/xeon/compose.yaml
+++ b/DocSum/docker/xeon/compose.yaml
@@ -1,9 +1,6 @@
-
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-version: "3.8"
-
 services:
   tgi-service:
     image: ghcr.io/huggingface/text-generation-inference:1.4
@@ -21,7 +18,7 @@ services:
     shm_size: 1g
     command: --model-id ${LLM_MODEL_ID}
   llm:
-    image: opea/llm-docsum-tgi:latest
+    image: ${REGISTRY:-opea}/llm-docsum-tgi:${TAG:-latest}
     container_name: llm-docsum-server
     depends_on:
       - tgi-service
@@ -36,7 +33,7 @@ services:
       HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
     restart: unless-stopped
   docsum-xeon-backend-server:
-    image: opea/docsum:latest
+    image: ${REGISTRY:-opea}/docsum:${TAG:-latest}
     container_name: docsum-xeon-backend-server
     depends_on:
       - tgi-service
@@ -52,7 +49,7 @@ services:
     ipc: host
     restart: always
   docsum-xeon-ui-server:
-    image: opea/docsum-ui:latest
+    image: ${REGISTRY:-opea}/docsum-ui:${TAG:-latest}
     container_name: docsum-xeon-ui-server
     depends_on:
       - docsum-xeon-backend-server
@@ -65,15 +62,6 @@ services:
       - DOC_BASE_URL=${BACKEND_SERVICE_ENDPOINT}
     ipc: host
     restart: always
-  docsum-xeon-react-ui-server:
-    image: opea/docsum-react-ui:latest
-    container_name: docsum-xeon-react-ui-server
-    depends_on:
-      - docsum-xeon-backend-server
-    ports:
-      - "5174:80"
-    ipc: host
-    restart: always
 
 networks:
   default:
diff --git a/DocSum/tests/test_docsum_on_gaudi.sh b/DocSum/tests/test_docsum_on_gaudi.sh
index 983f02870c..0906bd906c 100644
--- a/DocSum/tests/test_docsum_on_gaudi.sh
+++ b/DocSum/tests/test_docsum_on_gaudi.sh
@@ -2,28 +2,27 @@
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-set -x
+set -e
+IMAGE_REPO=${IMAGE_REPO:-"opea"}
+IMAGE_TAG=${IMAGE_TAG:-"latest"}
+echo "REGISTRY=IMAGE_REPO=${IMAGE_REPO}"
+echo "TAG=IMAGE_TAG=${IMAGE_TAG}"
+export REGISTRY=${IMAGE_REPO}
+export TAG=${IMAGE_TAG}
 
 WORKPATH=$(dirname "$PWD")
 LOG_PATH="$WORKPATH/tests"
 ip_address=$(hostname -I | awk '{print $1}')
 
 function build_docker_images() {
-    cd $WORKPATH
+    cd $WORKPATH/docker
     git clone https://github.com/opea-project/GenAIComps.git
-    cd GenAIComps
 
-    docker build --no-cache -t opea/llm-docsum-tgi:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/llms/summarization/tgi/Dockerfile .
+    echo "Build all the images with --no-cache, check docker_image_build.log for details..."
+    service_list="docsum docsum-ui llm-docsum-tgi"
+    docker compose -f docker_build_compose.yaml build ${service_list} --no-cache > ${LOG_PATH}/docker_image_build.log
 
     docker pull ghcr.io/huggingface/tgi-gaudi:2.0.1
-
-    cd $WORKPATH/docker
-    docker build --no-cache -t opea/docsum:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f Dockerfile .
-
-    cd $WORKPATH/docker/ui
-    docker build --no-cache -t opea/docsum-ui:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f docker/Dockerfile .
-    docker build --no-cache -t opea/docsum-react-ui:latest --build-arg BACKEND_SERVICE_ENDPOINT=http://${ip_address}:8888/v1/docsum -f docker/Dockerfile.react .
-
     docker images
 }
 
@@ -39,17 +38,6 @@ function start_services() {
 
     sed -i "s/backend_address/$ip_address/g" $WORKPATH/docker/ui/svelte/.env
 
-    if [[ "$IMAGE_REPO" != "" ]]; then
-        # Replace the container name with a test-specific name
-        echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
-        sed -i "s#image: opea/docsum:latest#image: opea/docsum:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/docsum-ui:latest#image: opea/docsum-ui:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/docsum-react-ui:latest#image: opea/docsum-react-ui:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose.yaml
-        echo "cat compose.yaml"
-        cat compose.yaml
-    fi
-
     # Start Docker Containers
     docker compose up -d
 
@@ -126,13 +114,16 @@ function validate_frontend() {
     cd $WORKPATH/docker/ui/svelte
     local conda_env_name="OPEA_e2e"
     export PATH=${HOME}/miniforge3/bin/:$PATH
-#    conda remove -n ${conda_env_name} --all -y
-#    conda create -n ${conda_env_name} python=3.12 -y
+    if conda info --envs | grep -q "$conda_env_name"; then
+        echo "$conda_env_name exist!"
+    else
+        conda create -n ${conda_env_name} python=3.12 -y
+    fi
     source activate ${conda_env_name}
 
     sed -i "s/localhost/$ip_address/g" playwright.config.ts
 
-#    conda install -c conda-forge nodejs -y
+    conda install -c conda-forge nodejs -y
     npm install && npm ci && npx playwright install --with-deps
     node -v && npm -v && pip list
 
@@ -156,7 +147,7 @@ function main() {
 
     stop_docker
 
-    if [[ "$IMAGE_REPO" == "" ]]; then build_docker_images; fi
+    if [[ "$IMAGE_REPO" == "opea" ]]; then build_docker_images; fi
     start_services
 
     validate_microservices
diff --git a/DocSum/tests/test_docsum_on_xeon.sh b/DocSum/tests/test_docsum_on_xeon.sh
index 991a3751b0..e9bc7a8c00 100644
--- a/DocSum/tests/test_docsum_on_xeon.sh
+++ b/DocSum/tests/test_docsum_on_xeon.sh
@@ -2,26 +2,27 @@
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-set -x
+set -xe
+IMAGE_REPO=${IMAGE_REPO:-"opea"}
+IMAGE_TAG=${IMAGE_TAG:-"latest"}
+echo "REGISTRY=IMAGE_REPO=${IMAGE_REPO}"
+echo "TAG=IMAGE_TAG=${IMAGE_TAG}"
+export REGISTRY=${IMAGE_REPO}
+export TAG=${IMAGE_TAG}
 
 WORKPATH=$(dirname "$PWD")
 LOG_PATH="$WORKPATH/tests"
 ip_address=$(hostname -I | awk '{print $1}')
 
 function build_docker_images() {
-    cd $WORKPATH
-    git clone https://github.com/opea-project/GenAIComps.git
-    cd GenAIComps
-
-    docker build --no-cache -t opea/llm-docsum-tgi:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/llms/summarization/tgi/Dockerfile .
-
     cd $WORKPATH/docker
-    docker build --no-cache -t opea/docsum:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f Dockerfile .
+    git clone https://github.com/opea-project/GenAIComps.git
 
-    cd $WORKPATH/docker/ui
-    docker build --no-cache -t opea/docsum-ui:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f docker/Dockerfile .
-    docker build --no-cache -t opea/docsum-react-ui:latest --build-arg BACKEND_SERVICE_ENDPOINT=http://${ip_address}:8888/v1/docsum -f docker/Dockerfile.react .
+    echo "Build all the images with --no-cache, check docker_image_build.log for details..."
+    service_list="docsum docsum-ui llm-docsum-tgi"
+    docker compose -f docker_build_compose.yaml build ${service_list} --no-cache > ${LOG_PATH}/docker_image_build.log
 
+    docker pull ghcr.io/huggingface/text-generation-inference:1.4
     docker images
 }
 
@@ -37,17 +38,6 @@ function start_services() {
 
     sed -i "s/backend_address/$ip_address/g" $WORKPATH/docker/ui/svelte/.env
 
-    if [[ "$IMAGE_REPO" != "" ]]; then
-        # Replace the container name with a test-specific name
-        echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
-        sed -i "s#image: opea/docsum:latest#image: opea/docsum:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/docsum-ui:latest#image: opea/docsum-ui:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/docsum-react-ui:latest#image: opea/docsum-react-ui:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose.yaml
-        echo "cat compose.yaml"
-        cat compose.yaml
-    fi
-
     # Start Docker Containers
     docker compose up -d
 
@@ -123,13 +113,16 @@ function validate_frontend() {
     cd $WORKPATH/docker/ui/svelte
     local conda_env_name="OPEA_e2e"
     export PATH=${HOME}/miniforge3/bin/:$PATH
-#    conda remove -n ${conda_env_name} --all -y
-#    conda create -n ${conda_env_name} python=3.12 -y
+    if conda info --envs | grep -q "$conda_env_name"; then
+        echo "$conda_env_name exist!"
+    else
+        conda create -n ${conda_env_name} python=3.12 -y
+    fi
     source activate ${conda_env_name}
 
     sed -i "s/localhost/$ip_address/g" playwright.config.ts
 
-#    conda install -c conda-forge nodejs -y
+    conda install -c conda-forge nodejs -y
     npm install && npm ci && npx playwright install --with-deps
     node -v && npm -v && pip list
 
@@ -153,7 +146,7 @@ function main() {
 
     stop_docker
 
-    if [[ "$IMAGE_REPO" == "" ]]; then build_docker_images; fi
+    if [[ "$IMAGE_REPO" == "opea" ]]; then build_docker_images; fi
     start_services
 
     validate_microservices
diff --git a/FaqGen/docker/docker_build_compose.yaml b/FaqGen/docker/docker_build_compose.yaml
new file mode 100644
index 0000000000..a80257fc44
--- /dev/null
+++ b/FaqGen/docker/docker_build_compose.yaml
@@ -0,0 +1,30 @@
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
+
+services:
+  faqgen:
+    build:
+      args:
+        http_proxy: ${http_proxy}
+        https_proxy: ${https_proxy}
+        no_proxy: ${no_proxy}
+      dockerfile: ./Dockerfile
+    image: ${REGISTRY:-opea}/faqgen:${TAG:-latest}
+  faqgen-ui:
+    build:
+      context: ui
+      dockerfile: ./docker/Dockerfile
+    extends: faqgen
+    image: ${REGISTRY:-opea}/faqgen-ui:${TAG:-latest}
+  faqgen-react-ui:
+    build:
+      context: ui
+      dockerfile: ./docker/Dockerfile.react
+    extends: faqgen
+    image: ${REGISTRY:-opea}/faqgen-react-ui:${TAG:-latest}
+  llm-faqgen-tgi:
+    build:
+      context: GenAIComps
+      dockerfile: comps/llms/faq-generation/tgi/Dockerfile
+    extends: faqgen
+    image: ${REGISTRY:-opea}/llm-faqgen-tgi:${TAG:-latest}
diff --git a/FaqGen/docker/gaudi/compose.yaml b/FaqGen/docker/gaudi/compose.yaml
index 602105ec23..238e271f6e 100644
--- a/FaqGen/docker/gaudi/compose.yaml
+++ b/FaqGen/docker/gaudi/compose.yaml
@@ -1,8 +1,6 @@
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-version: "3.8"
-
 services:
   tgi-service:
     image: ghcr.io/huggingface/tgi-gaudi:2.0.1
@@ -26,7 +24,7 @@ services:
     ipc: host
     command: --model-id ${LLM_MODEL_ID} --max-input-length 2048 --max-total-tokens 4096 --max-batch-total-tokens 65536 --max-batch-prefill-tokens 4096
   llm_faqgen:
-    image: opea/llm-faqgen-tgi:latest
+    image: ${REGISTRY:-opea}/llm-faqgen-tgi:${TAG:-latest}
     container_name: llm-faqgen-server
     depends_on:
       - tgi-service
@@ -41,7 +39,7 @@ services:
       HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
     restart: unless-stopped
   faqgen-gaudi-backend-server:
-    image: opea/faqgen:latest
+    image: ${REGISTRY:-opea}/faqgen:${TAG:-latest}
     container_name: faqgen-gaudi-backend-server
     depends_on:
       - tgi-service
@@ -57,7 +55,7 @@ services:
     ipc: host
     restart: always
   faqgen-gaudi-ui-server:
-    image: opea/faqgen-ui:latest
+    image: ${REGISTRY:-opea}/faqgen-ui:${TAG:-latest}
     container_name: faqgen-gaudi-ui-server
     depends_on:
       - faqgen-gaudi-backend-server
diff --git a/FaqGen/docker/xeon/compose.yaml b/FaqGen/docker/xeon/compose.yaml
index 00f2d0ed08..406f4ca434 100644
--- a/FaqGen/docker/xeon/compose.yaml
+++ b/FaqGen/docker/xeon/compose.yaml
@@ -1,8 +1,6 @@
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-version: "3.8"
-
 services:
   tgi-service:
     image: ghcr.io/huggingface/text-generation-inference:1.4
@@ -20,7 +18,7 @@ services:
     shm_size: 1g
     command: --model-id ${LLM_MODEL_ID}
   llm_faqgen:
-    image: opea/llm-faqgen-tgi:latest
+    image: ${REGISTRY:-opea}/llm-faqgen-tgi:${TAG:-latest}
     container_name: llm-faqgen-server
     depends_on:
       - tgi-service
@@ -35,7 +33,7 @@ services:
       HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
     restart: unless-stopped
   faqgen-xeon-backend-server:
-    image: opea/faqgen:latest
+    image: ${REGISTRY:-opea}/faqgen:${TAG:-latest}
     container_name: faqgen-xeon-backend-server
     depends_on:
       - tgi-service
@@ -51,7 +49,7 @@ services:
     ipc: host
     restart: always
   faqgen-xeon-ui-server:
-    image: opea/faqgen-ui:latest
+    image: ${REGISTRY:-opea}/faqgen-ui:${TAG:-latest}
     container_name: faqgen-xeon-ui-server
     depends_on:
       - faqgen-xeon-backend-server
diff --git a/FaqGen/tests/test_faqgen_on_gaudi.sh b/FaqGen/tests/test_faqgen_on_gaudi.sh
index c41940d614..17242c1682 100644
--- a/FaqGen/tests/test_faqgen_on_gaudi.sh
+++ b/FaqGen/tests/test_faqgen_on_gaudi.sh
@@ -3,26 +3,26 @@
 # SPDX-License-Identifier: Apache-2.0
 
 set -x
+IMAGE_REPO=${IMAGE_REPO:-"opea"}
+IMAGE_TAG=${IMAGE_TAG:-"latest"}
+echo "REGISTRY=IMAGE_REPO=${IMAGE_REPO}"
+echo "TAG=IMAGE_TAG=${IMAGE_TAG}"
+export REGISTRY=${IMAGE_REPO}
+export TAG=${IMAGE_TAG}
 
 WORKPATH=$(dirname "$PWD")
 LOG_PATH="$WORKPATH/tests"
 ip_address=$(hostname -I | awk '{print $1}')
 
 function build_docker_images() {
-    cd $WORKPATH
-
-    git clone https://github.com/opea-project/GenAIComps.git
-    cd GenAIComps
-    docker build --no-cache -t opea/llm-faqgen-tgi:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/llms/faq-generation/tgi/Dockerfile .
-
-    docker pull ghcr.io/huggingface/tgi-gaudi:1.2.1
-
     cd $WORKPATH/docker
-    docker build --no-cache -t opea/faqgen:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f Dockerfile .
+    git clone https://github.com/opea-project/GenAIComps.git
 
-    cd $WORKPATH/docker/ui
-    docker build --no-cache -t opea/faqgen-ui:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f docker/Dockerfile .
+    echo "Build all the images with --no-cache, check docker_image_build.log for details..."
+    service_list="faqgen faqgen-ui llm-faqgen-tgi"
+    docker compose -f docker_build_compose.yaml build ${service_list} --no-cache > ${LOG_PATH}/docker_image_build.log
 
+    docker pull ghcr.io/huggingface/tgi-gaudi:1.2.1
     docker images
 }
 
@@ -38,14 +38,6 @@ function start_services() {
 
     sed -i "s/backend_address/$ip_address/g" $WORKPATH/docker/ui/svelte/.env
 
-    # if [[ "$IMAGE_REPO" != "" ]]; then
-    #     # Replace the container name with a test-specific name
-    #     echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
-    #     sed -i "s#image: opea/faqgen:latest#image: opea/faqgen:${IMAGE_TAG}#g" compose.yaml
-    #     sed -i "s#image: opea/faqgen-ui:latest#image: opea/faqgen-ui:${IMAGE_TAG}#g" compose.yaml
-    #     sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose.yaml
-    # fi
-
     # Start Docker Containers
     docker compose up -d
 
@@ -122,13 +114,16 @@ function validate_frontend() {
     cd $WORKPATH/docker/ui/svelte
     local conda_env_name="OPEA_e2e"
     export PATH=${HOME}/miniforge3/bin/:$PATH
-#    conda remove -n ${conda_env_name} --all -y
-#    conda create -n ${conda_env_name} python=3.12 -y
+    if conda info --envs | grep -q "$conda_env_name"; then
+        echo "$conda_env_name exist!"
+    else
+        conda create -n ${conda_env_name} python=3.12 -y
+    fi
     source activate ${conda_env_name}
 
     sed -i "s/localhost/$ip_address/g" playwright.config.ts
 
-#    conda install -c conda-forge nodejs -y
+    conda install -c conda-forge nodejs -y
     npm install && npm ci && npx playwright install --with-deps
     node -v && npm -v && pip list
 
@@ -152,7 +147,7 @@ function main() {
 
     stop_docker
 
-    build_docker_images
+    if [[ "$IMAGE_REPO" == "opea" ]]; then build_docker_images; fi
     start_services
 
     validate_microservices
diff --git a/FaqGen/tests/test_faqgen_on_xeon.sh b/FaqGen/tests/test_faqgen_on_xeon.sh
index b0b694f211..8e2e0a1e3c 100755
--- a/FaqGen/tests/test_faqgen_on_xeon.sh
+++ b/FaqGen/tests/test_faqgen_on_xeon.sh
@@ -3,25 +3,26 @@
 # SPDX-License-Identifier: Apache-2.0
 
 set -x
+IMAGE_REPO=${IMAGE_REPO:-"opea"}
+IMAGE_TAG=${IMAGE_TAG:-"latest"}
+echo "REGISTRY=IMAGE_REPO=${IMAGE_REPO}"
+echo "TAG=IMAGE_TAG=${IMAGE_TAG}"
+export REGISTRY=${IMAGE_REPO}
+export TAG=${IMAGE_TAG}
 
 WORKPATH=$(dirname "$PWD")
 LOG_PATH="$WORKPATH/tests"
 ip_address=$(hostname -I | awk '{print $1}')
 
 function build_docker_images() {
-    cd $WORKPATH
-
-    git clone https://github.com/opea-project/GenAIComps.git
-    cd GenAIComps
-
-    docker build --no-cache -t opea/llm-faqgen-tgi:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/llms/faq-generation/tgi/Dockerfile .
-
     cd $WORKPATH/docker
-    docker build --no-cache -t opea/faqgen:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f Dockerfile .
+    git clone https://github.com/opea-project/GenAIComps.git
 
-    cd $WORKPATH/docker/ui
-    docker build --no-cache -t opea/faqgen-ui:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f docker/Dockerfile .
+    echo "Build all the images with --no-cache, check docker_image_build.log for details..."
+    service_list="faqgen faqgen-ui llm-faqgen-tgi"
+    docker compose -f docker_build_compose.yaml build ${service_list} --no-cache > ${LOG_PATH}/docker_image_build.log
 
+    docker pull ghcr.io/huggingface/text-generation-inference:1.4
     docker images
 }
 
@@ -37,14 +38,6 @@ function start_services() {
 
     sed -i "s/backend_address/$ip_address/g" $WORKPATH/docker/ui/svelte/.env
 
-    # if [[ "$IMAGE_REPO" != "" ]]; then
-    #     # Replace the container name with a test-specific name
-    #     echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
-    #     sed -i "s#image: opea/faqgen:latest#image: opea/faqgen:${IMAGE_TAG}#g" compose.yaml
-    #     sed -i "s#image: opea/faqgen-ui:latest#image: opea/faqgen-ui:${IMAGE_TAG}#g" compose.yaml
-    #     sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose.yaml
-    # fi
-
     # Start Docker Containers
     docker compose up -d
 
@@ -121,13 +114,16 @@ function validate_frontend() {
     cd $WORKPATH/docker/ui/svelte
     local conda_env_name="OPEA_e2e"
     export PATH=${HOME}/miniforge3/bin/:$PATH
-#    conda remove -n ${conda_env_name} --all -y
-#    conda create -n ${conda_env_name} python=3.12 -y
+    if conda info --envs | grep -q "$conda_env_name"; then
+        echo "$conda_env_name exist!"
+    else
+        conda create -n ${conda_env_name} python=3.12 -y
+    fi
     source activate ${conda_env_name}
 
     sed -i "s/localhost/$ip_address/g" playwright.config.ts
 
-#    conda install -c conda-forge nodejs -y
+    conda install -c conda-forge nodejs -y
     npm install && npm ci && npx playwright install --with-deps
     node -v && npm -v && pip list
 
@@ -151,7 +147,7 @@ function main() {
 
     stop_docker
 
-    build_docker_images
+    if [[ "$IMAGE_REPO" == "opea" ]]; then build_docker_images; fi
     start_services
 
     validate_microservices
diff --git a/SearchQnA/docker/docker_build_compose.yaml b/SearchQnA/docker/docker_build_compose.yaml
new file mode 100644
index 0000000000..a31edd3431
--- /dev/null
+++ b/SearchQnA/docker/docker_build_compose.yaml
@@ -0,0 +1,48 @@
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
+
+services:
+  searchqna:
+    build:
+      args:
+        http_proxy: ${http_proxy}
+        https_proxy: ${https_proxy}
+        no_proxy: ${no_proxy}
+      dockerfile: ./Dockerfile
+    image: ${REGISTRY:-opea}/searchqna:${TAG:-latest}
+  searchqna-ui:
+    build:
+      context: ui
+      dockerfile: ./docker/Dockerfile
+    extends: searchqna
+    image: ${REGISTRY:-opea}/searchqna-ui:${TAG:-latest}
+  embedding-tei:
+    build:
+      context: GenAIComps
+      dockerfile: comps/embeddings/langchain/docker/Dockerfile
+    extends: searchqna
+    image: ${REGISTRY:-opea}/embedding-tei:${TAG:-latest}
+  web-retriever-chroma:
+    build:
+      context: GenAIComps
+      dockerfile: comps/web_retrievers/langchain/chroma/docker/Dockerfile
+    extends: searchqna
+    image: ${REGISTRY:-opea}/web-retriever-chroma:${TAG:-latest}
+  reranking-tei:
+    build:
+      context: GenAIComps
+      dockerfile: comps/reranks/tei/docker/Dockerfile
+    extends: searchqna
+    image: ${REGISTRY:-opea}/reranking-tei:${TAG:-latest}
+  llm-tgi:
+    build:
+      context: GenAIComps
+      dockerfile: comps/llms/text-generation/tgi/Dockerfile
+    extends: searchqna
+    image: ${REGISTRY:-opea}/llm-tgi:${TAG:-latest}
+  tei-gaudi:
+    build:
+      context: tei-gaudi
+      dockerfile: Dockerfile-hpu
+    extends: searchqna
+    image: ${REGISTRY:-opea}/tei-gaudi:${TAG:-latest}
diff --git a/SearchQnA/docker/gaudi/compose.yaml b/SearchQnA/docker/gaudi/compose.yaml
index dc191f5b8f..ee3b32b6f0 100644
--- a/SearchQnA/docker/gaudi/compose.yaml
+++ b/SearchQnA/docker/gaudi/compose.yaml
@@ -1,12 +1,9 @@
-
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-version: "3.8"
-
 services:
   tei-embedding-service:
-    image: opea/tei-gaudi:latest
+    image: ${REGISTRY:-opea}/tei-gaudi:${TAG:-latest}
     container_name: tei-embedding-gaudi-server
     ports:
       - "3001:80"
@@ -27,7 +24,7 @@ services:
       ENABLE_EXPERIMENTAL_FLAGS: true
     command: --model-id ${EMBEDDING_MODEL_ID} --auto-truncate
   embedding:
-    image: opea/embedding-tei:latest
+    image: ${REGISTRY:-opea}/embedding-tei:${TAG:-latest}
     container_name: embedding-tei-server
     depends_on:
       - tei-embedding-service
@@ -41,7 +38,7 @@ services:
       TEI_EMBEDDING_ENDPOINT: ${TEI_EMBEDDING_ENDPOINT}
     restart: unless-stopped
   web-retriever:
-    image: opea/web-retriever-chroma:latest
+    image: ${REGISTRY:-opea}/web-retriever-chroma:${TAG:-latest}
     container_name: web-retriever-chroma-server
     ports:
       - "3003:7077"
@@ -68,7 +65,7 @@ services:
       https_proxy: ${https_proxy}
     command: --model-id ${RERANK_MODEL_ID} --auto-truncate
   reranking:
-    image: opea/reranking-tei:latest
+    image: ${REGISTRY:-opea}/reranking-tei:${TAG:-latest}
     container_name: reranking-tei-xeon-server
     depends_on:
       - tei-reranking-service
@@ -104,7 +101,7 @@ services:
     ipc: host
     command: --model-id ${LLM_MODEL_ID} --max-input-length 1024 --max-total-tokens 2048
   llm:
-    image: opea/llm-tgi:latest
+    image: ${REGISTRY:-opea}/llm-tgi:${TAG:-latest}
     container_name: llm-tgi-gaudi-server
     depends_on:
       - tgi-service
@@ -121,7 +118,7 @@ services:
       HF_HUB_ENABLE_HF_TRANSFER: 0
     restart: unless-stopped
   searchqna-gaudi-backend-server:
-    image: opea/searchqna:latest
+    image: ${REGISTRY:-opea}/searchqna:${TAG:-latest}
     container_name: searchqna-gaudi-backend-server
     depends_on:
       - tei-embedding-service
@@ -149,7 +146,7 @@ services:
     ipc: host
     restart: always
   searchqna-gaudi-ui-server:
-    image: opea/searchqna-ui:latest
+    image: ${REGISTRY:-opea}/searchqna-ui:${TAG:-latest}
     container_name: searchqna-gaudi-ui-server
     depends_on:
       - searchqna-gaudi-backend-server
diff --git a/SearchQnA/docker/xeon/compose.yaml b/SearchQnA/docker/xeon/compose.yaml
index 37c4232c3a..cdbf87e0e3 100644
--- a/SearchQnA/docker/xeon/compose.yaml
+++ b/SearchQnA/docker/xeon/compose.yaml
@@ -1,9 +1,6 @@
-
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-version: "3.8"
-
 services:
   tei-embedding-service:
     image: ghcr.io/huggingface/text-embeddings-inference:cpu-1.5
@@ -19,7 +16,7 @@ services:
       https_proxy: ${https_proxy}
     command: --model-id ${EMBEDDING_MODEL_ID} --auto-truncate
   embedding:
-    image: opea/embedding-tei:latest
+    image: ${REGISTRY:-opea}/embedding-tei:${TAG:-latest}
     container_name: embedding-tei-server
     depends_on:
       - tei-embedding-service
@@ -34,7 +31,7 @@ services:
       HF_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
     restart: unless-stopped
   web-retriever:
-    image: opea/web-retriever-chroma:latest
+    image: ${REGISTRY:-opea}/web-retriever-chroma:${TAG:-latest}
     container_name: web-retriever-chroma-server
     ports:
       - "3003:7077"
@@ -61,7 +58,7 @@ services:
       https_proxy: ${https_proxy}
     command: --model-id ${RERANK_MODEL_ID} --auto-truncate
   reranking:
-    image: opea/reranking-tei:latest
+    image: ${REGISTRY:-opea}/reranking-tei:${TAG:-latest}
     container_name: reranking-tei-xeon-server
     depends_on:
       - tei-reranking-service
@@ -90,7 +87,7 @@ services:
       HF_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
     command: --model-id ${LLM_MODEL_ID}
   llm:
-    image: opea/llm-tgi:latest
+    image: ${REGISTRY:-opea}/llm-tgi:${TAG:-latest}
     container_name: llm-tgi-server
     depends_on:
       - tgi-service
@@ -105,7 +102,7 @@ services:
       HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
     restart: unless-stopped
   searchqna-xeon-backend-server:
-    image: opea/searchqna:latest
+    image: ${REGISTRY:-opea}/searchqna:${TAG:-latest}
     container_name: searchqna-xeon-backend-server
     depends_on:
       - tei-embedding-service
@@ -133,7 +130,7 @@ services:
     ipc: host
     restart: always
   searchqna-gaudi-ui-server:
-    image: opea/searchqna-ui:latest
+    image: ${REGISTRY:-opea}/searchqna-ui:${TAG:-latest}
     container_name: searchqna-xeon-ui-server
     depends_on:
       - searchqna-xeon-backend-server
diff --git a/SearchQnA/tests/test_searchqna_on_gaudi.sh b/SearchQnA/tests/test_searchqna_on_gaudi.sh
index 60e57ccb93..072ba688b9 100644
--- a/SearchQnA/tests/test_searchqna_on_gaudi.sh
+++ b/SearchQnA/tests/test_searchqna_on_gaudi.sh
@@ -2,46 +2,33 @@
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-# for test
-
 set -xe
+IMAGE_REPO=${IMAGE_REPO:-"opea"}
+IMAGE_TAG=${IMAGE_TAG:-"latest"}
+echo "REGISTRY=IMAGE_REPO=${IMAGE_REPO}"
+echo "TAG=IMAGE_TAG=${IMAGE_TAG}"
+export REGISTRY=${IMAGE_REPO}
+export TAG=${IMAGE_TAG}
 
 WORKPATH=$(dirname "$PWD")
 LOG_PATH="$WORKPATH/tests"
 ip_address=$(hostname -I | awk '{print $1}')
 
 function build_docker_images() {
-    cd $WORKPATH
+    cd $WORKPATH/docker
     git clone https://github.com/opea-project/GenAIComps.git
-    cd GenAIComps
-
-    docker build --no-cache -t opea/embedding-tei:latest  -f comps/embeddings/langchain/docker/Dockerfile .
-    docker build --no-cache -t opea/web-retriever-chroma:latest  -f comps/web_retrievers/langchain/chroma/docker/Dockerfile .
-    docker build --no-cache -t opea/reranking-tei:latest  -f comps/reranks/tei/docker/Dockerfile .
-    docker build --no-cache -t opea/llm-tgi:latest  -f comps/llms/text-generation/tgi/Dockerfile .
+    git clone https://github.com/huggingface/tei-gaudi
 
-#    cd ..
-#    git clone https://github.com/huggingface/tei-gaudi
-#    cd tei-gaudi/
-#    docker build --no-cache -f Dockerfile-hpu -t opea/tei-gaudi:latest .
+    echo "Build all the images with --no-cache, check docker_image_build.log for details..."
+    service_list="searchqna searchqna-ui embedding-tei web-retriever-chroma reranking-tei llm-tgi tei-gaudi"
+    docker compose -f docker_build_compose.yaml build ${service_list} --no-cache > ${LOG_PATH}/docker_image_build.log
 
     docker pull ghcr.io/huggingface/text-embeddings-inference:cpu-1.5
     docker pull ghcr.io/huggingface/tgi-gaudi:2.0.1
-    cd $WORKPATH/docker
-    docker build --no-cache -t opea/searchqna:latest -f Dockerfile .
-
-    cd $WORKPATH/docker/ui
-    docker build --no-cache -t opea/searchqna-ui:latest -f docker/Dockerfile .
-
     docker images
 }
 
 function start_services() {
-    # build tei-gaudi for each test instead of pull from local registry
-    cd $WORKPATH
-    git clone https://github.com/huggingface/tei-gaudi
-    cd tei-gaudi/
-    docker build --no-cache -f Dockerfile-hpu -t opea/tei-gaudi:latest .
 
     cd $WORKPATH/docker/gaudi
     export GOOGLE_CSE_ID=$GOOGLE_CSE_ID
@@ -71,17 +58,6 @@ function start_services() {
 
     sed -i "s/backend_address/$ip_address/g" $WORKPATH/docker/ui/svelte/.env
 
-    if [[ "$IMAGE_REPO" != "" ]]; then
-        # Replace the container name with a test-specific name
-        echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
-        sed -i "s#image: opea/searchqna:latest#image: opea/searchqna:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/searchqna-ui:latest#image: opea/searchqna-ui:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose.yaml
-        sed -i "s#image: ${IMAGE_REPO}opea/tei-gaudi:latest#image: opea/tei-gaudi:latest#g" compose.yaml
-        echo "cat compose.yaml"
-        cat compose.yaml
-    fi
-
     # Start Docker Containers
     docker compose up -d
     n=0
@@ -118,13 +94,16 @@ function validate_frontend() {
     local conda_env_name="OPEA_e2e"
 
     export PATH=${HOME}/miniforge3/bin/:$PATH
-    #    conda remove -n ${conda_env_name} --all -y
-    #    conda create -n ${conda_env_name} python=3.12 -y
+    if conda info --envs | grep -q "$conda_env_name"; then
+        echo "$conda_env_name exist!"
+    else
+        conda create -n ${conda_env_name} python=3.12 -y
+    fi
     source activate ${conda_env_name}
 
     sed -i "s/localhost/$ip_address/g" playwright.config.ts
 
-    #    conda install -c conda-forge nodejs -y
+    conda install -c conda-forge nodejs -y
     npm install && npm ci && npx playwright install --with-deps
     node -v && npm -v && pip list
 
@@ -147,7 +126,7 @@ function stop_docker() {
 function main() {
 
     stop_docker
-    if [[ "$IMAGE_REPO" == "" ]]; then build_docker_images; fi
+    if [[ "$IMAGE_REPO" == "opea" ]]; then build_docker_images; fi
     start_services
 
     validate_megaservice
diff --git a/SearchQnA/tests/test_searchqna_on_xeon.sh b/SearchQnA/tests/test_searchqna_on_xeon.sh
index 31f8c0b0be..583723a090 100644
--- a/SearchQnA/tests/test_searchqna_on_xeon.sh
+++ b/SearchQnA/tests/test_searchqna_on_xeon.sh
@@ -3,28 +3,27 @@
 # SPDX-License-Identifier: Apache-2.0
 
 set -xe
+IMAGE_REPO=${IMAGE_REPO:-"opea"}
+IMAGE_TAG=${IMAGE_TAG:-"latest"}
+echo "REGISTRY=IMAGE_REPO=${IMAGE_REPO}"
+echo "TAG=IMAGE_TAG=${IMAGE_TAG}"
+export REGISTRY=${IMAGE_REPO}
+export TAG=${IMAGE_TAG}
 
 WORKPATH=$(dirname "$PWD")
 LOG_PATH="$WORKPATH/tests"
 ip_address=$(hostname -I | awk '{print $1}')
 
 function build_docker_images() {
-    cd $WORKPATH
+    cd $WORKPATH/docker
     git clone https://github.com/opea-project/GenAIComps.git
-    cd GenAIComps
 
-    docker build -t opea/embedding-tei:latest  -f comps/embeddings/langchain/docker/Dockerfile .
-    docker build -t opea/web-retriever-chroma:latest  -f comps/web_retrievers/langchain/chroma/docker/Dockerfile .
-    docker build -t opea/reranking-tei:latest  -f comps/reranks/tei/docker/Dockerfile .
-    docker build -t opea/llm-tgi:latest  -f comps/llms/text-generation/tgi/Dockerfile .
+    echo "Build all the images with --no-cache, check docker_image_build.log for details..."
+    service_list="searchqna searchqna-ui embedding-tei web-retriever-chroma reranking-tei llm-tgi"
+    docker compose -f docker_build_compose.yaml build ${service_list} --no-cache > ${LOG_PATH}/docker_image_build.log
+
     docker pull ghcr.io/huggingface/text-embeddings-inference:cpu-1.5
     docker pull ghcr.io/huggingface/text-generation-inference:1.4
-    cd $WORKPATH/docker
-    docker build -t opea/searchqna:latest -f Dockerfile .
-
-    cd $WORKPATH/docker/ui
-    docker build --no-cache -t opea/searchqna-ui:latest -f docker/Dockerfile .
-
     docker images
 }
 
@@ -57,25 +56,15 @@ function start_services() {
 
     sed -i "s/backend_address/$ip_address/g" $WORKPATH/docker/ui/svelte/.env
 
-    if [[ "$IMAGE_REPO" != "" ]]; then
-        # Replace the container name with a test-specific name
-        echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
-        sed -i "s#image: opea/searchqna:latest#image: opea/searchqna:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/searchqna-ui:latest#image: opea/searchqna-ui:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose.yaml
-        echo "cat compose.yaml"
-        cat compose.yaml
-    fi
-
     # Start Docker Containers
     docker compose up -d
     n=0
-    until [[ "$n" -ge 200 ]]; do
+    until [[ "$n" -ge 100 ]]; do
         docker logs tgi-service > $LOG_PATH/tgi_service_start.log
         if grep -q Connected $LOG_PATH/tgi_service_start.log; then
             break
         fi
-        sleep 1s
+        sleep 5s
         n=$((n+1))
     done
 }
@@ -97,28 +86,31 @@ function validate_megaservice() {
 }
 
 function validate_frontend() {
-   cd $WORKPATH/docker/ui/svelte
-   local conda_env_name="OPEA_e2e"
-   export PATH=${HOME}/miniforge3/bin/:$PATH
-#    conda remove -n ${conda_env_name} --all -y
-#    conda create -n ${conda_env_name} python=3.12 -y
-   source activate ${conda_env_name}
+    cd $WORKPATH/docker/ui/svelte
+    local conda_env_name="OPEA_e2e"
+    export PATH=${HOME}/miniforge3/bin/:$PATH
+    if conda info --envs | grep -q "$conda_env_name"; then
+        echo "$conda_env_name exist!"
+    else
+        conda create -n ${conda_env_name} python=3.12 -y
+    fi
+    source activate ${conda_env_name}
 
-   sed -i "s/localhost/$ip_address/g" playwright.config.ts
+    sed -i "s/localhost/$ip_address/g" playwright.config.ts
 
-#    conda install -c conda-forge nodejs -y
-   npm install && npm ci && npx playwright install --with-deps
-   node -v && npm -v && pip list
+    conda install -c conda-forge nodejs -y
+    npm install && npm ci && npx playwright install --with-deps
+    node -v && npm -v && pip list
 
-   exit_status=0
-   npx playwright test || exit_status=$?
+    exit_status=0
+    npx playwright test || exit_status=$?
 
-   if [ $exit_status -ne 0 ]; then
+    if [ $exit_status -ne 0 ]; then
        echo "[TEST INFO]: ---------frontend test failed---------"
        exit $exit_status
-   else
+    else
        echo "[TEST INFO]: ---------frontend test passed---------"
-   fi
+    fi
 }
 
 function stop_docker() {
@@ -129,7 +121,7 @@ function stop_docker() {
 function main() {
 
     stop_docker
-    if [[ "$IMAGE_REPO" == "" ]]; then build_docker_images; fi
+    if [[ "$IMAGE_REPO" == "opea" ]]; then build_docker_images; fi
     start_services
 
     validate_megaservice
diff --git a/Translation/docker/docker_build_compose.yaml b/Translation/docker/docker_build_compose.yaml
new file mode 100644
index 0000000000..5b2dea9ac3
--- /dev/null
+++ b/Translation/docker/docker_build_compose.yaml
@@ -0,0 +1,18 @@
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
+
+services:
+  translation:
+    build:
+      args:
+        http_proxy: ${http_proxy}
+        https_proxy: ${https_proxy}
+        no_proxy: ${no_proxy}
+      dockerfile: ./Dockerfile
+    image: ${REGISTRY:-opea}/translation:${TAG:-latest}
+  translation-ui:
+    build:
+      context: ui
+      dockerfile: ./docker/Dockerfile
+    extends: translation
+    image: ${REGISTRY:-opea}/translation-ui:${TAG:-latest}
diff --git a/Translation/docker/gaudi/compose.yaml b/Translation/docker/gaudi/compose.yaml
index 1d77edcbb0..2388f85214 100644
--- a/Translation/docker/gaudi/compose.yaml
+++ b/Translation/docker/gaudi/compose.yaml
@@ -1,18 +1,5 @@
-# Copyright (c) 2024 Intel Corporation
-#
-# 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.
-
-version: "3.8"
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
 
 services:
   tgi-service:
@@ -29,7 +16,7 @@ services:
       - "./data:/data"
     command: --model-id ${LLM_MODEL_ID} --max-input-length 1024 --max-total-tokens 2048
   llm:
-    image: opea/llm-tgi:latest
+    image: ${REGISTRY:-opea}/llm-tgi:${TAG:-latest}
     container_name: llm-tgi-gaudi-server
     depends_on:
       - tgi-service
@@ -43,7 +30,7 @@ services:
       HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
     restart: unless-stopped
   translation-gaudi-backend-server:
-    image: opea/translation:latest
+    image: ${REGISTRY:-opea}/translation:${TAG:-latest}
     container_name: translation-gaudi-backend-server
     depends_on:
       - tgi-service
@@ -58,7 +45,7 @@ services:
     ipc: host
     restart: always
   translation-gaudi-ui-server:
-    image: opea/translation-ui:latest
+    image: ${REGISTRY:-opea}/translation-ui:${TAG:-latest}
     container_name: translation-gaudi-ui-server
     depends_on:
       - translation-gaudi-backend-server
diff --git a/Translation/docker/xeon/compose.yaml b/Translation/docker/xeon/compose.yaml
index 697c90a800..da7a43763f 100644
--- a/Translation/docker/xeon/compose.yaml
+++ b/Translation/docker/xeon/compose.yaml
@@ -1,18 +1,5 @@
-# Copyright (c) 2024 Intel Corporation
-#
-# 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.
-
-version: "3.8"
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
 
 services:
   tgi-service:
@@ -30,7 +17,7 @@ services:
     shm_size: 1g
     command: --model-id ${LLM_MODEL_ID}
   llm:
-    image: opea/llm-tgi:latest
+    image: ${REGISTRY:-opea}/llm-tgi:${TAG:-latest}
     container_name: llm-tgi-server
     depends_on:
       - tgi-service
@@ -44,7 +31,7 @@ services:
       HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
     restart: unless-stopped
   translation-xeon-backend-server:
-    image: opea/translation:latest
+    image: ${REGISTRY:-opea}/translation:${TAG:-latest}
     container_name: translation-xeon-backend-server
     depends_on:
       - tgi-service
@@ -59,7 +46,7 @@ services:
     ipc: host
     restart: always
   translation-xeon-ui-server:
-    image: opea/translation-ui:latest
+    image: ${REGISTRY:-opea}/translation-ui:${TAG:-latest}
     container_name: translation-xeon-ui-server
     depends_on:
       - translation-xeon-backend-server
diff --git a/Translation/tests/test_translation_on_gaudi.sh b/Translation/tests/test_translation_on_gaudi.sh
index c5060a165a..47aa96a259 100644
--- a/Translation/tests/test_translation_on_gaudi.sh
+++ b/Translation/tests/test_translation_on_gaudi.sh
@@ -3,25 +3,26 @@
 # SPDX-License-Identifier: Apache-2.0
 
 set -x
+IMAGE_REPO=${IMAGE_REPO:-"opea"}
+IMAGE_TAG=${IMAGE_TAG:-"latest"}
+echo "REGISTRY=IMAGE_REPO=${IMAGE_REPO}"
+echo "TAG=IMAGE_TAG=${IMAGE_TAG}"
+export REGISTRY=${IMAGE_REPO}
+export TAG=${IMAGE_TAG}
 
 WORKPATH=$(dirname "$PWD")
 LOG_PATH="$WORKPATH/tests"
 ip_address=$(hostname -I | awk '{print $1}')
 
 function build_docker_images() {
-    cd $WORKPATH
+    cd $WORKPATH/docker
     git clone https://github.com/opea-project/GenAIComps.git
-    cd GenAIComps
-    docker build --no-cache -t opea/llm-tgi:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/llms/text-generation/tgi/Dockerfile .
 
-    cd $WORKPATH/docker
-    docker build --no-cache -t opea/translation:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f Dockerfile .
+    echo "Build all the images with --no-cache, check docker_image_build.log for details..."
+    service_list="translation translation-ui llm-tgi"
+    docker compose -f docker_build_compose.yaml build ${service_list} --no-cache > ${LOG_PATH}/docker_image_build.log
 
     docker pull ghcr.io/huggingface/tgi-gaudi:2.0.1
-
-    cd $WORKPATH/docker/ui
-    docker build --no-cache -t opea/translation-ui:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f docker/Dockerfile .
-
     docker images
 }
 
@@ -37,16 +38,6 @@ function start_services() {
 
     sed -i "s/backend_address/$ip_address/g" $WORKPATH/docker/ui/svelte/.env
 
-    if [[ "$IMAGE_REPO" != "" ]]; then
-        # Replace the container name with a test-specific name
-        echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
-        sed -i "s#image: opea/translation:latest#image: opea/translation:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/translation-ui:latest#image: opea/translation-ui:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose.yaml
-        echo "cat compose.yaml"
-        cat compose.yaml
-    fi
-
     # Start Docker Containers
     docker compose up -d
 
@@ -126,13 +117,16 @@ function validate_frontend() {
     cd $WORKPATH/docker/ui/svelte
     local conda_env_name="OPEA_e2e"
     export PATH=${HOME}/miniforge3/bin/:$PATH
-#    conda remove -n ${conda_env_name} --all -y
-#    conda create -n ${conda_env_name} python=3.12 -y
+    if conda info --envs | grep -q "$conda_env_name"; then
+        echo "$conda_env_name exist!"
+    else
+        conda create -n ${conda_env_name} python=3.12 -y
+    fi
     source activate ${conda_env_name}
 
     sed -i "s/localhost/$ip_address/g" playwright.config.ts
 
-#    conda install -c conda-forge nodejs -y
+    conda install -c conda-forge nodejs -y
     npm install && npm ci && npx playwright install --with-deps
     node -v && npm -v && pip list
 
@@ -156,7 +150,7 @@ function main() {
 
     stop_docker
 
-    if [[ "$IMAGE_REPO" == "" ]]; then build_docker_images; fi
+    if [[ "$IMAGE_REPO" == "opea" ]]; then build_docker_images; fi
     start_services
 
     validate_microservices
diff --git a/Translation/tests/test_translation_on_xeon.sh b/Translation/tests/test_translation_on_xeon.sh
index 3f460a23bc..2b67833d66 100644
--- a/Translation/tests/test_translation_on_xeon.sh
+++ b/Translation/tests/test_translation_on_xeon.sh
@@ -3,24 +3,26 @@
 # SPDX-License-Identifier: Apache-2.0
 
 set -x
+IMAGE_REPO=${IMAGE_REPO:-"opea"}
+IMAGE_TAG=${IMAGE_TAG:-"latest"}
+echo "REGISTRY=IMAGE_REPO=${IMAGE_REPO}"
+echo "TAG=IMAGE_TAG=${IMAGE_TAG}"
+export REGISTRY=${IMAGE_REPO}
+export TAG=${IMAGE_TAG}
 
 WORKPATH=$(dirname "$PWD")
 LOG_PATH="$WORKPATH/tests"
 ip_address=$(hostname -I | awk '{print $1}')
 
 function build_docker_images() {
-    cd $WORKPATH
-    git clone https://github.com/opea-project/GenAIComps.git
-    cd GenAIComps
-
-    docker build --no-cache -t opea/llm-tgi:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/llms/text-generation/tgi/Dockerfile .
-
     cd $WORKPATH/docker
-    docker build --no-cache -t opea/translation:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f Dockerfile .
+    git clone https://github.com/opea-project/GenAIComps.git
 
-    cd $WORKPATH/docker/ui
-    docker build --no-cache -t opea/translation-ui:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f docker/Dockerfile .
+    echo "Build all the images with --no-cache, check docker_image_build.log for details..."
+    service_list="translation translation-ui llm-tgi"
+    docker compose -f docker_build_compose.yaml build ${service_list} --no-cache > ${LOG_PATH}/docker_image_build.log
 
+    docker pull ghcr.io/huggingface/text-generation-inference:1.4
     docker images
 }
 
@@ -36,16 +38,6 @@ function start_services() {
 
     sed -i "s/backend_address/$ip_address/g" $WORKPATH/docker/ui/svelte/.env
 
-    if [[ "$IMAGE_REPO" != "" ]]; then
-        # Replace the container name with a test-specific name
-        echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
-        sed -i "s#image: opea/translation:latest#image: opea/translation:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/translation-ui:latest#image: opea/translation-ui:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose.yaml
-        echo "cat compose.yaml"
-        cat compose.yaml
-    fi
-
     # Start Docker Containers
     docker compose up -d
 
@@ -123,13 +115,16 @@ function validate_frontend() {
     cd $WORKPATH/docker/ui/svelte
     local conda_env_name="OPEA_e2e"
     export PATH=${HOME}/miniforge3/bin/:$PATH
-#    conda remove -n ${conda_env_name} --all -y
-#    conda create -n ${conda_env_name} python=3.12 -y
+    if conda info --envs | grep -q "$conda_env_name"; then
+        echo "$conda_env_name exist!"
+    else
+        conda create -n ${conda_env_name} python=3.12 -y
+    fi
     source activate ${conda_env_name}
 
     sed -i "s/localhost/$ip_address/g" playwright.config.ts
 
-#    conda install -c conda-forge nodejs -y
+    conda install -c conda-forge nodejs -y
     npm install && npm ci && npx playwright install --with-deps
     node -v && npm -v && pip list
 
@@ -153,7 +148,7 @@ function main() {
 
     stop_docker
 
-    if [[ "$IMAGE_REPO" == "" ]]; then build_docker_images; fi
+    if [[ "$IMAGE_REPO" == "opea" ]]; then build_docker_images; fi
     start_services
 
     validate_microservices
diff --git a/VisualQnA/docker/gaudi/compose.yaml b/VisualQnA/docker/gaudi/compose.yaml
index 98445056e3..2162329993 100644
--- a/VisualQnA/docker/gaudi/compose.yaml
+++ b/VisualQnA/docker/gaudi/compose.yaml
@@ -1,12 +1,9 @@
-
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-version: "3.8"
-
 services:
   llava-tgi-service:
-    image: opea/llava-tgi:latest
+    image: ${REGISTRY:-opea}/llava-tgi:${TAG:-latest}
     container_name: tgi-llava-gaudi-server
     ports:
       - "8399:80"
@@ -26,7 +23,7 @@ services:
     ipc: host
     command: --model-id ${LVM_MODEL_ID} --max-input-length 4096 --max-total-tokens 8192
   lvm-tgi:
-    image: opea/lvm-tgi:latest
+    image: ${REGISTRY:-opea}/lvm-tgi:${TAG:-latest}
     container_name: lvm-tgi-gaudi-server
     depends_on:
       - llava-tgi-service
@@ -42,7 +39,7 @@ services:
       HF_HUB_ENABLE_HF_TRANSFER: 0
     restart: unless-stopped
   visualqna-gaudi-backend-server:
-    image: opea/visualqna:latest
+    image: ${REGISTRY:-opea}/visualqna:${TAG:-latest}
     container_name: visualqna-gaudi-backend-server
     depends_on:
       - llava-tgi-service
@@ -58,7 +55,7 @@ services:
     ipc: host
     restart: always
   visualqna-gaudi-ui-server:
-    image: opea/visualqna-ui:latest
+    image: ${REGISTRY:-opea}/visualqna-ui:${TAG:-latest}
     container_name: visualqna-gaudi-ui-server
     depends_on:
       - visualqna-gaudi-backend-server
diff --git a/VisualQnA/docker/xeon/compose.yaml b/VisualQnA/docker/xeon/compose.yaml
index b43e30f31b..e38f64cf9c 100644
--- a/VisualQnA/docker/xeon/compose.yaml
+++ b/VisualQnA/docker/xeon/compose.yaml
@@ -1,12 +1,9 @@
-
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-version: "3.8"
-
 services:
   llava-tgi-service:
-    image: opea/llava-tgi-xeon:latest
+    image: ${REGISTRY:-opea}/llava-tgi-xeon:${TAG:-latest}
     container_name: tgi-llava-xeon-server
     ports:
       - "9399:80"
@@ -21,7 +18,7 @@ services:
       HF_HUB_ENABLE_HF_TRANSFER: 0
     command: --model-id ${LVM_MODEL_ID} --max-input-length 4096 --max-total-tokens 8192 --cuda-graphs 0
   lvm-tgi:
-    image: opea/lvm-tgi:latest
+    image: ${REGISTRY:-opea}/lvm-tgi:${TAG:-latest}
     container_name: lvm-tgi-server
     depends_on:
       - llava-tgi-service
@@ -37,7 +34,7 @@ services:
       HF_HUB_ENABLE_HF_TRANSFER: 0
     restart: unless-stopped
   visualqna-xeon-backend-server:
-    image: opea/visualqna:latest
+    image: ${REGISTRY:-opea}/visualqna:${TAG:-latest}
     container_name: visualqna-xeon-backend-server
     depends_on:
       - llava-tgi-service
@@ -53,7 +50,7 @@ services:
     ipc: host
     restart: always
   visualqna-xeon-ui-server:
-    image: opea/visualqna-ui:latest
+    image: ${REGISTRY:-opea}/visualqna-ui:${TAG:-latest}
     container_name: visualqna-xeon-ui-server
     depends_on:
       - visualqna-xeon-backend-server

From dbcb80b258a3e59dc02a3707e23bc51e85e2991b Mon Sep 17 00:00:00 2001
From: "chen, suyue" <suyue.chen@intel.com>
Date: Fri, 16 Aug 2024 00:22:24 +0800
Subject: [PATCH 14/57] Fix left issues in CI/CD structure refactor (#599)

Signed-off-by: chensuyue <suyue.chen@intel.com>
Signed-off-by: dmsuehir <dina.s.jones@intel.com>
---
 CodeGen/docker/docker_build_compose.yaml       | 2 +-
 DocSum/tests/test_docsum_on_gaudi.sh           | 2 +-
 DocSum/tests/test_docsum_on_xeon.sh            | 2 +-
 Translation/docker/docker_build_compose.yaml   | 6 ++++++
 Translation/tests/test_translation_on_gaudi.sh | 6 +++---
 Translation/tests/test_translation_on_xeon.sh  | 2 +-
 6 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/CodeGen/docker/docker_build_compose.yaml b/CodeGen/docker/docker_build_compose.yaml
index bc1db1194a..f68dfa8a53 100644
--- a/CodeGen/docker/docker_build_compose.yaml
+++ b/CodeGen/docker/docker_build_compose.yaml
@@ -27,4 +27,4 @@ services:
       context: GenAIComps
       dockerfile: comps/llms/text-generation/tgi/Dockerfile
     extends: codegen
-    image: ${REGISTRY}opea/llm-tgi:${TAG:-latest}
+    image: ${REGISTRY:-opea}/llm-tgi:${TAG:-latest}
diff --git a/DocSum/tests/test_docsum_on_gaudi.sh b/DocSum/tests/test_docsum_on_gaudi.sh
index 0906bd906c..8cd1da774c 100644
--- a/DocSum/tests/test_docsum_on_gaudi.sh
+++ b/DocSum/tests/test_docsum_on_gaudi.sh
@@ -104,7 +104,7 @@ function validate_megaservice() {
     # Curl the Mega Service
     validate_services \
     "${ip_address}:8888/v1/docsum" \
-    "versatile toolkit" \
+    "toolkit" \
     "mega-docsum" \
     "docsum-gaudi-backend-server" \
     '{"messages": "Text Embeddings Inference (TEI) is a toolkit for deploying and serving open source text embeddings and sequence classification models. TEI enables high-performance extraction for the most popular models, including FlagEmbedding, Ember, GTE and E5."}'
diff --git a/DocSum/tests/test_docsum_on_xeon.sh b/DocSum/tests/test_docsum_on_xeon.sh
index e9bc7a8c00..22415f34f2 100644
--- a/DocSum/tests/test_docsum_on_xeon.sh
+++ b/DocSum/tests/test_docsum_on_xeon.sh
@@ -103,7 +103,7 @@ function validate_megaservice() {
     # Curl the Mega Service
     validate_services \
     "${ip_address}:8888/v1/docsum" \
-    "versatile toolkit" \
+    "toolkit" \
     "mega-docsum" \
     "docsum-xeon-backend-server" \
     '{"messages": "Text Embeddings Inference (TEI) is a toolkit for deploying and serving open source text embeddings and sequence classification models. TEI enables high-performance extraction for the most popular models, including FlagEmbedding, Ember, GTE and E5."}'
diff --git a/Translation/docker/docker_build_compose.yaml b/Translation/docker/docker_build_compose.yaml
index 5b2dea9ac3..05da618777 100644
--- a/Translation/docker/docker_build_compose.yaml
+++ b/Translation/docker/docker_build_compose.yaml
@@ -16,3 +16,9 @@ services:
       dockerfile: ./docker/Dockerfile
     extends: translation
     image: ${REGISTRY:-opea}/translation-ui:${TAG:-latest}
+  llm-tgi:
+    build:
+      context: GenAIComps
+      dockerfile: comps/llms/text-generation/tgi/Dockerfile
+    extends: translation
+    image: ${REGISTRY:-opea}/llm-tgi:${TAG:-latest}
diff --git a/Translation/tests/test_translation_on_gaudi.sh b/Translation/tests/test_translation_on_gaudi.sh
index 47aa96a259..8262c54f08 100644
--- a/Translation/tests/test_translation_on_gaudi.sh
+++ b/Translation/tests/test_translation_on_gaudi.sh
@@ -2,7 +2,7 @@
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-set -x
+set -xe
 IMAGE_REPO=${IMAGE_REPO:-"opea"}
 IMAGE_TAG=${IMAGE_TAG:-"latest"}
 echo "REGISTRY=IMAGE_REPO=${IMAGE_REPO}"
@@ -42,12 +42,12 @@ function start_services() {
     docker compose up -d
 
     n=0
-    until [[ "$n" -ge 500 ]]; do
+    until [[ "$n" -ge 100 ]]; do
         docker logs tgi-gaudi-server > ${LOG_PATH}/tgi_service_start.log
         if grep -q Connected ${LOG_PATH}/tgi_service_start.log; then
             break
         fi
-        sleep 1s
+        sleep 5s
         n=$((n+1))
     done
 }
diff --git a/Translation/tests/test_translation_on_xeon.sh b/Translation/tests/test_translation_on_xeon.sh
index 2b67833d66..e0e61523cf 100644
--- a/Translation/tests/test_translation_on_xeon.sh
+++ b/Translation/tests/test_translation_on_xeon.sh
@@ -2,7 +2,7 @@
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-set -x
+set -xe
 IMAGE_REPO=${IMAGE_REPO:-"opea"}
 IMAGE_TAG=${IMAGE_TAG:-"latest"}
 echo "REGISTRY=IMAGE_REPO=${IMAGE_REPO}"

From 99d93bf36943df665092ae10d9a3d76598cd3b91 Mon Sep 17 00:00:00 2001
From: "chen, suyue" <suyue.chen@intel.com>
Date: Fri, 16 Aug 2024 00:22:40 +0800
Subject: [PATCH 15/57] Add BoM collect workflow and image publish workflow
 (#600)

Signed-off-by: chensuyue <suyue.chen@intel.com>
Signed-off-by: dmsuehir <dina.s.jones@intel.com>
---
 .github/workflows/_example-workflow.yml       | 41 ++--------
 .github/workflows/manual-bom-scan.yml         | 74 +++++++++++++++++++
 .github/workflows/manual-docker-publish.yml   | 68 +++++++++++++++++
 ...rkflow.yml => manual-example-workflow.yml} | 16 +---
 4 files changed, 151 insertions(+), 48 deletions(-)
 create mode 100644 .github/workflows/manual-bom-scan.yml
 create mode 100644 .github/workflows/manual-docker-publish.yml
 rename .github/workflows/{manual-cd-workflow.yml => manual-example-workflow.yml} (82%)

diff --git a/.github/workflows/_example-workflow.yml b/.github/workflows/_example-workflow.yml
index c293a8b1ef..7e86ed288b 100644
--- a/.github/workflows/_example-workflow.yml
+++ b/.github/workflows/_example-workflow.yml
@@ -32,14 +32,6 @@ on:
         default: false
         required: false
         type: boolean
-      publish:
-        default: false
-        required: false
-        type: boolean
-      publish_tags:
-        default: "latest"
-        required: false
-        type: string
       GenAIComps_branch:
         default: "main"
         required: false
@@ -83,7 +75,7 @@ jobs:
 ####################################################################################################
 # Trivy Scan
 ####################################################################################################
-  image-list:
+  get-image-list:
     needs: [build-images]
     if: ${{ fromJSON(inputs.scan) && inputs.node == 'gaudi' }}
     runs-on: ubuntu-latest
@@ -97,16 +89,16 @@ jobs:
         id: scan-matrix
         run: |
           pip install yq
-          compose_path=${{ github.workspace }}/.github/workflows/docker/compose/${{ inputs.example }}-compose.yaml
+          compose_path=${{ github.workspace }}/${{ inputs.example }}/docker/docker_build_compose.yaml
           echo "matrix=$(cat ${compose_path} | yq -r '.[]' | jq 'keys' | jq -c '.')" >> $GITHUB_OUTPUT
 
   scan-images:
-    needs: [image-list, build-images]
+    needs: [get-image-list, build-images]
     if: ${{ fromJSON(inputs.scan) && inputs.node == 'gaudi'}}
     runs-on: "docker-build-${{ inputs.node }}"
     strategy:
       matrix:
-        image: ${{ fromJSON(needs.image-list.outputs.matrix) }}
+        image: ${{ fromJSON(needs.get-image-list.outputs.matrix) }}
       fail-fast: false
     steps:
       - name: Pull Image
@@ -118,7 +110,7 @@ jobs:
         uses: opea-project/validation/actions/trivy-scan@main
         with:
           image-ref: ${{ env.OPEA_IMAGE_REPO }}opea/${{ matrix.image }}:${{ inputs.tag }}
-          output: ${{ inputs.example }}-${{ matrix.image }}-scan.txt
+          output: ${{ matrix.image }}-scan.txt
 
       - name: Cleanup
         if: always()
@@ -126,8 +118,8 @@ jobs:
 
       - uses: actions/upload-artifact@v4.3.4
         with:
-          name: ${{ inputs.example }}-${{ matrix.image }}-scan
-          path: ${{ inputs.example }}-${{ matrix.image }}-scan.txt
+          name: ${{ matrix.image }}-scan
+          path: ${{ matrix.image }}-scan.txt
           overwrite: true
 
 ####################################################################################################
@@ -156,22 +148,3 @@ jobs:
       hardware: ${{ inputs.node }}
       tag: ${{ inputs.tag }}
     secrets: inherit
-
-
-####################################################################################################
-# Publish
-####################################################################################################
-  publish:
-    needs: [image-list, build-images, scan-images, test-example-compose]
-    if: ${{ fromJSON(inputs.publish) && inputs.node == 'gaudi' }}
-    strategy:
-      matrix:
-        image: ${{ fromJSON(needs.image-list.outputs.matrix) }}
-    runs-on: "docker-build-gaudi"
-    steps:
-      - name: Image Publish
-        uses: opea-project/validation/actions/image-publish@main
-        with:
-          local_image_ref: ${OPEA_IMAGE_REPO}opea/${{ matrix.image }}:${{ inputs.tag }}
-          image_name: opea/${{ matrix.image }}
-          publish_tags: ${{ inputs.publish_tags }}
diff --git a/.github/workflows/manual-bom-scan.yml b/.github/workflows/manual-bom-scan.yml
new file mode 100644
index 0000000000..4be4600f48
--- /dev/null
+++ b/.github/workflows/manual-bom-scan.yml
@@ -0,0 +1,74 @@
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
+
+name: Examples docker images BoM scan
+on:
+  workflow_dispatch:
+    inputs:
+      node:
+        default: "gaudi"
+        description: "Hardware to run test"
+        required: true
+        type: string
+      examples:
+        default: "ChatQnA"
+        description: 'List of examples to test [AudioQnA,ChatQnA,CodeGen,CodeTrans,DocSum,FaqGen,SearchQnA,Translation]'
+        required: true
+        type: string
+      tag:
+        default: "latest"
+        description: "Tag to apply to images"
+        required: true
+        type: string
+
+permissions: read-all
+jobs:
+  get-image-list:
+    runs-on: ubuntu-latest
+    outputs:
+      matrix: ${{ steps.scan-matrix.outputs.matrix }}
+    steps:
+      - name: Checkout out Repo
+        uses: actions/checkout@v4
+
+      - name: Set Matrix
+        id: scan-matrix
+        run: |
+          pip install yq
+          examples=($(echo ${{ inputs.examples }} | tr ',' ' '))
+          image_list=[]
+          for example in ${examples[@]}
+          do
+              images=$(cat ${{ github.workspace }}/${example}/docker/docker_build_compose.yaml | yq -r '.[]' | jq 'keys' | jq -c '.')
+              image_list=$(echo ${image_list} | jq -s '.[0] + .[1] | unique' - <(echo ${images}))
+          done
+          echo "matrix=$(echo ${image_list} | jq -c '.')" >> $GITHUB_OUTPUT
+
+  scan-license:
+    needs: get-image-list
+    runs-on: "docker-build-${{ inputs.node }}"
+    strategy:
+      matrix:
+        image: ${{ fromJson(needs.get-image-list.outputs.matrix) }}
+      fail-fast: false
+    steps:
+      - name: Pull Image
+        run: |
+          docker pull ${OPEA_IMAGE_REPO}opea/${{ matrix.image }}:${{ inputs.tag }}
+          echo "OPEA_IMAGE_REPO=${OPEA_IMAGE_REPO}" >> $GITHUB_ENV
+
+      - name: Scan Container
+        uses: opea-project/validation/actions/license-scan@main # TODO
+        with:
+          image-ref: ${{ env.OPEA_IMAGE_REPO }}opea/${{ matrix.image }}:${{ inputs.tag }}
+          output: ${{ matrix.image }}-scan.txt
+
+      - name: Cleanup
+        if: always()
+        run: docker rmi -f ${OPEA_IMAGE_REPO}opea/${{ matrix.image }}:${{ inputs.tag }}
+
+      - uses: actions/upload-artifact@v4.3.4
+        with:
+          name: ${{ matrix.image }}-scan
+          path: ${{ matrix.image }}-scan.txt
+          overwrite: true
diff --git a/.github/workflows/manual-docker-publish.yml b/.github/workflows/manual-docker-publish.yml
new file mode 100644
index 0000000000..44315a6df4
--- /dev/null
+++ b/.github/workflows/manual-docker-publish.yml
@@ -0,0 +1,68 @@
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
+
+name: Examples CD workflow on manual event
+on:
+  workflow_dispatch:
+    inputs:
+      nodes:
+        default: "gaudi"
+        description: "Hardware to run test"
+        required: true
+        type: string
+      examples:
+        default: "ChatQnA"
+        description: 'List of examples to test [AudioQnA,ChatQnA,CodeGen,CodeTrans,DocSum,FaqGen,SearchQnA,Translation]'
+        required: true
+        type: string
+      tag:
+        default: "latest"
+        description: "Tag to apply to images"
+        required: true
+        type: string
+      publish:
+        default: false
+        description: 'Publish images to docker hub'
+        required: false
+        type: boolean
+      publish_tags:
+        default: "latest,v1.0"
+        description: 'Tag list apply to publish images'
+        required: false
+        type: string
+
+permissions: read-all
+jobs:
+  get-image-list:
+    runs-on: ${{ inputs.node }}
+    outputs:
+      matrix: ${{ steps.scan-matrix.outputs.matrix }}
+    steps:
+      - name: Checkout out Repo
+        uses: actions/checkout@v4
+
+      - name: Set Matrix
+        id: scan-matrix
+        run: |
+          examples=($(echo ${{ inputs.examples }} | tr ',' ' '))
+          image_list=[]
+          for example in ${examples[@]}
+          do
+              images=$(cat ${{ github.workspace }}/${example}/docker/docker_build_compose.yaml | yq -r '.[]' | jq 'keys' | jq -c '.')
+              image_list=$(echo ${image_list} | jq -s '.[0] + .[1] | unique' - <(echo ${images}))
+          done
+          echo "matrix=$(echo ${image_list} | jq -c '.')" >> $GITHUB_OUTPUT
+
+  publish:
+    needs: [get-image-list]
+    strategy:
+      matrix:
+        image: ${{ fromJSON(needs.get-image-list.outputs.matrix) }}
+    runs-on: "docker-build-${{ inputs.node }}"
+    steps:
+      - name: Image Publish
+        uses: opea-project/validation/actions/image-publish@main
+        with:
+          local_image_ref: ${OPEA_IMAGE_REPO}opea/${{ matrix.image }}:${{ inputs.tag }}
+          image_name: opea/${{ matrix.image }}
+          publish_tags: ${{ inputs.publish_tags }}
diff --git a/.github/workflows/manual-cd-workflow.yml b/.github/workflows/manual-example-workflow.yml
similarity index 82%
rename from .github/workflows/manual-cd-workflow.yml
rename to .github/workflows/manual-example-workflow.yml
index 7159ba6321..561183685c 100644
--- a/.github/workflows/manual-cd-workflow.yml
+++ b/.github/workflows/manual-example-workflow.yml
@@ -40,16 +40,6 @@ on:
         description: 'Test examples with k8s'
         required: false
         type: boolean
-      publish:
-        default: false
-        description: 'Publish images to docker hub'
-        required: false
-        type: boolean
-      publish_tags:
-        default: "latest,v1.0"
-        description: 'Tag list apply to publish images'
-        required: false
-        type: string
       GenAIComps_branch:
         default: "main"
         description: 'GenAIComps branch for image build'
@@ -67,10 +57,10 @@ jobs:
     - name: Create Matrix
       id: get-matrix
       run: |
-        examples=($(echo ${{ github.event.inputs.examples }} | tr ',' ' '))
+        examples=($(echo ${{ inputs.examples }} | tr ',' ' '))
         examples_json=$(printf '%s\n' "${examples[@]}" | sort -u | jq -R '.' | jq -sc '.')
         echo "examples=$examples_json" >> $GITHUB_OUTPUT
-        nodes=($(echo ${{ github.event.inputs.nodes }} | tr ',' ' '))
+        nodes=($(echo ${{ inputs.nodes }} | tr ',' ' '))
         nodes_json=$(printf '%s\n' "${nodes[@]}" | sort -u | jq -R '.' | jq -sc '.')
         echo "nodes=$nodes_json" >> $GITHUB_OUTPUT
 
@@ -90,7 +80,5 @@ jobs:
       scan: ${{ fromJSON(inputs.scan) }}
       test_compose: ${{ fromJSON(inputs.test_compose) }}
       test_k8s: ${{ fromJSON(inputs.test_k8s) }}
-      publish: ${{ fromJSON(inputs.publish) }}
-      publish_tags: ${{ inputs.publish_tags }}
       GenAIComps_branch: ${{ inputs.GenAIComps_branch }}
     secrets: inherit

From a2c8014ec6a0a5d1cc04ccd4a5bc4f8a9b7bef45 Mon Sep 17 00:00:00 2001
From: "chen, suyue" <suyue.chen@intel.com>
Date: Fri, 16 Aug 2024 00:31:01 +0800
Subject: [PATCH 16/57] set action back to pull_request_target (#602)

Signed-off-by: chensuyue <suyue.chen@intel.com>
Signed-off-by: dmsuehir <dina.s.jones@intel.com>
---
 .github/workflows/pr-docker-compose-e2e.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/pr-docker-compose-e2e.yml b/.github/workflows/pr-docker-compose-e2e.yml
index e02c60fb83..66d9417e9c 100644
--- a/.github/workflows/pr-docker-compose-e2e.yml
+++ b/.github/workflows/pr-docker-compose-e2e.yml
@@ -4,7 +4,7 @@
 name: E2E test with docker compose
 
 on:
-  pull_request:
+  pull_request_target:
     branches: [main]
     types: [opened, reopened, ready_for_review, synchronize] # added `ready_for_review` since draft is skipped
     paths:

From 56c54607c076057a24dce842b42ebe5d5b932425 Mon Sep 17 00:00:00 2001
From: "chen, suyue" <suyue.chen@intel.com>
Date: Thu, 15 Aug 2024 22:39:21 +0800
Subject: [PATCH 17/57] Enhance CI/CD infrastructure (#593)

Signed-off-by: chensuyue <suyue.chen@intel.com>
Signed-off-by: Sun, Xuehao <xuehao.sun@intel.com>
Signed-off-by: dmsuehir <dina.s.jones@intel.com>
---
 .github/workflows/_example-workflow.yml       | 4 ++++
 .github/workflows/manual-example-workflow.yml | 5 +++++
 .github/workflows/pr-docker-compose-e2e.yml   | 2 +-
 3 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/_example-workflow.yml b/.github/workflows/_example-workflow.yml
index 7e86ed288b..d5da50c5fc 100644
--- a/.github/workflows/_example-workflow.yml
+++ b/.github/workflows/_example-workflow.yml
@@ -36,6 +36,10 @@ on:
         default: "main"
         required: false
         type: string
+      GenAIComps_branch:
+        default: "main"
+        required: false
+        type: string
 jobs:
 ####################################################################################################
 # Image Build
diff --git a/.github/workflows/manual-example-workflow.yml b/.github/workflows/manual-example-workflow.yml
index 561183685c..606d444d29 100644
--- a/.github/workflows/manual-example-workflow.yml
+++ b/.github/workflows/manual-example-workflow.yml
@@ -45,6 +45,11 @@ on:
         description: 'GenAIComps branch for image build'
         required: false
         type: string
+      GenAIComps_branch:
+        default: "main"
+        description: 'GenAIComps branch for image build'
+        required: false
+        type: string
 
 permissions: read-all
 jobs:
diff --git a/.github/workflows/pr-docker-compose-e2e.yml b/.github/workflows/pr-docker-compose-e2e.yml
index 66d9417e9c..e02c60fb83 100644
--- a/.github/workflows/pr-docker-compose-e2e.yml
+++ b/.github/workflows/pr-docker-compose-e2e.yml
@@ -4,7 +4,7 @@
 name: E2E test with docker compose
 
 on:
-  pull_request_target:
+  pull_request:
     branches: [main]
     types: [opened, reopened, ready_for_review, synchronize] # added `ready_for_review` since draft is skipped
     paths:

From 712963edafca6078d040390fd3d00489848a16a9 Mon Sep 17 00:00:00 2001
From: "chen, suyue" <suyue.chen@intel.com>
Date: Fri, 16 Aug 2024 00:31:01 +0800
Subject: [PATCH 18/57] set action back to pull_request_target (#602)

Signed-off-by: chensuyue <suyue.chen@intel.com>
Signed-off-by: dmsuehir <dina.s.jones@intel.com>
---
 .github/workflows/pr-docker-compose-e2e.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/pr-docker-compose-e2e.yml b/.github/workflows/pr-docker-compose-e2e.yml
index e02c60fb83..66d9417e9c 100644
--- a/.github/workflows/pr-docker-compose-e2e.yml
+++ b/.github/workflows/pr-docker-compose-e2e.yml
@@ -4,7 +4,7 @@
 name: E2E test with docker compose
 
 on:
-  pull_request:
+  pull_request_target:
     branches: [main]
     types: [opened, reopened, ready_for_review, synchronize] # added `ready_for_review` since draft is skipped
     paths:

From eef07d3f72d859bfe22fb49f0c5c36bc3fc03d18 Mon Sep 17 00:00:00 2001
From: "chen, suyue" <suyue.chen@intel.com>
Date: Fri, 16 Aug 2024 09:26:54 +0800
Subject: [PATCH 19/57] Fix CD workflow typos (#605)

Signed-off-by: chensuyue <suyue.chen@intel.com>
Signed-off-by: dmsuehir <dina.s.jones@intel.com>
---
 .github/workflows/_example-workflow.yml     | 6 +++---
 .github/workflows/manual-bom-scan.yml       | 2 +-
 .github/workflows/manual-docker-publish.yml | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/.github/workflows/_example-workflow.yml b/.github/workflows/_example-workflow.yml
index d5da50c5fc..64fb62f3c3 100644
--- a/.github/workflows/_example-workflow.yml
+++ b/.github/workflows/_example-workflow.yml
@@ -57,15 +57,15 @@ jobs:
       - name: Clone required Repo
         run: |
           cd ${{ github.workspace }}/${{ inputs.example }}/docker
-          build_compose_path=${{ github.workspace }}/${{ inputs.example }}/docker/docker_build_compose.yaml
+          docker_compose_path=${{ github.workspace }}/${{ inputs.example }}/docker/docker_build_compose.yaml
           if [[ $(grep -c "tei-gaudi:" ${docker_compose_path}) != 0 ]]; then
               git clone https://github.com/huggingface/tei-gaudi.git
           fi
           if [[ $(grep -c "vllm:" ${docker_compose_path}) != 0 ]]; then
-              git clone https://github.com/huggingface/tei-gaudi.git
+              git clone https://github.com/vllm-project/vllm.git
           fi
           git clone https://github.com/opea-project/GenAIComps.git
-          cd GenAIComps && checkout ${{ inputs.GenAIComps_branch }} && cd ../
+          cd GenAIComps && git checkout ${{ inputs.GenAIComps_branch }} && cd ../
 
       - name: Build Image
         if: ${{ fromJSON(inputs.build) }}
diff --git a/.github/workflows/manual-bom-scan.yml b/.github/workflows/manual-bom-scan.yml
index 4be4600f48..f65738d1ef 100644
--- a/.github/workflows/manual-bom-scan.yml
+++ b/.github/workflows/manual-bom-scan.yml
@@ -1,7 +1,7 @@
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-name: Examples docker images BoM scan
+name: Examples docker images BoM scan on manual event
 on:
   workflow_dispatch:
     inputs:
diff --git a/.github/workflows/manual-docker-publish.yml b/.github/workflows/manual-docker-publish.yml
index 44315a6df4..19626edaa2 100644
--- a/.github/workflows/manual-docker-publish.yml
+++ b/.github/workflows/manual-docker-publish.yml
@@ -1,7 +1,7 @@
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-name: Examples CD workflow on manual event
+name: Examples publish docker image on manual event
 on:
   workflow_dispatch:
     inputs:

From a978e0facb2d42feab5dbc493c1c7d037688a860 Mon Sep 17 00:00:00 2001
From: Steve Zhang <huailong.zhang@intel.com>
Date: Fri, 16 Aug 2024 14:25:50 +0800
Subject: [PATCH 20/57] Add AudioQnA example via GMC (#597)

* add AudioQnA example via GMC.
Signed-off-by: zhlsunshine <huailong.zhang@intel.com>

* add more information for e2e test scritpts.
Signed-off-by: zhlsunshine <huailong.zhang@intel.com>

* fix bug in e2e test scripts.
Signed-off-by: zhlsunshine <huailong.zhang@intel.com>
Signed-off-by: dmsuehir <dina.s.jones@intel.com>
---
 AudioQnA/kubernetes/README.md           |  74 ++++++++++++++++
 AudioQnA/kubernetes/audioQnA_gaudi.yaml |  58 +++++++++++++
 AudioQnA/kubernetes/audioQnA_xeon.yaml  |  58 +++++++++++++
 AudioQnA/tests/test_gmc_on_gaudi.sh     | 111 ++++++++++++++++++++++++
 AudioQnA/tests/test_gmc_on_xeon.sh      | 111 ++++++++++++++++++++++++
 5 files changed, 412 insertions(+)
 create mode 100644 AudioQnA/kubernetes/README.md
 create mode 100644 AudioQnA/kubernetes/audioQnA_gaudi.yaml
 create mode 100644 AudioQnA/kubernetes/audioQnA_xeon.yaml
 create mode 100755 AudioQnA/tests/test_gmc_on_gaudi.sh
 create mode 100755 AudioQnA/tests/test_gmc_on_xeon.sh

diff --git a/AudioQnA/kubernetes/README.md b/AudioQnA/kubernetes/README.md
new file mode 100644
index 0000000000..569ea9a7ad
--- /dev/null
+++ b/AudioQnA/kubernetes/README.md
@@ -0,0 +1,74 @@
+# Deploy AudioQnA in Kubernetes Cluster on Xeon and Gaudi
+
+This document outlines the deployment process for a AudioQnA application utilizing the [GenAIComps](https://github.com/opea-project/GenAIComps.git) microservice pipeline components on Intel Xeon server and Gaudi machines.
+
+The AudioQnA Service leverages a Kubernetes operator called genai-microservices-connector(GMC). GMC supports connecting microservices to create pipelines based on the specification in the pipeline yaml file in addition to allowing the user to dynamically control which model is used in a service such as an LLM or embedder. The underlying pipeline language also supports using external services that may be running in public or private cloud elsewhere.
+
+Install GMC  in your Kubernetes cluster, if you have not already done so, by following the steps in Section "Getting Started" at [GMC Install](https://github.com/opea-project/GenAIInfra/tree/main/microservices-connector). Soon as we publish images to Docker Hub, at which point no builds will be required, simplifying install.
+
+
+The AudioQnA application is defined as a Custom Resource (CR) file that the above GMC operator acts  upon. It first checks if the microservices listed in the CR yaml file are running, if not starts them and then proceeds to connect them. When the AudioQnA pipeline is ready, the service endpoint details are returned, letting you use the application. Should you use "kubectl get pods" commands you will see all the component microservices, in particular `asr`, `tts`, and `llm`.
+
+
+## Using prebuilt images
+
+The AudioQnA uses the below prebuilt images if you choose a Xeon deployment
+
+- tgi-service: ghcr.io/huggingface/text-generation-inference:1.4
+- llm: opea/llm-tgi:latest
+- asr: opea/asr:latest
+- whisper: opea/whisper:latest
+- tts: opea/tts:latest
+- speecht5: opea/speecht5:latest
+
+
+Should you desire to use the Gaudi accelerator, two alternate images are used for the embedding and llm services.
+For Gaudi:
+
+- tgi-service: ghcr.io/huggingface/tgi-gaudi:1.2.1
+- whisper-gaudi: opea/whisper-gaudi:latest
+- speecht5-gaudi: opea/speecht5-gaudi:latest
+
+> [NOTE]  
+> Please refer to [Xeon README](https://github.com/opea-project/GenAIExamples/blob/main/AudioQnA/docker/xeon/README.md) or [Gaudi README](https://github.com/opea-project/GenAIExamples/blob/main/AudioQnA/docker/gaudi/README.md) to build the OPEA images. These too will be available on Docker Hub soon to simplify use.
+
+## Deploy AudioQnA pipeline
+This involves deploying the AudioQnA custom resource. You can use audioQnA_xeon.yaml or if you have a Gaudi cluster, you could use audioQnA_gaudi.yaml. 
+
+1. Create namespace and deploy application
+   ```sh
+   kubectl create ns audioqa
+   kubectl apply -f $(pwd)/audioQnA_xeon.yaml
+   ```
+
+2. GMC will reconcile the AudioQnA custom resource and get all related components/services ready. Check if the service up.
+
+   ```sh
+   kubectl get service -n audioqa
+   ```
+
+3. Retrieve the application access URL
+
+   ```sh
+   kubectl get gmconnectors.gmc.opea.io -n audioqa
+   NAME      URL                                                    READY   AGE
+   audioqa   http://router-service.audioqa.svc.cluster.local:8080   6/0/6   5m
+   ```
+
+4. Deploy a client pod to test the application
+
+   ```sh
+   kubectl create deployment client-test -n audioqa --image=python:3.8.13 -- sleep infinity
+   ```
+
+5. Access the application using the above URL from the client pod
+
+   ```sh
+   export CLIENT_POD=$(kubectl get pod -n audioqa -l app=client-test -o jsonpath={.items..metadata.name})
+   export accessUrl=$(kubectl get gmc -n audioqa -o jsonpath="{.items[?(@.metadata.name=='audioqa')].status.accessUrl}")
+   kubectl exec "$CLIENT_POD" -n audioqa -- curl $accessUrl  -X POST  -d '{"byte_str": "UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA", "parameters":{"max_new_tokens":64, "do_sample": true, "streaming":false}}' -H 'Content-Type: application/json'
+   ```
+
+> [NOTE]
+
+You can remove your AudioQnA pipeline by executing standard Kubernetes kubectl commands to remove a custom resource. Verify it was removed by executing kubectl get pods in the audioqa namespace.
diff --git a/AudioQnA/kubernetes/audioQnA_gaudi.yaml b/AudioQnA/kubernetes/audioQnA_gaudi.yaml
new file mode 100644
index 0000000000..0fb6d2f97f
--- /dev/null
+++ b/AudioQnA/kubernetes/audioQnA_gaudi.yaml
@@ -0,0 +1,58 @@
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
+
+apiVersion: gmc.opea.io/v1alpha3
+kind: GMConnector
+metadata:
+  labels:
+    app.kubernetes.io/name: gmconnector
+    app.kubernetes.io/managed-by: kustomize
+    gmc/platform: gaudi
+  name: audioqa
+  namespace: audioqa
+spec:
+  routerConfig:
+    name: router
+    serviceName: router-service
+  nodes:
+    root:
+      routerType: Sequence
+      steps:
+      - name: Asr
+        internalService:
+          serviceName: asr-svc
+          config:
+            endpoint: /v1/audio/transcriptions
+            ASR_ENDPOINT: whisper-gaudi-svc
+      - name: WhisperGaudi
+        internalService:
+          serviceName: whisper-gaudi-svc
+          config:
+            endpoint: /v1/asr
+          isDownstreamService: true
+      - name: Llm
+        data: $response
+        internalService:
+          serviceName: llm-svc
+          config:
+            endpoint: /v1/chat/completions
+            TGI_LLM_ENDPOINT: tgi-gaudi-svc
+      - name: TgiGaudi
+        internalService:
+          serviceName: tgi-gaudi-svc
+          config:
+            endpoint: /generate
+          isDownstreamService: true
+      - name: Tts
+        data: $response
+        internalService:
+          serviceName: tts-svc
+          config:
+            endpoint: /v1/audio/speech
+            TTS_ENDPOINT: speecht5-gaudi-svc
+      - name: SpeechT5Gaudi
+        internalService:
+          serviceName: speecht5-gaudi-svc
+          config:
+            endpoint: /v1/tts
+          isDownstreamService: true
diff --git a/AudioQnA/kubernetes/audioQnA_xeon.yaml b/AudioQnA/kubernetes/audioQnA_xeon.yaml
new file mode 100644
index 0000000000..881d719083
--- /dev/null
+++ b/AudioQnA/kubernetes/audioQnA_xeon.yaml
@@ -0,0 +1,58 @@
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
+
+apiVersion: gmc.opea.io/v1alpha3
+kind: GMConnector
+metadata:
+  labels:
+    app.kubernetes.io/name: gmconnector
+    app.kubernetes.io/managed-by: kustomize
+    gmc/platform: xeon
+  name: audioqa
+  namespace: audioqa
+spec:
+  routerConfig:
+    name: router
+    serviceName: router-service
+  nodes:
+    root:
+      routerType: Sequence
+      steps:
+      - name: Asr
+        internalService:
+          serviceName: asr-svc
+          config:
+            endpoint: /v1/audio/transcriptions
+            ASR_ENDPOINT: whisper-svc
+      - name: Whisper
+        internalService:
+          serviceName: whisper-svc
+          config:
+            endpoint: /v1/asr
+          isDownstreamService: true
+      - name: Llm
+        data: $response
+        internalService:
+          serviceName: llm-svc
+          config:
+            endpoint: /v1/chat/completions
+            TGI_LLM_ENDPOINT: tgi-svc
+      - name: Tgi
+        internalService:
+          serviceName: tgi-svc
+          config:
+            endpoint: /generate
+          isDownstreamService: true
+      - name: Tts
+        data: $response
+        internalService:
+          serviceName: tts-svc
+          config:
+            endpoint: /v1/audio/speech
+            TTS_ENDPOINT: speecht5-svc
+      - name: SpeechT5
+        internalService:
+          serviceName: speecht5-svc
+          config:
+            endpoint: /v1/tts
+          isDownstreamService: true
diff --git a/AudioQnA/tests/test_gmc_on_gaudi.sh b/AudioQnA/tests/test_gmc_on_gaudi.sh
new file mode 100755
index 0000000000..d9f790289a
--- /dev/null
+++ b/AudioQnA/tests/test_gmc_on_gaudi.sh
@@ -0,0 +1,111 @@
+#!/bin/bash
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
+
+set -xe
+USER_ID=$(whoami)
+LOG_PATH=/home/$(whoami)/logs
+MOUNT_DIR=/home/$USER_ID/.cache/huggingface/hub
+IMAGE_REPO=${IMAGE_REPO:-}
+
+function install_audioqa() {
+    kubectl create ns $APP_NAMESPACE
+    sed -i "s|namespace: audioqa|namespace: $APP_NAMESPACE|g"  ./audioQnA_gaudi.yaml
+    kubectl apply -f ./audioQnA_gaudi.yaml
+
+    # Wait until the router service is ready
+    echo "Waiting for the audioqa router service to be ready..."
+    wait_until_pod_ready "audioqa router" $APP_NAMESPACE "router-service"
+    output=$(kubectl get pods -n $APP_NAMESPACE)
+    echo $output
+}
+
+function validate_audioqa() {
+    # deploy client pod for testing
+    kubectl create deployment client-test -n $APP_NAMESPACE --image=python:3.8.13 -- sleep infinity
+
+    # wait for client pod ready
+    wait_until_pod_ready "client-test" $APP_NAMESPACE "client-test"
+    # giving time to populating data
+    sleep 60
+
+    kubectl get pods -n $APP_NAMESPACE
+    # send request to audioqa
+    export CLIENT_POD=$(kubectl get pod -n $APP_NAMESPACE -l app=client-test -o jsonpath={.items..metadata.name})
+    echo "$CLIENT_POD"
+    accessUrl=$(kubectl get gmc -n $APP_NAMESPACE -o jsonpath="{.items[?(@.metadata.name=='audioqa')].status.accessUrl}")
+    byte_str=$(kubectl exec "$CLIENT_POD" -n $APP_NAMESPACE -- curl $accessUrl -s -X POST  -d '{"byte_str": "UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA", "parameters":{"max_new_tokens":64, "do_sample": true, "streaming":false}}' -H 'Content-Type: application/json' | jq .byte_str)
+    echo "$byte_str" > $LOG_PATH/curl_audioqa.log
+    if [ -z "$byte_str" ]; then
+	echo "audioqa failed, please check the logs in ${LOG_PATH}!"
+        exit 1
+    fi
+    echo "Audioqa response check succeed!"
+}
+
+function wait_until_pod_ready() {
+    echo "Waiting for the $1 to be ready..."
+    max_retries=30
+    retry_count=0
+    while ! is_pod_ready $2 $3; do
+        if [ $retry_count -ge $max_retries ]; then
+            echo "$1 is not ready after waiting for a significant amount of time"
+            get_gmc_controller_logs
+            exit 1
+        fi
+        echo "$1 is not ready yet. Retrying in 10 seconds..."
+        sleep 10
+        output=$(kubectl get pods -n $2)
+        echo $output
+        retry_count=$((retry_count + 1))
+    done
+}
+
+function is_pod_ready() {
+    if [ "$2" == "gmc-controller" ]; then
+      pod_status=$(kubectl get pods -n $1 -o jsonpath='{.items[].status.conditions[?(@.type=="Ready")].status}')
+    else
+      pod_status=$(kubectl get pods -n $1 -l app=$2 -o jsonpath='{.items[].status.conditions[?(@.type=="Ready")].status}')
+    fi
+    if [ "$pod_status" == "True" ]; then
+        return 0
+    else
+        return 1
+    fi
+}
+
+function get_gmc_controller_logs() {
+    # Fetch the name of the pod with the app-name gmc-controller in the specified namespace
+    pod_name=$(kubectl get pods -n $SYSTEM_NAMESPACE -l control-plane=gmc-controller -o jsonpath='{.items[0].metadata.name}')
+
+    # Check if the pod name was found
+    if [ -z "$pod_name" ]; then
+        echo "No pod found with app-name gmc-controller in namespace $SYSTEM_NAMESPACE"
+        return 1
+    fi
+
+    # Get the logs of the found pod
+    echo "Fetching logs for pod $pod_name in namespace $SYSTEM_NAMESPACE..."
+    kubectl logs $pod_name -n $SYSTEM_NAMESPACE
+}
+
+if [ $# -eq 0 ]; then
+    echo "Usage: $0 <function_name>"
+    exit 1
+fi
+
+case "$1" in
+    install_AudioQnA)
+        pushd AudioQnA/kubernetes
+        install_audioqa
+        popd
+        ;;
+    validate_AudioQnA)
+        pushd AudioQnA/kubernetes
+        validate_audioqa
+        popd
+        ;;
+    *)
+        echo "Unknown function: $1"
+        ;;
+esac
diff --git a/AudioQnA/tests/test_gmc_on_xeon.sh b/AudioQnA/tests/test_gmc_on_xeon.sh
new file mode 100755
index 0000000000..5ef645075a
--- /dev/null
+++ b/AudioQnA/tests/test_gmc_on_xeon.sh
@@ -0,0 +1,111 @@
+#!/bin/bash
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
+
+set -xe
+USER_ID=$(whoami)
+LOG_PATH=/home/$(whoami)/logs
+MOUNT_DIR=/home/$USER_ID/.cache/huggingface/hub
+IMAGE_REPO=${IMAGE_REPO:-}
+
+function install_audioqa() {
+    kubectl create ns $APP_NAMESPACE
+    sed -i "s|namespace: audioqa|namespace: $APP_NAMESPACE|g"  ./audioQnA_xeon.yaml
+    kubectl apply -f ./audioQnA_xeon.yaml
+
+    # Wait until the router service is ready
+    echo "Waiting for the audioqa router service to be ready..."
+    wait_until_pod_ready "audioqa router" $APP_NAMESPACE "router-service"
+    output=$(kubectl get pods -n $APP_NAMESPACE)
+    echo $output
+}
+
+function validate_audioqa() {
+    # deploy client pod for testing
+    kubectl create deployment client-test -n $APP_NAMESPACE --image=python:3.8.13 -- sleep infinity
+
+    # wait for client pod ready
+    wait_until_pod_ready "client-test" $APP_NAMESPACE "client-test"
+    # giving time to populating data
+    sleep 60
+
+    kubectl get pods -n $APP_NAMESPACE
+    # send request to audioqa
+    export CLIENT_POD=$(kubectl get pod -n $APP_NAMESPACE -l app=client-test -o jsonpath={.items..metadata.name})
+    echo "$CLIENT_POD"
+    accessUrl=$(kubectl get gmc -n $APP_NAMESPACE -o jsonpath="{.items[?(@.metadata.name=='audioqa')].status.accessUrl}")
+    byte_str=$(kubectl exec "$CLIENT_POD" -n $APP_NAMESPACE -- curl $accessUrl -s -X POST  -d '{"byte_str": "UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA", "parameters":{"max_new_tokens":64, "do_sample": true, "streaming":false}}' -H 'Content-Type: application/json' | jq .byte_str)
+    echo "$byte_str" > $LOG_PATH/curl_audioqa.log
+    if [ -z "$byte_str" ]; then
+        echo "audioqa failed, please check the logs in ${LOG_PATH}!"
+        exit 1
+    fi
+    echo "Audioqa response check succeed!"
+}
+
+function wait_until_pod_ready() {
+    echo "Waiting for the $1 to be ready..."
+    max_retries=30
+    retry_count=0
+    while ! is_pod_ready $2 $3; do
+        if [ $retry_count -ge $max_retries ]; then
+            echo "$1 is not ready after waiting for a significant amount of time"
+            get_gmc_controller_logs
+            exit 1
+        fi
+        echo "$1 is not ready yet. Retrying in 10 seconds..."
+        sleep 10
+        output=$(kubectl get pods -n $2)
+        echo $output
+        retry_count=$((retry_count + 1))
+    done
+}
+
+function is_pod_ready() {
+    if [ "$2" == "gmc-controller" ]; then
+      pod_status=$(kubectl get pods -n $1 -o jsonpath='{.items[].status.conditions[?(@.type=="Ready")].status}')
+    else
+      pod_status=$(kubectl get pods -n $1 -l app=$2 -o jsonpath='{.items[].status.conditions[?(@.type=="Ready")].status}')
+    fi
+    if [ "$pod_status" == "True" ]; then
+        return 0
+    else
+        return 1
+    fi
+}
+
+function get_gmc_controller_logs() {
+    # Fetch the name of the pod with the app-name gmc-controller in the specified namespace
+    pod_name=$(kubectl get pods -n $SYSTEM_NAMESPACE -l control-plane=gmc-controller -o jsonpath='{.items[0].metadata.name}')
+
+    # Check if the pod name was found
+    if [ -z "$pod_name" ]; then
+        echo "No pod found with app-name gmc-controller in namespace $SYSTEM_NAMESPACE"
+        return 1
+    fi
+
+    # Get the logs of the found pod
+    echo "Fetching logs for pod $pod_name in namespace $SYSTEM_NAMESPACE..."
+    kubectl logs $pod_name -n $SYSTEM_NAMESPACE
+}
+
+if [ $# -eq 0 ]; then
+    echo "Usage: $0 <function_name>"
+    exit 1
+fi
+
+case "$1" in
+    install_AudioQnA)
+        pushd AudioQnA/kubernetes
+        install_audioqa
+        popd
+        ;;
+    validate_AudioQnA)
+        pushd AudioQnA/kubernetes
+        validate_audioqa
+        popd
+        ;;
+    *)
+        echo "Unknown function: $1"
+        ;;
+esac

From 899cf1fa3bed50c431cdf6778665ec03f9256279 Mon Sep 17 00:00:00 2001
From: "chen, suyue" <suyue.chen@intel.com>
Date: Fri, 16 Aug 2024 17:29:59 +0800
Subject: [PATCH 21/57] remove continue-on-error: true to stop the test when
 image build failed (#608)

Signed-off-by: chensuyue <suyue.chen@intel.com>
Signed-off-by: dmsuehir <dina.s.jones@intel.com>
---
 .github/workflows/_example-workflow.yml       | 5 ++---
 .github/workflows/manual-example-workflow.yml | 6 +++---
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/.github/workflows/_example-workflow.yml b/.github/workflows/_example-workflow.yml
index 64fb62f3c3..51aff5fcde 100644
--- a/.github/workflows/_example-workflow.yml
+++ b/.github/workflows/_example-workflow.yml
@@ -32,7 +32,7 @@ on:
         default: false
         required: false
         type: boolean
-      GenAIComps_branch:
+      opea_branch:
         default: "main"
         required: false
         type: string
@@ -46,7 +46,6 @@ jobs:
 ####################################################################################################
   build-images:
     runs-on: "docker-build-${{ inputs.node }}"
-    continue-on-error: true
     steps:
       - name: Clean Up Working Directory
         run: sudo rm -rf ${{github.workspace}}/*
@@ -65,7 +64,7 @@ jobs:
               git clone https://github.com/vllm-project/vllm.git
           fi
           git clone https://github.com/opea-project/GenAIComps.git
-          cd GenAIComps && git checkout ${{ inputs.GenAIComps_branch }} && cd ../
+          cd GenAIComps && git checkout ${{ inputs.opea_branch }} && cd ../
 
       - name: Build Image
         if: ${{ fromJSON(inputs.build) }}
diff --git a/.github/workflows/manual-example-workflow.yml b/.github/workflows/manual-example-workflow.yml
index 606d444d29..95230bf90f 100644
--- a/.github/workflows/manual-example-workflow.yml
+++ b/.github/workflows/manual-example-workflow.yml
@@ -40,9 +40,9 @@ on:
         description: 'Test examples with k8s'
         required: false
         type: boolean
-      GenAIComps_branch:
+      opea_branch:
         default: "main"
-        description: 'GenAIComps branch for image build'
+        description: 'OPEA branch for image build'
         required: false
         type: string
       GenAIComps_branch:
@@ -85,5 +85,5 @@ jobs:
       scan: ${{ fromJSON(inputs.scan) }}
       test_compose: ${{ fromJSON(inputs.test_compose) }}
       test_k8s: ${{ fromJSON(inputs.test_k8s) }}
-      GenAIComps_branch: ${{ inputs.GenAIComps_branch }}
+      opea_branch: ${{ inputs.opea_branch }}
     secrets: inherit

From e46f6ac9f0b8eb4133025e35d022e09aa249e44a Mon Sep 17 00:00:00 2001
From: Letong Han <106566639+letonghan@users.noreply.github.com>
Date: Fri, 16 Aug 2024 18:15:33 +0800
Subject: [PATCH 22/57] update port for dataprep in set_env.sh (#606)

Signed-off-by: letonghan <letong.han@intel.com>
Signed-off-by: dmsuehir <dina.s.jones@intel.com>
---
 ChatQnA/docker/gaudi/set_env.sh | 4 ++--
 ChatQnA/docker/xeon/set_env.sh  | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/ChatQnA/docker/gaudi/set_env.sh b/ChatQnA/docker/gaudi/set_env.sh
index e024bd8a64..3b3d433367 100644
--- a/ChatQnA/docker/gaudi/set_env.sh
+++ b/ChatQnA/docker/gaudi/set_env.sh
@@ -19,5 +19,5 @@ export RERANK_SERVICE_HOST_IP=${host_ip}
 export LLM_SERVICE_HOST_IP=${host_ip}
 export BACKEND_SERVICE_ENDPOINT="http://${host_ip}:8888/v1/chatqna"
 export DATAPREP_SERVICE_ENDPOINT="http://${host_ip}:6007/v1/dataprep"
-export DATAPREP_GET_FILE_ENDPOINT="http://${host_ip}:6008/v1/dataprep/get_file"
-export DATAPREP_DELETE_FILE_ENDPOINT="http://${host_ip}:6009/v1/dataprep/delete_file"
+export DATAPREP_GET_FILE_ENDPOINT="http://${host_ip}:6007/v1/dataprep/get_file"
+export DATAPREP_DELETE_FILE_ENDPOINT="http://${host_ip}:6007/v1/dataprep/delete_file"
diff --git a/ChatQnA/docker/xeon/set_env.sh b/ChatQnA/docker/xeon/set_env.sh
index 888b8f3070..be8f4130f2 100644
--- a/ChatQnA/docker/xeon/set_env.sh
+++ b/ChatQnA/docker/xeon/set_env.sh
@@ -19,5 +19,5 @@ export RERANK_SERVICE_HOST_IP=${host_ip}
 export LLM_SERVICE_HOST_IP=${host_ip}
 export BACKEND_SERVICE_ENDPOINT="http://${host_ip}:8888/v1/chatqna"
 export DATAPREP_SERVICE_ENDPOINT="http://${host_ip}:6007/v1/dataprep"
-export DATAPREP_GET_FILE_ENDPOINT="http://${host_ip}:6008/v1/dataprep/get_file"
-export DATAPREP_DELETE_FILE_ENDPOINT="http://${host_ip}:6009/v1/dataprep/delete_file"
+export DATAPREP_GET_FILE_ENDPOINT="http://${host_ip}:6007/v1/dataprep/get_file"
+export DATAPREP_DELETE_FILE_ENDPOINT="http://${host_ip}:6007/v1/dataprep/delete_file"

From 55e0be338881d78b82d81836506bd63a4f9acac1 Mon Sep 17 00:00:00 2001
From: "Sun, Xuehao" <xuehao.sun@intel.com>
Date: Fri, 16 Aug 2024 20:18:44 +0800
Subject: [PATCH 23/57] Freeze base images (#607)

* Update Dockerfile to use LANGCHAIN_VERSION argument

Signed-off-by: Sun, Xuehao <xuehao.sun@intel.com>

* Revert "Update Dockerfile to use LANGCHAIN_VERSION argument"

This reverts commit 1bff239d388e06913bc82d1ee667cac5e17490ff.

* chore: Add manual freeze images workflow

Signed-off-by: Sun, Xuehao <xuehao.sun@intel.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* split jobs

Signed-off-by: Sun, Xuehao <xuehao.sun@intel.com>

---------

Signed-off-by: Sun, Xuehao <xuehao.sun@intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Signed-off-by: dmsuehir <dina.s.jones@intel.com>
---
 .github/workflows/manual-freeze-images.yml | 38 +++++++++++++++++++
 .github/workflows/manual-freeze-tag.yml    | 44 ++++++++++++++++++++++
 .github/workflows/scripts/freeze_images.sh | 41 ++++++++++++++++++++
 3 files changed, 123 insertions(+)
 create mode 100644 .github/workflows/manual-freeze-images.yml
 create mode 100644 .github/workflows/manual-freeze-tag.yml
 create mode 100644 .github/workflows/scripts/freeze_images.sh

diff --git a/.github/workflows/manual-freeze-images.yml b/.github/workflows/manual-freeze-images.yml
new file mode 100644
index 0000000000..3d792b1804
--- /dev/null
+++ b/.github/workflows/manual-freeze-images.yml
@@ -0,0 +1,38 @@
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
+
+name: Freeze-images
+
+on:
+  workflow_dispatch:
+
+jobs:
+  freeze-images:
+    runs-on: ubuntu-latest
+
+    steps:
+      - name: Checkout repository
+        uses: actions/checkout@v4
+        with:
+          fetch-depth: 0
+          ref: ${{ github.ref }}
+
+      - uses: actions/setup-python@v5
+        with:
+          python-version: "3.10"
+
+      - name: Set up Git
+        run: |
+          git config --global user.name "NeuralChatBot"
+          git config --global user.email "grp_neural_chat_bot@intel.com"
+          git remote set-url origin https://NeuralChatBot:"${{ secrets.ACTION_TOKEN }}"@github.com/opea-project/GenAIExamples.git
+
+      - name: Run script
+        run: |
+          bash .github/workflows/scripts/freeze_images.sh
+
+      - name: Commit changes
+        run: |
+          git add .
+          git commit -s -m "Freeze images tag"
+          git push
diff --git a/.github/workflows/manual-freeze-tag.yml b/.github/workflows/manual-freeze-tag.yml
new file mode 100644
index 0000000000..cf9507de8b
--- /dev/null
+++ b/.github/workflows/manual-freeze-tag.yml
@@ -0,0 +1,44 @@
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
+
+name: Freeze-tag
+
+on:
+  workflow_dispatch:
+    inputs:
+      tag:
+        default: "latest"
+        description: "Tag to apply to images"
+        required: true
+        type: string
+
+jobs:
+  freeze-tag:
+    runs-on: ubuntu-latest
+
+    steps:
+      - name: Checkout repository
+        uses: actions/checkout@v4
+        with:
+          fetch-depth: 0
+          ref: ${{ github.ref }}
+
+      - uses: actions/setup-python@v5
+        with:
+          python-version: "3.10"
+
+      - name: Set up Git
+        run: |
+          git config --global user.name "NeuralChatBot"
+          git config --global user.email "grp_neural_chat_bot@intel.com"
+          git remote set-url origin https://NeuralChatBot:"${{ secrets.ACTION_TOKEN }}"@github.com/opea-project/GenAIExamples.git
+
+      - name: Run script
+        run: |
+          find . -name "*.md" | xargs sed -i "s|^docker\ compose|TAG=${{ github.event.inputs.tag }}\ docker\ compose|g"
+
+      - name: Commit changes
+        run: |
+          git add .
+          git commit -s -m "Freeze images tag"
+          git push
diff --git a/.github/workflows/scripts/freeze_images.sh b/.github/workflows/scripts/freeze_images.sh
new file mode 100644
index 0000000000..fcc1425888
--- /dev/null
+++ b/.github/workflows/scripts/freeze_images.sh
@@ -0,0 +1,41 @@
+#!/bin/bash
+
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
+
+function get_latest_version() {
+    repo_image=$1
+    versions=$(curl -s "https://registry.hub.docker.com/v2/repositories/$repo_image/tags/" | jq '."results"[]["name"]' | tr -d '"')
+    echo "version list: $versions"
+    latest_version=$(printf "%s\n" "${versions[@]}" | grep -v "latest" | sort -V | tail -n 1)
+    echo "latest version: $latest_version"
+    replace_image_version $repo_image $latest_version
+}
+
+function replace_image_version() {
+    repo_image=$1
+    version=$2
+    find . -name "Dockerfile" | xargs sed -i "s|$repo_image:latest|$repo_image:$version|g"
+}
+
+function check_branch_name() {
+    if [[ "$GITHUB_REF_NAME" == "main" ]]; then
+        echo "$GITHUB_REF_NAME is protected branch"
+        exit 0
+    else
+        echo "branch name is $GITHUB_REF_NAME"
+    fi
+}
+
+function main() {
+    check_branch_name
+    repo_image_list="langchain/langchain"
+    for repo_image in $repo_image_list; do
+        echo "::group::check $repo_image"
+        get_latest_version $repo_image
+        echo "::endgroup::"
+    done
+    freeze_tag_in_markdown
+}
+
+main

From 9b4c803e9cd9c46b8153e5e620b97fb2a176a937 Mon Sep 17 00:00:00 2001
From: Ying Chun Guo <yingchun.guo@intel.com>
Date: Fri, 16 Aug 2024 20:55:01 +0800
Subject: [PATCH 24/57] Add gmc build, scan and deploy workflow (#611)

Signed-off-by: Yingchun Guo <yingchun.guo@intel.com>
Signed-off-by: dmsuehir <dina.s.jones@intel.com>
---
 .github/workflows/_gmc-workflow.yml           | 147 ++++++++++++++++++
 .github/workflows/manual-example-workflow.yml |  17 ++
 2 files changed, 164 insertions(+)
 create mode 100644 .github/workflows/_gmc-workflow.yml

diff --git a/.github/workflows/_gmc-workflow.yml b/.github/workflows/_gmc-workflow.yml
new file mode 100644
index 0000000000..a275b980c2
--- /dev/null
+++ b/.github/workflows/_gmc-workflow.yml
@@ -0,0 +1,147 @@
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
+
+name: Build and deploy GMC system on call and manual
+
+on:
+  workflow_dispatch:
+    inputs:
+      tag:
+        default: "latest"
+        required: true
+        type: string
+        description: "Tag to apply to images"
+      node:
+        default: "xeon"
+        required: true
+        type: string
+        description: "Hardware to run test"
+      deploy:
+        default: true
+        required: true
+        type: boolean
+        description: 'Whether to deploy gmc'
+  workflow_call:
+    inputs:
+      tag:
+        default: "latest"
+        required: true
+        type: string
+        description: "Tag to apply to images"
+      node:
+        default: "xeon"
+        required: true
+        type: string
+        description: "Hardware to run test"
+      deploy:
+        default: true
+        required: true
+        type: boolean
+        description: 'Whether to deploy gmc'
+
+jobs:
+####################################################################################################
+# Image Build and Scan
+####################################################################################################
+  image-build:
+    runs-on: "docker-build-${{ inputs.node }}"
+    steps:
+      - name: Checkout GenAIInfra repository
+        uses: actions/checkout@v4
+        with:
+          repository: opea-project/GenAIInfra
+          ref: ${{ inputs.tag }}
+          path: GenAIInfra
+
+      - name: Set variables
+        id: set_variables
+        run: |
+          echo "DOCKER_REGISTRY=${OPEA_IMAGE_REPO}opea" >> $GITHUB_ENV
+          echo "IMAGE_REPO=${OPEA_IMAGE_REPO}" >> $GITHUB_OUTPUT
+          echo "VERSION=${{ inputs.tag }}" >> $GITHUB_ENV
+          echo "VERSION=${{ inputs.tag }}" >> $GITHUB_OUTPUT
+
+      - name: Build image and push
+        run: |
+          cd ${{github.workspace}}/GenAIInfra/microservices-connector
+          make docker.build
+          make docker.push
+
+      - name: Scan gmcmanager
+        if: ${{ inputs.node == 'gaudi' }}
+        uses: opea-project/validation/actions/trivy-scan@main
+        with:
+          image-ref: ${{ env.DOCKER_REGISTRY }}/gmcmanager:${{ env.VERSION }}
+          output: gmcmanager-scan.txt
+
+      - name: Upload gmcmanager scan result
+        if: ${{ inputs.node == 'gaudi' }}
+        uses: actions/upload-artifact@v4.3.4
+        with:
+          name: gmcmanager-scan
+          path: gmcmanager-scan.txt
+          overwrite: true
+
+      - name: Scan gmcrouter
+        if: ${{ inputs.node == 'gaudi' }}
+        uses: opea-project/validation/actions/trivy-scan@main
+        with:
+          image-ref: ${{ env.DOCKER_REGISTRY }}/gmcrouter:${{ env.VERSION }}
+          output: gmcrouter-scan.txt
+
+      - name: Upload gmcrouter scan result
+        if: ${{ inputs.node == 'gaudi' }}
+        uses: actions/upload-artifact@v4.3.4
+        with:
+          name: gmcrouter-scan
+          path: gmcrouter-scan.txt
+          overwrite: true
+
+      - name: Clean up images
+        if: always()
+        run: |
+          docker rmi ${{ env.DOCKER_REGISTRY }}/gmcrouter:${{ env.VERSION }}
+          docker rmi ${{ env.DOCKER_REGISTRY }}/gmcmanager:${{ env.VERSION }}
+
+      - name: Clean up GenAIInfra source codes
+        if: always()
+        run: |
+           rm -rf ${{github.workspace}}/GenAIInfra
+
+####################################################################################################
+# GMC Install
+####################################################################################################
+  gmc-install:
+    needs: image-build
+    if: ${{ fromJSON(inputs.deploy) }}
+    runs-on: "k8s-${{ inputs.node }}"
+    steps:
+      - name: Checkout GenAIInfra repository
+        uses: actions/checkout@v4
+        with:
+          repository: opea-project/GenAIInfra
+          ref: ${{ inputs.tag }}
+          path: GenAIInfra
+
+      - name: Set variables
+        run: |
+          echo "SYSTEM_NAMESPACE=opea-system" >> $GITHUB_ENV
+          echo "VERSION=${{ inputs.tag }}" >> $GITHUB_ENV
+          echo "SET_VERSION=true" >> $GITHUB_ENV # to change the tag of microservice images
+
+      - name: Cleanup existing GMC
+        run: |
+          cd GenAIInfra
+          .github/workflows/scripts/e2e/gmc_install.sh cleanup_gmc
+          cd ..
+
+      - name: Install GMC
+        run: |
+          cd GenAIInfra
+          .github/workflows/scripts/e2e/gmc_install.sh install_gmc
+          cd ..
+
+      - name: Clean up GenAIInfra source codes
+        if: always()
+        run: |
+           rm -rf ${{github.workspace}}/GenAIInfra
diff --git a/.github/workflows/manual-example-workflow.yml b/.github/workflows/manual-example-workflow.yml
index 95230bf90f..63240f0362 100644
--- a/.github/workflows/manual-example-workflow.yml
+++ b/.github/workflows/manual-example-workflow.yml
@@ -20,6 +20,11 @@ on:
         description: "Tag to apply to images"
         required: true
         type: string
+      deploy_gmc:
+        default: false
+        description: 'Whether to deploy gmc'
+        required: true
+        type: boolean
       build:
         default: true
         description: 'Build test required images for Examples'
@@ -69,6 +74,18 @@ jobs:
         nodes_json=$(printf '%s\n' "${nodes[@]}" | sort -u | jq -R '.' | jq -sc '.')
         echo "nodes=$nodes_json" >> $GITHUB_OUTPUT
 
+  build-deploy-gmc:
+    strategy:
+      matrix:
+        node: ${{ fromJson(needs.get-test-matrix.outputs.nodes) }}
+      fail-fast: false
+    uses: ./.github/workflows/_gmc-workflow.yml
+    with:
+      node: ${{ matrix.node }}
+      tag: ${{ inputs.tag }}
+      deploy: ${{ fromJSON(inputs.deploy_gmc) }}
+    secrets: inherit
+
   run-examples:
     needs: [get-test-matrix]
     strategy:

From e912c7252008a52a6f08b726d1c16449ff27aeac Mon Sep 17 00:00:00 2001
From: Ying Chun Guo <yingchun.guo@intel.com>
Date: Fri, 16 Aug 2024 21:57:28 +0800
Subject: [PATCH 25/57] change microservice tags in CD workflow (#612)

Signed-off-by: Yingchun Guo <yingchun.guo@intel.com>
Signed-off-by: dmsuehir <dina.s.jones@intel.com>
---
 .github/workflows/_example-workflow.yml   | 1 +
 .github/workflows/_manifest-e2e.yml       | 6 ++++++
 ChatQnA/tests/test_manifest_on_gaudi.sh   | 9 +++++++--
 ChatQnA/tests/test_manifest_on_xeon.sh    | 9 +++++++--
 CodeGen/tests/test_manifest_on_gaudi.sh   | 9 +++++++--
 CodeGen/tests/test_manifest_on_xeon.sh    | 9 +++++++--
 CodeTrans/tests/test_manifest_on_gaudi.sh | 9 +++++++--
 CodeTrans/tests/test_manifest_on_xeon.sh  | 9 +++++++--
 DocSum/tests/test_manifest_on_gaudi.sh    | 9 +++++++--
 DocSum/tests/test_manifest_on_xeon.sh     | 9 +++++++--
 10 files changed, 63 insertions(+), 16 deletions(-)

diff --git a/.github/workflows/_example-workflow.yml b/.github/workflows/_example-workflow.yml
index 51aff5fcde..827f668e3c 100644
--- a/.github/workflows/_example-workflow.yml
+++ b/.github/workflows/_example-workflow.yml
@@ -150,4 +150,5 @@ jobs:
       example: ${{ inputs.example }}
       hardware: ${{ inputs.node }}
       tag: ${{ inputs.tag }}
+      context: "CD"
     secrets: inherit
diff --git a/.github/workflows/_manifest-e2e.yml b/.github/workflows/_manifest-e2e.yml
index d8127ae5aa..5ada482e09 100644
--- a/.github/workflows/_manifest-e2e.yml
+++ b/.github/workflows/_manifest-e2e.yml
@@ -20,6 +20,11 @@ on:
         description: "Tag to apply to images, default is latest"
         required: false
         type: string
+      context:
+        default: "CI"
+        description: "CI or CD"
+        required: false
+        type: string
 
 jobs:
   manifest-test:
@@ -55,6 +60,7 @@ jobs:
           echo "continue_test=true" >> $GITHUB_ENV
           echo "should_cleanup=false" >> $GITHUB_ENV
           echo "skip_validate=true" >> $GITHUB_ENV
+          echo "CONTEXT=${{ inputs.context }}" >> $GITHUB_ENV
           echo "NAMESPACE=$NAMESPACE"
 
       - name: Kubectl install
diff --git a/ChatQnA/tests/test_manifest_on_gaudi.sh b/ChatQnA/tests/test_manifest_on_gaudi.sh
index 12a5a6febe..ca7c55794f 100755
--- a/ChatQnA/tests/test_manifest_on_gaudi.sh
+++ b/ChatQnA/tests/test_manifest_on_gaudi.sh
@@ -12,8 +12,13 @@ IMAGE_TAG=${IMAGE_TAG:-latest}
 function init_chatqna() {
     # replace the mount dir "path: /mnt/opea-models" with "path: $CHART_MOUNT"
     find . -name '*.yaml' -type f -exec sed -i "s#path: /mnt/opea-models#path: $MOUNT_DIR#g" {} \;
-    # replace megaservice image tag
-    find . -name '*.yaml' -type f -exec sed -i "s#image: opea/chatqna:latest#image: opea/chatqna:${IMAGE_TAG}#g" {} \;
+    if [ $CONTEXT == "CI" ]; then
+        # replace megaservice image tag
+        find . -name '*.yaml' -type f -exec sed -i "s#image: \"opea/chatqna:latest#image: \"opea/chatqna:${IMAGE_TAG}#g" {} \;
+    else
+        # replace microservice image tag
+        find . -name '*.yaml' -type f -exec sed -i "s#image: \"opea/\(.*\):latest#image: \"opea/\1:${IMAGE_TAG}#g" {} \;
+    fi
     # replace the repository "image: opea/*" with "image: $IMAGE_REPO/opea/"
     find . -name '*.yaml' -type f -exec sed -i "s#image: \"opea/*#image: \"${IMAGE_REPO}opea/#g" {} \;
     # set huggingface token
diff --git a/ChatQnA/tests/test_manifest_on_xeon.sh b/ChatQnA/tests/test_manifest_on_xeon.sh
index b33337b8ad..c755f36e6a 100755
--- a/ChatQnA/tests/test_manifest_on_xeon.sh
+++ b/ChatQnA/tests/test_manifest_on_xeon.sh
@@ -12,8 +12,13 @@ IMAGE_TAG=${IMAGE_TAG:-latest}
 function init_chatqna() {
     # replace the mount dir "path: /mnt/opea-models" with "path: $CHART_MOUNT"
     find . -name '*.yaml' -type f -exec sed -i "s#path: /mnt/opea-models#path: $MOUNT_DIR#g" {} \;
-    # replace megaservice image tag
-    find . -name '*.yaml' -type f -exec sed -i "s#image: opea/chatqna:latest#image: opea/chatqna:${IMAGE_TAG}#g" {} \;
+    if [ $CONTEXT == "CI" ]; then
+        # replace megaservice image tag
+        find . -name '*.yaml' -type f -exec sed -i "s#image: \"opea/chatqna:latest#image: \"opea/chatqna:${IMAGE_TAG}#g" {} \;
+    else
+        # replace microservice image tag
+        find . -name '*.yaml' -type f -exec sed -i "s#image: \"opea/\(.*\):latest#image: \"opea/\1:${IMAGE_TAG}#g" {} \;
+    fi
     # replace the repository "image: opea/*" with "image: $IMAGE_REPO/opea/"
     find . -name '*.yaml' -type f -exec sed -i "s#image: \"opea/*#image: \"${IMAGE_REPO}opea/#g" {} \;
     # set huggingface token
diff --git a/CodeGen/tests/test_manifest_on_gaudi.sh b/CodeGen/tests/test_manifest_on_gaudi.sh
index 84fe53e4e3..c251768b7e 100755
--- a/CodeGen/tests/test_manifest_on_gaudi.sh
+++ b/CodeGen/tests/test_manifest_on_gaudi.sh
@@ -13,8 +13,13 @@ function init_codegen() {
     # executed under path manifest/codegen/xeon
     # replace the mount dir "path: /mnt/model" with "path: $CHART_MOUNT"
     find . -name '*.yaml' -type f -exec sed -i "s#path: /mnt/opea-models#path: $MOUNT_DIR#g" {} \;
-    # replace megaservice image tag
-    find . -name '*.yaml' -type f -exec sed -i "s#image: opea/codegen:latest#image: opea/codegen:${IMAGE_TAG}#g" {} \;
+    if [ $CONTEXT == "CI" ]; then
+        # replace megaservice image tag
+        find . -name '*.yaml' -type f -exec sed -i "s#image: \"opea/codegen:latest#image: \"opea/codegen:${IMAGE_TAG}#g" {} \;
+    else
+        # replace microservice image tag
+        find . -name '*.yaml' -type f -exec sed -i "s#image: \"opea/\(.*\):latest#image: \"opea/\1:${IMAGE_TAG}#g" {} \;
+    fi
     # replace the repository "image: opea/*" with "image: $IMAGE_REPO/opea/"
     find . -name '*.yaml' -type f -exec sed -i "s#image: \"opea/*#image: \"${IMAGE_REPO}opea/#g" {} \;
     # set huggingface token
diff --git a/CodeGen/tests/test_manifest_on_xeon.sh b/CodeGen/tests/test_manifest_on_xeon.sh
index 46724742d9..597b7e0368 100755
--- a/CodeGen/tests/test_manifest_on_xeon.sh
+++ b/CodeGen/tests/test_manifest_on_xeon.sh
@@ -13,8 +13,13 @@ function init_codegen() {
     # executed under path manifest/codegen/xeon
     # replace the mount dir "path: /mnt/model" with "path: $CHART_MOUNT"
     find . -name '*.yaml' -type f -exec sed -i "s#path: /mnt/opea-models#path: $MOUNT_DIR#g" {} \;
-    # replace megaservice image tag
-    find . -name '*.yaml' -type f -exec sed -i "s#image: opea/codegen:latest#image: opea/codegen:${IMAGE_TAG}#g" {} \;
+    if [ $CONTEXT == "CI" ]; then
+        # replace megaservice image tag
+        find . -name '*.yaml' -type f -exec sed -i "s#image: \"opea/codegen:latest#image: \"opea/codegen:${IMAGE_TAG}#g" {} \;
+    else
+        # replace microservice image tag
+        find . -name '*.yaml' -type f -exec sed -i "s#image: \"opea/\(.*\):latest#image: \"opea/\1:${IMAGE_TAG}#g" {} \;
+    fi
     # replace the repository "image: opea/*" with "image: $IMAGE_REPO/opea/"
     find . -name '*.yaml' -type f -exec sed -i "s#image: \"opea/*#image: \"${IMAGE_REPO}opea/#g" {} \;
     # set huggingface token
diff --git a/CodeTrans/tests/test_manifest_on_gaudi.sh b/CodeTrans/tests/test_manifest_on_gaudi.sh
index 2a9f9846b5..e4bbafe770 100755
--- a/CodeTrans/tests/test_manifest_on_gaudi.sh
+++ b/CodeTrans/tests/test_manifest_on_gaudi.sh
@@ -13,8 +13,13 @@ function init_codetrans() {
     # executed under path manifest/codetrans/xeon
     # replace the mount dir "path: /mnt/model" with "path: $CHART_MOUNT"
     find . -name '*.yaml' -type f -exec sed -i "s#path: /mnt/opea-models#path: $MOUNT_DIR#g" {} \;
-    # replace megaservice image tag
-    find . -name '*.yaml' -type f -exec sed -i "s#image: opea/codetrans:latest#image: opea/codetrans:${IMAGE_TAG}#g" {} \;
+    if [ $CONTEXT == "CI" ]; then
+        # replace megaservice image tag
+        find . -name '*.yaml' -type f -exec sed -i "s#image: \"opea/codetrans:latest#image: \"opea/codetrans:${IMAGE_TAG}#g" {} \;
+    else
+        # replace microservice image tag
+        find . -name '*.yaml' -type f -exec sed -i "s#image: \"opea/\(.*\):latest#image: \"opea/\1:${IMAGE_TAG}#g" {} \;
+    fi
     # replace the repository "image: opea/*" with "image: $IMAGE_REPO/opea/"
     find . -name '*.yaml' -type f -exec sed -i "s#image: \"opea/*#image: \"${IMAGE_REPO}opea/#g" {} \;
     # set huggingface token
diff --git a/CodeTrans/tests/test_manifest_on_xeon.sh b/CodeTrans/tests/test_manifest_on_xeon.sh
index a9f40984e0..d21d3bd6a8 100755
--- a/CodeTrans/tests/test_manifest_on_xeon.sh
+++ b/CodeTrans/tests/test_manifest_on_xeon.sh
@@ -13,8 +13,13 @@ function init_codetrans() {
     # executed under path manifest/codetrans/xeon
     # replace the mount dir "path: /mnt/model" with "path: $CHART_MOUNT"
     find . -name '*.yaml' -type f -exec sed -i "s#path: /mnt/opea-models#path: $MOUNT_DIR#g" {} \;
-    # replace megaservice image tag
-    find . -name '*.yaml' -type f -exec sed -i "s#image: opea/codetrans:latest#image: opea/codetrans:${IMAGE_TAG}#g" {} \;
+    if [ $CONTEXT == "CI" ]; then
+        # replace megaservice image tag
+        find . -name '*.yaml' -type f -exec sed -i "s#image: \"opea/codetrans:latest#image: \"opea/codetrans:${IMAGE_TAG}#g" {} \;
+    else
+        # replace microservice image tag
+        find . -name '*.yaml' -type f -exec sed -i "s#image: \"opea/\(.*\):latest#image: \"opea/\1:${IMAGE_TAG}#g" {} \;
+    fi
     # replace the repository "image: opea/*" with "image: $IMAGE_REPO/opea/"
     find . -name '*.yaml' -type f -exec sed -i "s#image: \"opea/*#image: \"${IMAGE_REPO}opea/#g" {} \;
     # set huggingface token
diff --git a/DocSum/tests/test_manifest_on_gaudi.sh b/DocSum/tests/test_manifest_on_gaudi.sh
index 5a8a9c8f2a..f58aa2c0db 100755
--- a/DocSum/tests/test_manifest_on_gaudi.sh
+++ b/DocSum/tests/test_manifest_on_gaudi.sh
@@ -13,8 +13,13 @@ function init_docsum() {
     # executed under path manifest/docsum/xeon
     # replace the mount dir "path: /mnt/model" with "path: $CHART_MOUNT"
     find . -name '*.yaml' -type f -exec sed -i "s#path: /mnt/opea-models#path: $MOUNT_DIR#g" {} \;
-    # replace megaservice image tag
-    find . -name '*.yaml' -type f -exec sed -i "s#image: opea/docsum:latest#image: opea/docsum:${IMAGE_TAG}#g" {} \;
+    if [ $CONTEXT == "CI" ]; then
+        # replace megaservice image tag
+        find . -name '*.yaml' -type f -exec sed -i "s#image: \"opea/docsum:latest#image: \"opea/docsum:${IMAGE_TAG}#g" {} \;
+    else
+        # replace microservice image tag
+        find . -name '*.yaml' -type f -exec sed -i "s#image: \"opea/\(.*\):latest#image: \"opea/\1:${IMAGE_TAG}#g" {} \;
+    fi
     # replace the repository "image: opea/*" with "image: $IMAGE_REPO/opea/"
     find . -name '*.yaml' -type f -exec sed -i "s#image: \"opea/*#image: \"${IMAGE_REPO}opea/#g" {} \;
     # set huggingface token
diff --git a/DocSum/tests/test_manifest_on_xeon.sh b/DocSum/tests/test_manifest_on_xeon.sh
index 4a52661eaf..f9a01d5ddd 100755
--- a/DocSum/tests/test_manifest_on_xeon.sh
+++ b/DocSum/tests/test_manifest_on_xeon.sh
@@ -13,8 +13,13 @@ function init_docsum() {
     # executed under path manifest/docsum/xeon
     # replace the mount dir "path: /mnt/model" with "path: $CHART_MOUNT"
     find . -name '*.yaml' -type f -exec sed -i "s#path: /mnt/opea-models#path: $MOUNT_DIR#g" {} \;
-    # replace megaservice image tag
-    find . -name '*.yaml' -type f -exec sed -i "s#image: opea/docsum:latest#image: opea/docsum:${IMAGE_TAG}#g" {} \;
+    if [ $CONTEXT == "CI" ]; then
+        # replace megaservice image tag
+        find . -name '*.yaml' -type f -exec sed -i "s#image: \"opea/docsum:latest#image: \"opea/docsum:${IMAGE_TAG}#g" {} \;
+    else
+        # replace microservice image tag
+        find . -name '*.yaml' -type f -exec sed -i "s#image: \"opea/\(.*\):latest#image: \"opea/\1:${IMAGE_TAG}#g" {} \;
+    fi
     # replace the repository "image: opea/*" with "image: $IMAGE_REPO/opea/"
     find . -name '*.yaml' -type f -exec sed -i "s#image: \"opea/*#image: \"${IMAGE_REPO}opea/#g" {} \;
     # set huggingface token

From 4ad732976a5be356fb411f9b15d283706a5d358c Mon Sep 17 00:00:00 2001
From: "chen, suyue" <suyue.chen@intel.com>
Date: Tue, 13 Aug 2024 15:20:34 +0800
Subject: [PATCH 26/57] Build up docker images CD workflow (#576)

Signed-off-by: chensuyue <suyue.chen@intel.com>
Signed-off-by: dmsuehir <dina.s.jones@intel.com>
---
 .github/workflows/_example-workflow.yml       | 164 ++++++++++++++++++
 .../docker/compose/AudioQnA-compose.yaml      |   2 +-
 .../docker/compose/ChatQnA-compose.yaml       |   6 +-
 .../docker/compose/CodeGen-compose.yaml       |   6 +-
 .../docker/compose/CodeTrans-compose.yaml     |   4 +-
 .../docker/compose/DocSum-compose.yaml        |   6 +-
 .../docker/compose/FaqGen-compose.yaml        |   6 +-
 .../docker/compose/SearchQnA-compose.yaml     |   4 +-
 .../docker/compose/Translation-compose.yaml   |   4 +-
 .github/workflows/manual-cd-workflow.yml      |  79 +++++++++
 .github/workflows/manual-image-build.yml      |   2 +-
 .github/workflows/push-image-build.yml        |   2 +-
 12 files changed, 264 insertions(+), 21 deletions(-)
 create mode 100644 .github/workflows/_example-workflow.yml
 create mode 100644 .github/workflows/manual-cd-workflow.yml

diff --git a/.github/workflows/_example-workflow.yml b/.github/workflows/_example-workflow.yml
new file mode 100644
index 0000000000..1d2654e665
--- /dev/null
+++ b/.github/workflows/_example-workflow.yml
@@ -0,0 +1,164 @@
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
+
+name: Example jobs
+permissions: read-all
+on:
+  workflow_call:
+    inputs:
+      example:
+        required: true
+        type: string
+      tag:
+        default: "latest"
+        required: false
+        type: string
+      build:
+        default: true
+        required: false
+        type: boolean
+      scan:
+        default: true
+        required: false
+        type: boolean
+      test_compose:
+        default: false
+        required: false
+        type: boolean
+      test_k8s:
+        default: false
+        required: false
+        type: boolean
+      publish:
+        default: false
+        required: false
+        type: boolean
+      publish_tags:
+        default: "latest"
+        required: false
+        type: string
+jobs:
+####################################################################################################
+# Image Build
+####################################################################################################
+  build-images:
+    if: ${{ fromJSON(inputs.build) }}
+    strategy:
+      matrix:
+        node: ["docker-build-xeon", "docker-build-gaudi"]
+    runs-on: ${{ matrix.node }}
+    continue-on-error: true
+    steps:
+      - name: Clean Up Working Directory
+        run: |
+          sudo rm -rf ${{github.workspace}}/*
+
+      - name: Checkout out Repo
+        uses: actions/checkout@v4
+
+      - name: Build Image
+        uses: opea-project/validation/actions/image-build@main
+        with:
+          work_dir: ${{ github.workspace }}/${{ inputs.example }}
+          docker_compose_path: ${{ github.workspace }}/.github/workflows/docker/compose/${{ inputs.example }}-compose.yaml
+          registry: ${OPEA_IMAGE_REPO}opea
+          tag: ${{ inputs.tag }}
+
+####################################################################################################
+# Trivy Scan
+####################################################################################################
+  image-list:
+    needs: [ build-images ]
+    if: ${{ fromJSON(inputs.scan) }}
+    runs-on: ubuntu-latest
+    outputs:
+      matrix: ${{ steps.scan-matrix.outputs.matrix }}
+    steps:
+      - name: Harden Runner
+        uses: step-security/harden-runner@v2.8.1
+        with:
+          egress-policy: audit
+
+      - name: Checkout out Repo
+        uses: actions/checkout@v4
+
+      - name: Set Matrix
+        id: scan-matrix
+        run: |
+          pip install yq
+          compose_path=${{ github.workspace }}/.github/workflows/docker/compose/${{ inputs.example }}-compose.yaml
+          echo "matrix=$(cat ${compose_path} | yq -r '.[]' | jq 'keys' | jq -c '.')" >> $GITHUB_OUTPUT
+
+  scan-images:
+    needs: [image-list]
+    if: ${{ fromJSON(inputs.scan) }}
+    runs-on: "docker-build-gaudi"
+    strategy:
+      matrix:
+        image: ${{ fromJSON(needs.image-list.outputs.matrix) }}
+      fail-fast: false
+    steps:
+      - name: Harden Runner
+        uses: step-security/harden-runner@v2.8.1
+        with:
+          egress-policy: audit
+
+      - name: Pull Image
+        run: docker pull ${OPEA_IMAGE_REPO}opea/${{ matrix.image }}:${{ inputs.tag }}
+
+      - name: Scan Container
+        uses: opea-project/validation/actions/trivy-scan@main
+        with:
+          image-ref: ${OPEA_IMAGE_REPO}opea/${{ matrix.image }}:${{ inputs.tag }}
+          output: ${{ inputs.example }}-${{ matrix.image }}-scan.txt
+
+      - name: Cleanup
+        if: always()
+        run: docker rmi -f ${OPEA_IMAGE_REPO}opea/${{ matrix.image }}:${{ inputs.tag }}
+      - uses: actions/upload-artifact@v4.3.4
+        with:
+          name: ${{ inputs.example }}-scan
+          path: ${{ inputs.example }}-${{ matrix.image }}-scan.txt
+          overwrite: true
+
+####################################################################################################
+# Docker Compose Test
+####################################################################################################
+  test-example-compose:
+    needs: [build-images]
+    if: ${{ fromJSON(inputs.test_compose) }}
+    strategy:
+      matrix:
+        hardware: ["xeon", "gaudi"]
+      fail-fast: false
+    uses: ./.github/workflows/_run-docker-compose.yml
+    with:
+      tag: ${{ inputs.tag }}
+      example: ${{ inputs.example }}
+      hardware: ${{ matrix.hardware }}
+    secrets: inherit
+
+
+####################################################################################################
+# K8S Test
+####################################################################################################
+# TODO
+
+
+####################################################################################################
+# Publish
+####################################################################################################
+  publish:
+    needs: [image-list, build-images, scan-images, test-example-compose]
+    if: ${{ fromJSON(inputs.publish) }}
+    strategy:
+      matrix:
+        image: ${{ fromJSON(needs.image-list.outputs.matrix) }}
+    runs-on: "docker-build-gaudi"
+    steps:
+      - name: Image Publish
+        uses: opea-project/validation/actions/image-publish@main
+        with:
+          local_image_ref: ${OPEA_IMAGE_REPO}opea/${{ matrix.image }}:${{ inputs.tag }}
+          image_name: opea/${{ matrix.image }}
+          publish_tags: ${{ inputs.publish_tags }}
diff --git a/.github/workflows/docker/compose/AudioQnA-compose.yaml b/.github/workflows/docker/compose/AudioQnA-compose.yaml
index d78017717a..9a48e6f1ee 100644
--- a/.github/workflows/docker/compose/AudioQnA-compose.yaml
+++ b/.github/workflows/docker/compose/AudioQnA-compose.yaml
@@ -7,4 +7,4 @@ services:
     build:
       context: docker
       dockerfile: ./Dockerfile
-    image: ${REGISTRY}opea/audioqna:${TAG:-latest}
+    image: ${REGISTRY:-opea}/audioqna:${TAG:-latest}
diff --git a/.github/workflows/docker/compose/ChatQnA-compose.yaml b/.github/workflows/docker/compose/ChatQnA-compose.yaml
index e8124436dc..b78d53c306 100644
--- a/.github/workflows/docker/compose/ChatQnA-compose.yaml
+++ b/.github/workflows/docker/compose/ChatQnA-compose.yaml
@@ -7,14 +7,14 @@ services:
     build:
       context: docker
       dockerfile: ./Dockerfile
-    image: ${REGISTRY}opea/chatqna:${TAG:-latest}
+    image: ${REGISTRY:-opea}/chatqna:${TAG:-latest}
   chatqna-ui:
     build:
       context: docker/ui
       dockerfile: ./docker/Dockerfile
-    image: ${REGISTRY}opea/chatqna-ui:${TAG:-latest}
+    image: ${REGISTRY:-opea}/chatqna-ui:${TAG:-latest}
   chatqna-conversation-ui:
     build:
       context: docker/ui
       dockerfile: ./docker/Dockerfile.react
-    image: ${REGISTRY}opea/chatqna-conversation-ui:${TAG:-latest}
+    image: ${REGISTRY:-opea}/chatqna-conversation-ui:${TAG:-latest}
diff --git a/.github/workflows/docker/compose/CodeGen-compose.yaml b/.github/workflows/docker/compose/CodeGen-compose.yaml
index f362e37b82..13ba74dba7 100644
--- a/.github/workflows/docker/compose/CodeGen-compose.yaml
+++ b/.github/workflows/docker/compose/CodeGen-compose.yaml
@@ -7,14 +7,14 @@ services:
     build:
       context: docker
       dockerfile: ./Dockerfile
-    image: ${REGISTRY}opea/codegen:${TAG:-latest}
+    image: ${REGISTRY:-opea}/codegen:${TAG:-latest}
   codegen-ui:
     build:
       context: docker/ui
       dockerfile: ./docker/Dockerfile
-    image: ${REGISTRY}opea/codegen-ui:${TAG:-latest}
+    image: ${REGISTRY:-opea}/codegen-ui:${TAG:-latest}
   codegen-react-ui:
     build:
       context: docker/ui
       dockerfile: ./docker/Dockerfile.react
-    image: ${REGISTRY}opea/codegen-conversation-ui:${TAG:-latest}
+    image: ${REGISTRY:-opea}/codegen-conversation-ui:${TAG:-latest}
diff --git a/.github/workflows/docker/compose/CodeTrans-compose.yaml b/.github/workflows/docker/compose/CodeTrans-compose.yaml
index 4d1f4eeec0..b9b4b34b3b 100644
--- a/.github/workflows/docker/compose/CodeTrans-compose.yaml
+++ b/.github/workflows/docker/compose/CodeTrans-compose.yaml
@@ -7,9 +7,9 @@ services:
     build:
       context: docker
       dockerfile: ./Dockerfile
-    image: ${REGISTRY}opea/codetrans:${TAG:-latest}
+    image: ${REGISTRY:-opea}/codetrans:${TAG:-latest}
   codetrans-ui:
     build:
       context: docker/ui
       dockerfile: ./docker/Dockerfile
-    image: ${REGISTRY}opea/codetrans-ui:${TAG:-latest}
+    image: ${REGISTRY:-opea}/codetrans-ui:${TAG:-latest}
diff --git a/.github/workflows/docker/compose/DocSum-compose.yaml b/.github/workflows/docker/compose/DocSum-compose.yaml
index 494e318fbd..4e2ab4cafc 100644
--- a/.github/workflows/docker/compose/DocSum-compose.yaml
+++ b/.github/workflows/docker/compose/DocSum-compose.yaml
@@ -7,14 +7,14 @@ services:
     build:
       context: docker
       dockerfile: ./Dockerfile
-    image: ${REGISTRY}opea/docsum:${TAG:-latest}
+    image: ${REGISTRY:-opea}/docsum:${TAG:-latest}
   docsum-ui:
     build:
       context: docker/ui
       dockerfile: ./docker/Dockerfile
-    image: ${REGISTRY}opea/docsum-ui:${TAG:-latest}
+    image: ${REGISTRY:-opea}/docsum-ui:${TAG:-latest}
   docsum-react-ui:
     build:
       context: docker/ui
       dockerfile: ./docker/Dockerfile.react
-    image: ${REGISTRY}opea/docsum-react-ui:${TAG:-latest}
+    image: ${REGISTRY:-opea}/docsum-react-ui:${TAG:-latest}
diff --git a/.github/workflows/docker/compose/FaqGen-compose.yaml b/.github/workflows/docker/compose/FaqGen-compose.yaml
index 724268b9a9..3cc97e314a 100644
--- a/.github/workflows/docker/compose/FaqGen-compose.yaml
+++ b/.github/workflows/docker/compose/FaqGen-compose.yaml
@@ -7,14 +7,14 @@ services:
     build:
       context: docker
       dockerfile: ./Dockerfile
-    image: ${REGISTRY}opea/faqgen:${TAG:-latest}
+    image: ${REGISTRY:-opea}/faqgen:${TAG:-latest}
   faqgen-ui:
     build:
       context: docker/ui
       dockerfile: ./docker/Dockerfile
-    image: ${REGISTRY}opea/faqgen-ui:${TAG:-latest}
+    image: ${REGISTRY:-opea}/faqgen-ui:${TAG:-latest}
   faqgen-react-ui:
     build:
       context: docker/ui
       dockerfile: ./docker/Dockerfile.react
-    image: ${REGISTRY}opea/faqgen-react-ui:${TAG:-latest}
+    image: ${REGISTRY:-opea}/faqgen-react-ui:${TAG:-latest}
diff --git a/.github/workflows/docker/compose/SearchQnA-compose.yaml b/.github/workflows/docker/compose/SearchQnA-compose.yaml
index 217f2f0e90..ac917dc471 100644
--- a/.github/workflows/docker/compose/SearchQnA-compose.yaml
+++ b/.github/workflows/docker/compose/SearchQnA-compose.yaml
@@ -7,9 +7,9 @@ services:
     build:
       context: docker
       dockerfile: ./Dockerfile
-    image: ${REGISTRY}opea/searchqna:${TAG:-latest}
+    image: ${REGISTRY:-opea}/searchqna:${TAG:-latest}
   searchqna-ui:
     build:
       context: docker/ui
       dockerfile: ./docker/Dockerfile
-    image: ${REGISTRY}opea/searchqna-ui:${TAG:-latest}
+    image: ${REGISTRY:-opea}/searchqna-ui:${TAG:-latest}
diff --git a/.github/workflows/docker/compose/Translation-compose.yaml b/.github/workflows/docker/compose/Translation-compose.yaml
index 2c8a4476a7..b085a0c8f3 100644
--- a/.github/workflows/docker/compose/Translation-compose.yaml
+++ b/.github/workflows/docker/compose/Translation-compose.yaml
@@ -7,9 +7,9 @@ services:
     build:
       context: docker
       dockerfile: ./Dockerfile
-    image: ${REGISTRY}opea/translation:${TAG:-latest}
+    image: ${REGISTRY:-opea}/translation:${TAG:-latest}
   translation-ui:
     build:
       context: docker/ui
       dockerfile: ./docker/Dockerfile
-    image: ${REGISTRY}opea/translation-ui:${TAG:-latest}
+    image: ${REGISTRY:-opea}/translation-ui:${TAG:-latest}
diff --git a/.github/workflows/manual-cd-workflow.yml b/.github/workflows/manual-cd-workflow.yml
new file mode 100644
index 0000000000..52be4230f9
--- /dev/null
+++ b/.github/workflows/manual-cd-workflow.yml
@@ -0,0 +1,79 @@
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
+
+name: Examples CD workflow on manual event
+on:
+  workflow_dispatch:
+    inputs:
+      examples:
+        default: "AudioQnA,ChatQnA,CodeGen,CodeTrans,DocSum,FaqGen,SearchQnA,Translation"
+        description: 'List of examples to test'
+        required: true
+        type: string
+      tag:
+        default: "latest"
+        description: "Tag to apply to images"
+        required: true
+        type: string
+      build:
+        default: true
+        description: 'Build test required images for Examples'
+        required: false
+        type: boolean
+      scan:
+        default: true
+        description: 'Scan all images with Trivy'
+        required: false
+        type: boolean
+      test_compose:
+        default: true
+        description: 'Test examples with docker compose'
+        required: false
+        type: boolean
+      test_k8s:
+        default: false
+        description: 'Test examples with k8s'
+        required: false
+        type: boolean
+      publish:
+        default: false
+        description: 'Publish images to docker hub'
+        required: false
+        type: boolean
+      publish_tags:
+        default: "latest,v0.9"
+        description: 'Tag list apply to publish images'
+        required: false
+        type: string
+
+permissions: read-all
+jobs:
+  get-test-matrix:
+    runs-on: ubuntu-latest
+    outputs:
+      matrix: ${{ steps.get-matrix.outputs.matrix }}
+    steps:
+    - name: Create Matrix
+      id: get-matrix
+      run: |
+        examples=($(echo ${{ github.event.inputs.examples }} | tr ',' ' '))
+        examples_json=$(printf '%s\n' "${examples[@]}" | sort -u | jq -R '.' | jq -sc '.')
+        echo "matrix=$examples_json" >> $GITHUB_OUTPUT
+
+  run-examples:
+    needs: [get-test-matrix]
+    strategy:
+      matrix:
+        example: ${{ fromJson(needs.get-test-matrix.outputs.matrix) }}
+      fail-fast: false
+    uses: ./.github/workflows/_example-workflow.yml
+    with:
+      example: ${{ matrix.example }}
+      tag: ${{ inputs.tag }}
+      build: ${{ fromJSON(inputs.build) }}
+      scan: ${{ fromJSON(inputs.scan) }}
+      test_compose: ${{ fromJSON(inputs.test_compose) }}
+      test_k8s: ${{ fromJSON(inputs.test_k8s) }}
+      publish: ${{ fromJSON(inputs.publish) }}
+      publish_tags: ${{ fromJSON(inputs.publish_tags) }}
+    secrets: inherit
diff --git a/.github/workflows/manual-image-build.yml b/.github/workflows/manual-image-build.yml
index 3c184ba173..05bc5a96f6 100644
--- a/.github/workflows/manual-image-build.yml
+++ b/.github/workflows/manual-image-build.yml
@@ -74,5 +74,5 @@ jobs:
         with:
           work_dir: ${{ github.workspace }}/${{ matrix.service }}
           docker_compose_path: ${{ github.workspace }}/.github/workflows/docker/compose/${{ matrix.service }}-compose.yaml
-          registry: ${{ env.image_repo }}
+          registry: ${{ env.image_repo }}opea
           tag: ${{ github.event.inputs.tag }}
diff --git a/.github/workflows/push-image-build.yml b/.github/workflows/push-image-build.yml
index 3b3f22fa13..f79567beaf 100644
--- a/.github/workflows/push-image-build.yml
+++ b/.github/workflows/push-image-build.yml
@@ -54,4 +54,4 @@ jobs:
         with:
           work_dir: ${{ github.workspace }}/${{ matrix.workload }}
           docker_compose_path: ${{ env.docker_compose_path }}
-          registry: ${OPEA_IMAGE_REPO}
+          registry: ${OPEA_IMAGE_REPO}opea

From f6601e360891477c771cbe040a7fd321e0d97cf0 Mon Sep 17 00:00:00 2001
From: XinyaoWa <xinyao.wang@intel.com>
Date: Tue, 13 Aug 2024 16:29:15 +0800
Subject: [PATCH 27/57] Update mainifest for FaqGen (#582)

* update tgi version

Signed-off-by: Xinyao Wang <xinyao.wang@intel.com>

* add k8s for faq

Signed-off-by: Xinyao Wang <xinyao.wang@intel.com>

* add benchmark for faq

Signed-off-by: Xinyao Wang <xinyao.wang@intel.com>

* refine k8s for faq

Signed-off-by: Xinyao Wang <xinyao.wang@intel.com>

* add tuning for faq

Signed-off-by: Xinyao Wang <xinyao.wang@intel.com>

* add prompts with different length for faq

Signed-off-by: Xinyao Wang <xinyao.wang@intel.com>

* add tgi docker for llama3.1

Signed-off-by: Xinyao Wang <xinyao.wang@intel.com>

* remove useless code

Signed-off-by: Xinyao Wang <xinyao.wang@intel.com>

* remove nodeselector

Signed-off-by: Xinyao Wang <xinyao.wang@intel.com>

* remove hg token

Signed-off-by: Xinyao Wang <xinyao.wang@intel.com>

* refine code structure

Signed-off-by: Xinyao Wang <xinyao.wang@intel.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix readme

Signed-off-by: Xinyao Wang <xinyao.wang@intel.com>

---------

Signed-off-by: Xinyao Wang <xinyao.wang@intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Signed-off-by: dmsuehir <dina.s.jones@intel.com>
---
 FaqGen/docker/gaudi/README.md                 |   4 +-
 FaqGen/docker/gaudi/compose.yaml              |   6 +-
 FaqGen/kubernetes/manifests/README.md         |  13 +-
 FaqGen/kubernetes/manifests/gaudi/faqgen.yaml | 296 ++++++++----------
 FaqGen/kubernetes/manifests/ui.yaml           |  46 +++
 FaqGen/kubernetes/manifests/xeon/faqgen.yaml  | 273 +++++++---------
 6 files changed, 308 insertions(+), 330 deletions(-)
 create mode 100644 FaqGen/kubernetes/manifests/ui.yaml

diff --git a/FaqGen/docker/gaudi/README.md b/FaqGen/docker/gaudi/README.md
index 12124cd1cc..509cbface7 100644
--- a/FaqGen/docker/gaudi/README.md
+++ b/FaqGen/docker/gaudi/README.md
@@ -16,7 +16,7 @@ cd GenAIComps
 As TGI Gaudi has been officially published as a Docker image, we simply need to pull it:
 
 ```bash
-docker pull ghcr.io/huggingface/tgi-gaudi:1.2.1
+docker pull ghcr.io/huggingface/tgi-gaudi:2.0.1
 ```
 
 ### 2. Build LLM Image
@@ -56,7 +56,7 @@ docker build -t opea/faqgen-react-ui:latest --build-arg https_proxy=$https_proxy
 
 Then run the command `docker images`, you will have the following Docker Images:
 
-1. `ghcr.io/huggingface/tgi-gaudi:1.2.1`
+1. `ghcr.io/huggingface/tgi-gaudi:2.0.1`
 2. `opea/llm-faqgen-tgi:latest`
 3. `opea/faqgen:latest`
 4. `opea/faqgen-ui:latest`
diff --git a/FaqGen/docker/gaudi/compose.yaml b/FaqGen/docker/gaudi/compose.yaml
index 6a5ec4db68..602105ec23 100644
--- a/FaqGen/docker/gaudi/compose.yaml
+++ b/FaqGen/docker/gaudi/compose.yaml
@@ -17,12 +17,14 @@ services:
       https_proxy: ${https_proxy}
       HABANA_VISIBLE_DEVICES: all
       OMPI_MCA_btl_vader_single_copy_mechanism: none
-      HF_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
+      HUGGING_FACE_HUB_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
+      PREFILL_BATCH_BUCKET_SIZE: 1
+      BATCH_BUCKET_SIZE: 8
     runtime: habana
     cap_add:
       - SYS_NICE
     ipc: host
-    command: --model-id ${LLM_MODEL_ID} --max-input-length 1024 --max-total-tokens 2048
+    command: --model-id ${LLM_MODEL_ID} --max-input-length 2048 --max-total-tokens 4096 --max-batch-total-tokens 65536 --max-batch-prefill-tokens 4096
   llm_faqgen:
     image: opea/llm-faqgen-tgi:latest
     container_name: llm-faqgen-server
diff --git a/FaqGen/kubernetes/manifests/README.md b/FaqGen/kubernetes/manifests/README.md
index 37bab882cf..dc0c06b5fd 100644
--- a/FaqGen/kubernetes/manifests/README.md
+++ b/FaqGen/kubernetes/manifests/README.md
@@ -23,13 +23,24 @@ sed -i "s/insert-your-huggingface-token-here/${HUGGINGFACEHUB_API_TOKEN}/g" faqg
 kubectl apply -f faqgen.yaml
 ```
 
+## Deploy UI
+
+```
+cd GenAIExamples/FaqGen/kubernetes/manifests/
+kubectl get svc # get ip address
+ip_address="" # according to your svc address
+sed -i "s/insert_your_ip_here/${ip_address}/g" ui.yaml
+kubectl apply -f ui.yaml
+```
+
 ## Verify Services
 
 Make sure all the pods are running, and restart the faqgen-xxxx pod if necessary.
 
 ```
 kubectl get pods
-curl http://${host_ip}:8888/v1/faqgen -H "Content-Type: application/json" -d '{
+port=7779 # 7779 for gaudi, 7778 for xeon
+curl http://${host_ip}:7779/v1/faqgen -H "Content-Type: application/json" -d '{
      "messages": "Text Embeddings Inference (TEI) is a toolkit for deploying and serving open source text embeddings and sequence classification models. TEI enables high-performance extraction for the most popular models, including FlagEmbedding, Ember, GTE and E5."
      }'
 ```
diff --git a/FaqGen/kubernetes/manifests/gaudi/faqgen.yaml b/FaqGen/kubernetes/manifests/gaudi/faqgen.yaml
index 5e3c17771e..24581e8a4d 100644
--- a/FaqGen/kubernetes/manifests/gaudi/faqgen.yaml
+++ b/FaqGen/kubernetes/manifests/gaudi/faqgen.yaml
@@ -1,216 +1,186 @@
 ---
-# Source: codegen/charts/llm-uservice/charts/tgi/templates/service.yaml
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-apiVersion: v1
-kind: Service
-metadata:
-  name: faqgen-tgi
-  labels:
-    helm.sh/chart: tgi-0.1.0
-    app.kubernetes.io/name: tgi
-    app.kubernetes.io/instance: faqgen
-    app.kubernetes.io/version: "1.4"
-    app.kubernetes.io/managed-by: Helm
-spec:
-  type: ClusterIP
-  ports:
-    - port: 80
-      targetPort: 80
-      protocol: TCP
-      name: tgi
-  selector:
-    app.kubernetes.io/name: tgi
-    app.kubernetes.io/instance: faqgen
----
-apiVersion: v1
-kind: Service
-metadata:
-  name: faqgen-llm-uservice
-  labels:
-    helm.sh/chart: llm-uservice-0.1.0
-    app.kubernetes.io/name: llm-uservice
-    app.kubernetes.io/instance: faqgen
-    app.kubernetes.io/version: "1.0.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: faqgen
----
-apiVersion: v1
-kind: Service
-metadata:
-  name: faqgen
-  labels:
-    helm.sh/chart: faqgen-0.1.0
-    app.kubernetes.io/name: faqgen
-    app.kubernetes.io/instance: faqgen
-    app.kubernetes.io/version: "1.0.0"
-    app.kubernetes.io/managed-by: Helm
-spec:
-  type: ClusterIP
-  ports:
-    - port: 8888
-      targetPort: 8888
-      protocol: TCP
-      name: faqgen
-  selector:
-    app.kubernetes.io/name: faqgen
-    app.kubernetes.io/instance: faqgen
----
 apiVersion: apps/v1
 kind: Deployment
 metadata:
-  name: faqgen-tgi
-  labels:
-    helm.sh/chart: tgi-0.1.0
-    app.kubernetes.io/name: tgi
-    app.kubernetes.io/instance: faqgen
-    app.kubernetes.io/version: "1.4"
-    app.kubernetes.io/managed-by: Helm
+  name: faq-tgi-deploy
+  namespace: default
 spec:
   replicas: 1
   selector:
     matchLabels:
-      app.kubernetes.io/name: tgi
-      app.kubernetes.io/instance: faqgen
+      app: faq-tgi-deploy
   template:
     metadata:
+      annotations:
+        sidecar.istio.io/rewriteAppHTTPProbers: 'true'
       labels:
-        app.kubernetes.io/name: tgi
-        app.kubernetes.io/instance: faqgen
+        app: faq-tgi-deploy
     spec:
-      securityContext: {}
+      hostIPC: true
       containers:
-        - name: tgi
-          env:
-            - name: MODEL_ID
-              value: Intel/neural-chat-7b-v3-3
-            - name: PORT
-              value: "80"
-            - name: http_proxy
-              value:
-            - name: https_proxy
-              value:
-            - name: no_proxy
-              value:
-          securityContext: {}
-          image: "ghcr.io/huggingface/text-generation-inference:1.4"
-          imagePullPolicy: IfNotPresent
-          volumeMounts:
-            - mountPath: /data
-              name: model-volume
-          ports:
-            - name: http
-              containerPort: 80
-              protocol: TCP
-          resources: {}
+      - name: faq-tgi-deploy-demo
+        env:
+          - name: HUGGING_FACE_HUB_TOKEN
+            value: "insert-your-huggingface-token-here"
+          - name: OMPI_MCA_btl_vader_single_copy_mechanism
+            value: none
+          - name: PT_HPU_ENABLE_LAZY_COLLECTIVES
+            value: 'true'
+          - name: runtime
+            value: habana
+          - name: HABANA_VISIBLE_DEVICES
+            value: all
+          - name: PREFILL_BATCH_BUCKET_SIZE
+            value: "1"
+          - name: BATCH_BUCKET_SIZE
+            value: "8"
+          - name: PORT
+            value: "80"
+        image: ghcr.io/huggingface/tgi-gaudi:2.0.1
+        imagePullPolicy: IfNotPresent
+        securityContext:
+          capabilities:
+            add:
+            - SYS_NICE
+        args:
+        - --model-id
+        - 'meta-llama/Meta-Llama-3-8B-Instruct'
+        - --max-input-length
+        - '3096'
+        - --max-total-tokens
+        - '4096'
+        - --max-batch-total-tokens
+        - '65536'
+        - --max-batch-prefill-tokens
+        - '4096'
+        volumeMounts:
+        - mountPath: /data
+          name: model-volume
+        - mountPath: /dev/shm
+          name: shm
+        ports:
+        - containerPort: 80
+        resources:
+          limits:
+            habana.ai/gaudi: 1
+      serviceAccountName: default
       volumes:
-        - name: model-volume
-          hostPath:
-            path: /mnt
-            type: Directory
+      - name: model-volume
+        hostPath:
+          path: /home/sdp/cesg
+          type: Directory
+      - name: shm
+        emptyDir:
+          medium: Memory
+          sizeLimit: 1Gi
+---
+kind: Service
+apiVersion: v1
+metadata:
+  name: faq-tgi-svc
+spec:
+  type: ClusterIP
+  selector:
+    app: faq-tgi-deploy
+  ports:
+  - name: service
+    port: 8010
+    targetPort: 80
 ---
 apiVersion: apps/v1
 kind: Deployment
 metadata:
-  name: faqgen-llm-uservice
-  labels:
-    helm.sh/chart: llm-uservice-0.1.0
-    app.kubernetes.io/name: llm-uservice
-    app.kubernetes.io/instance: faqgen
-    app.kubernetes.io/version: "1.0.0"
-    app.kubernetes.io/managed-by: Helm
+  name: faq-micro-deploy
+  namespace: default
 spec:
   replicas: 1
   selector:
     matchLabels:
-      app.kubernetes.io/name: llm-uservice
-      app.kubernetes.io/instance: faqgen
+      app: faq-micro-deploy
   template:
     metadata:
+      annotations:
+        sidecar.istio.io/rewriteAppHTTPProbers: 'true'
       labels:
-        app.kubernetes.io/name: llm-uservice
-        app.kubernetes.io/instance: faqgen
+        app: faq-micro-deploy
     spec:
-      securityContext: {}
+      hostIPC: true
       containers:
-        - name: faqgen
+        - name: faq-micro-deploy
           env:
             - name: TGI_LLM_ENDPOINT
-              value: "http://faqgen-tgi:80"
+              value: "http://faq-tgi-svc.default.svc.cluster.local:8010"
             - name: HUGGINGFACEHUB_API_TOKEN
               value: "insert-your-huggingface-token-here"
-            - name: http_proxy
-              value:
-            - name: https_proxy
-              value:
-            - name: no_proxy
-              value:
-          securityContext: {}
-          image: "opea/llm-faqgen-tgi:latest"
+          image: opea/llm-faqgen-tgi:latest
           imagePullPolicy: IfNotPresent
+          args: null
           ports:
-            - name: llm-uservice
-              containerPort: 9000
-              protocol: TCP
-          startupProbe:
-            exec:
-              command:
-                - curl
-                - http://faqgen-tgi:80
-            initialDelaySeconds: 5
-            periodSeconds: 5
-            failureThreshold: 120
-          resources: {}
+          - containerPort: 9000
+      serviceAccountName: default
+---
+kind: Service
+apiVersion: v1
+metadata:
+  name: faq-micro-svc
+spec:
+  type: ClusterIP
+  selector:
+    app: faq-micro-deploy
+  ports:
+  - name: service
+    port: 9003
+    targetPort: 9000
 ---
 apiVersion: apps/v1
 kind: Deployment
 metadata:
-  name: faqgen
-  labels:
-    helm.sh/chart: faqgen-0.1.0
-    app.kubernetes.io/name: faqgen
-    app.kubernetes.io/instance: faqgen
-    app.kubernetes.io/version: "1.0.0"
-    app.kubernetes.io/managed-by: Helm
+  name: faq-mega-server-deploy
+  namespace: default
 spec:
   replicas: 1
   selector:
     matchLabels:
-      app.kubernetes.io/name: faqgen
-      app.kubernetes.io/instance: faqgen
+      app: faq-mega-server-deploy
   template:
     metadata:
+      annotations:
+        sidecar.istio.io/rewriteAppHTTPProbers: 'true'
       labels:
-        app.kubernetes.io/name: faqgen
-        app.kubernetes.io/instance: faqgen
+        app: faq-mega-server-deploy
     spec:
-      securityContext: null
+      hostIPC: true
       containers:
-        - name: faqgen
+        - name: faq-mega-server-deploy
           env:
             - name: LLM_SERVICE_HOST_IP
-              value: faqgen-llm-uservice
-            - name: http_proxy
-              value:
-            - name: https_proxy
-              value:
-            - name: no_proxy
-              value:
-          securityContext: null
-          image: "opea/faqgen:latest"
+              value: faq-micro-svc
+            - name: LLM_SERVICE_PORT
+              value: "9003"
+            - name: MEGA_SERVICE_HOST_IP
+              value: faq-mega-server-svc
+            - name: MEGA_SERVICE_PORT
+              value: "7777"
+          image: opea/faqgen:latest
           imagePullPolicy: IfNotPresent
+          args: null
           ports:
-            - name: faqgen
-              containerPort: 8888
-              protocol: TCP
-          resources: null
+          - containerPort: 7777
+      serviceAccountName: default
+---
+kind: Service
+apiVersion: v1
+metadata:
+  name: faq-mega-server-svc
+spec:
+  type: NodePort
+  selector:
+    app: faq-mega-server-deploy
+  ports:
+  - name: service
+    port: 7779
+    targetPort: 7777
+    nodePort: 30779
diff --git a/FaqGen/kubernetes/manifests/ui.yaml b/FaqGen/kubernetes/manifests/ui.yaml
new file mode 100644
index 0000000000..f74299a094
--- /dev/null
+++ b/FaqGen/kubernetes/manifests/ui.yaml
@@ -0,0 +1,46 @@
+---
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: faq-mega-ui-deploy
+  namespace: default
+spec:
+  replicas: 1
+  selector:
+    matchLabels:
+      app: faq-mega-ui-deploy
+  template:
+    metadata:
+      annotations:
+        sidecar.istio.io/rewriteAppHTTPProbers: 'true'
+      labels:
+        app: faq-mega-ui-deploy
+    spec:
+      hostIPC: true
+      containers:
+        - name: faq-mega-ui-deploy
+          env:
+            - name: DOC_BASE_URL
+              value: http://{insert_your_ip_here}:7779/v1/faqgen
+          image: opea/faqgen-ui:latest
+          imagePullPolicy: IfNotPresent
+          args: null
+          ports:
+          - containerPort: 5173
+      serviceAccountName: default
+---
+kind: Service
+apiVersion: v1
+metadata:
+  name: faq-mega-ui-svc
+spec:
+  type: NodePort
+  selector:
+    app: faq-mega-ui-deploy
+  ports:
+  - name: service
+    port: 5175
+    targetPort: 5173
+    nodePort: 30175
diff --git a/FaqGen/kubernetes/manifests/xeon/faqgen.yaml b/FaqGen/kubernetes/manifests/xeon/faqgen.yaml
index 5e3c17771e..b1d102df93 100644
--- a/FaqGen/kubernetes/manifests/xeon/faqgen.yaml
+++ b/FaqGen/kubernetes/manifests/xeon/faqgen.yaml
@@ -1,216 +1,165 @@
 ---
-# Source: codegen/charts/llm-uservice/charts/tgi/templates/service.yaml
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-apiVersion: v1
-kind: Service
-metadata:
-  name: faqgen-tgi
-  labels:
-    helm.sh/chart: tgi-0.1.0
-    app.kubernetes.io/name: tgi
-    app.kubernetes.io/instance: faqgen
-    app.kubernetes.io/version: "1.4"
-    app.kubernetes.io/managed-by: Helm
-spec:
-  type: ClusterIP
-  ports:
-    - port: 80
-      targetPort: 80
-      protocol: TCP
-      name: tgi
-  selector:
-    app.kubernetes.io/name: tgi
-    app.kubernetes.io/instance: faqgen
----
-apiVersion: v1
-kind: Service
-metadata:
-  name: faqgen-llm-uservice
-  labels:
-    helm.sh/chart: llm-uservice-0.1.0
-    app.kubernetes.io/name: llm-uservice
-    app.kubernetes.io/instance: faqgen
-    app.kubernetes.io/version: "1.0.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: faqgen
----
-apiVersion: v1
-kind: Service
-metadata:
-  name: faqgen
-  labels:
-    helm.sh/chart: faqgen-0.1.0
-    app.kubernetes.io/name: faqgen
-    app.kubernetes.io/instance: faqgen
-    app.kubernetes.io/version: "1.0.0"
-    app.kubernetes.io/managed-by: Helm
-spec:
-  type: ClusterIP
-  ports:
-    - port: 8888
-      targetPort: 8888
-      protocol: TCP
-      name: faqgen
-  selector:
-    app.kubernetes.io/name: faqgen
-    app.kubernetes.io/instance: faqgen
----
 apiVersion: apps/v1
 kind: Deployment
 metadata:
-  name: faqgen-tgi
-  labels:
-    helm.sh/chart: tgi-0.1.0
-    app.kubernetes.io/name: tgi
-    app.kubernetes.io/instance: faqgen
-    app.kubernetes.io/version: "1.4"
-    app.kubernetes.io/managed-by: Helm
+  name: faq-tgi-cpu-deploy
+  namespace: default
 spec:
   replicas: 1
   selector:
     matchLabels:
-      app.kubernetes.io/name: tgi
-      app.kubernetes.io/instance: faqgen
+      app: faq-tgi-cpu-deploy
   template:
     metadata:
+      annotations:
+        sidecar.istio.io/rewriteAppHTTPProbers: 'true'
       labels:
-        app.kubernetes.io/name: tgi
-        app.kubernetes.io/instance: faqgen
+        app: faq-tgi-cpu-deploy
     spec:
+      hostIPC: true
       securityContext: {}
       containers:
-        - name: tgi
-          env:
-            - name: MODEL_ID
-              value: Intel/neural-chat-7b-v3-3
-            - name: PORT
-              value: "80"
-            - name: http_proxy
-              value:
-            - name: https_proxy
-              value:
-            - name: no_proxy
-              value:
-          securityContext: {}
-          image: "ghcr.io/huggingface/text-generation-inference:1.4"
-          imagePullPolicy: IfNotPresent
-          volumeMounts:
-            - mountPath: /data
-              name: model-volume
-          ports:
-            - name: http
-              containerPort: 80
-              protocol: TCP
-          resources: {}
+      - name: faq-tgi-cpu-deploy-demo
+        env:
+          - name: HUGGING_FACE_HUB_TOKEN
+            value: "insert-your-huggingface-token-here"
+          - name: PORT
+            value: "80"
+        image: ghcr.io/huggingface/text-generation-inference:1.4
+        imagePullPolicy: IfNotPresent
+        securityContext: {}
+        args:
+        - --model-id
+        - 'meta-llama/Meta-Llama-3-8B-Instruct'
+        - --max-input-length
+        - '3096'
+        - --max-total-tokens
+        - '4096'
+        volumeMounts:
+        - mountPath: /data
+          name: model-volume
+        - mountPath: /dev/shm
+          name: shm
+        ports:
+        - containerPort: 80
+      serviceAccountName: default
       volumes:
-        - name: model-volume
-          hostPath:
-            path: /mnt
-            type: Directory
+      - name: model-volume
+        hostPath:
+          path: /home/sdp/cesg
+          type: Directory
+      - name: shm
+        emptyDir:
+          medium: Memory
+          sizeLimit: 1Gi
+---
+kind: Service
+apiVersion: v1
+metadata:
+  name: faq-tgi-cpu-svc
+spec:
+  type: ClusterIP
+  selector:
+    app: faq-tgi-cpu-deploy
+  ports:
+  - name: service
+    port: 8011
+    targetPort: 80
 ---
 apiVersion: apps/v1
 kind: Deployment
 metadata:
-  name: faqgen-llm-uservice
-  labels:
-    helm.sh/chart: llm-uservice-0.1.0
-    app.kubernetes.io/name: llm-uservice
-    app.kubernetes.io/instance: faqgen
-    app.kubernetes.io/version: "1.0.0"
-    app.kubernetes.io/managed-by: Helm
+  name: faq-micro-cpu-deploy
+  namespace: default
 spec:
   replicas: 1
   selector:
     matchLabels:
-      app.kubernetes.io/name: llm-uservice
-      app.kubernetes.io/instance: faqgen
+      app: faq-micro-cpu-deploy
   template:
     metadata:
+      annotations:
+        sidecar.istio.io/rewriteAppHTTPProbers: 'true'
       labels:
-        app.kubernetes.io/name: llm-uservice
-        app.kubernetes.io/instance: faqgen
+        app: faq-micro-cpu-deploy
     spec:
-      securityContext: {}
+      hostIPC: true
       containers:
-        - name: faqgen
+        - name: faq-micro-cpu-deploy
           env:
             - name: TGI_LLM_ENDPOINT
-              value: "http://faqgen-tgi:80"
+              value: "http://faq-tgi-cpu-svc.default.svc.cluster.local:8011"
             - name: HUGGINGFACEHUB_API_TOKEN
               value: "insert-your-huggingface-token-here"
-            - name: http_proxy
-              value:
-            - name: https_proxy
-              value:
-            - name: no_proxy
-              value:
-          securityContext: {}
-          image: "opea/llm-faqgen-tgi:latest"
+          image: opea/llm-faqgen-tgi:latest
           imagePullPolicy: IfNotPresent
+          args: null
           ports:
-            - name: llm-uservice
-              containerPort: 9000
-              protocol: TCP
-          startupProbe:
-            exec:
-              command:
-                - curl
-                - http://faqgen-tgi:80
-            initialDelaySeconds: 5
-            periodSeconds: 5
-            failureThreshold: 120
-          resources: {}
+          - containerPort: 9000
+      serviceAccountName: default
+---
+kind: Service
+apiVersion: v1
+metadata:
+  name: faq-micro-cpu-svc
+spec:
+  type: ClusterIP
+  selector:
+    app: faq-micro-cpu-deploy
+  ports:
+  - name: service
+    port: 9004
+    targetPort: 9000
 ---
 apiVersion: apps/v1
 kind: Deployment
 metadata:
-  name: faqgen
-  labels:
-    helm.sh/chart: faqgen-0.1.0
-    app.kubernetes.io/name: faqgen
-    app.kubernetes.io/instance: faqgen
-    app.kubernetes.io/version: "1.0.0"
-    app.kubernetes.io/managed-by: Helm
+  name: faq-mega-server-cpu-deploy
+  namespace: default
 spec:
   replicas: 1
   selector:
     matchLabels:
-      app.kubernetes.io/name: faqgen
-      app.kubernetes.io/instance: faqgen
+      app: faq-mega-server-cpu-deploy
   template:
     metadata:
+      annotations:
+        sidecar.istio.io/rewriteAppHTTPProbers: 'true'
       labels:
-        app.kubernetes.io/name: faqgen
-        app.kubernetes.io/instance: faqgen
+        app: faq-mega-server-cpu-deploy
     spec:
-      securityContext: null
+      hostIPC: true
       containers:
-        - name: faqgen
+        - name: faq-mega-server-cpu-deploy
           env:
             - name: LLM_SERVICE_HOST_IP
-              value: faqgen-llm-uservice
-            - name: http_proxy
-              value:
-            - name: https_proxy
-              value:
-            - name: no_proxy
-              value:
-          securityContext: null
-          image: "opea/faqgen:latest"
+              value: faq-micro-cpu-svc
+            - name: LLM_SERVICE_PORT
+              value: "9004"
+            - name: MEGA_SERVICE_HOST_IP
+              value: faq-mega-server-cpu-svc
+            - name: MEGA_SERVICE_PORT
+              value: "7777"
+          image: opea/faqgen:latest
           imagePullPolicy: IfNotPresent
+          args: null
           ports:
-            - name: faqgen
-              containerPort: 8888
-              protocol: TCP
-          resources: null
+          - containerPort: 7777
+      serviceAccountName: default
+---
+kind: Service
+apiVersion: v1
+metadata:
+  name: faq-mega-server-cpu-svc
+spec:
+  type: NodePort
+  selector:
+    app: faq-mega-server-cpu-deploy
+  ports:
+  - name: service
+    port: 7778
+    targetPort: 7777
+    nodePort: 30778

From 552bc76fb46d18b403f5691ac2f226f890b10471 Mon Sep 17 00:00:00 2001
From: lvliang-intel <liang1.lv@intel.com>
Date: Tue, 13 Aug 2024 17:14:03 +0800
Subject: [PATCH 28/57] Add kubernetes support for VisualQnA (#578)

* Add kubernetes support for VisualQnA

Signed-off-by: lvliang-intel <liang1.lv@intel.com>

* update gmc file

Signed-off-by: lvliang-intel <liang1.lv@intel.com>

* update pic

Signed-off-by: lvliang-intel <liang1.lv@intel.com>

---------

Signed-off-by: lvliang-intel <liang1.lv@intel.com>
Signed-off-by: dmsuehir <dina.s.jones@intel.com>
---
 VisualQnA/docker/gaudi/README.md              |   2 +-
 VisualQnA/docker/xeon/README.md               |  13 +-
 VisualQnA/docker/xeon/compose.yaml            |   4 +-
 VisualQnA/kubernetes/README.md                |  57 ++++
 VisualQnA/kubernetes/manifests/README.md      |  51 +++
 .../kubernetes/manifests/gaudi/visualqna.yaml | 298 ++++++++++++++++++
 .../kubernetes/manifests/xeon/visualqna.yaml  | 298 ++++++++++++++++++
 VisualQnA/kubernetes/visualqna_gaudi.yaml     |  34 ++
 VisualQnA/kubernetes/visualqna_xeon.yaml      |  34 ++
 9 files changed, 784 insertions(+), 7 deletions(-)
 create mode 100644 VisualQnA/kubernetes/README.md
 create mode 100644 VisualQnA/kubernetes/manifests/README.md
 create mode 100644 VisualQnA/kubernetes/manifests/gaudi/visualqna.yaml
 create mode 100644 VisualQnA/kubernetes/manifests/xeon/visualqna.yaml
 create mode 100644 VisualQnA/kubernetes/visualqna_gaudi.yaml
 create mode 100644 VisualQnA/kubernetes/visualqna_xeon.yaml

diff --git a/VisualQnA/docker/gaudi/README.md b/VisualQnA/docker/gaudi/README.md
index aa12c08207..72d5efb07f 100644
--- a/VisualQnA/docker/gaudi/README.md
+++ b/VisualQnA/docker/gaudi/README.md
@@ -116,7 +116,7 @@ curl http://${host_ip}:8888/v1/visualqna -H "Content-Type: application/json" -d
           {
             "type": "image_url",
             "image_url": {
-              "url": "https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg"
+              "url": "https://www.ilankelman.org/stopsigns/australia.jpg"
             }
           }
         ]
diff --git a/VisualQnA/docker/xeon/README.md b/VisualQnA/docker/xeon/README.md
index 225bb9639a..3d53661d08 100644
--- a/VisualQnA/docker/xeon/README.md
+++ b/VisualQnA/docker/xeon/README.md
@@ -68,15 +68,20 @@ docker build --no-cache -t opea/visualqna-ui:latest --build-arg https_proxy=$htt
 cd ../../../..
 ```
 
-### 4. Pull TGI image
+### 4. Build TGI Xeon Image
+
+Since TGI official image has not supported llava-next for CPU, we'll need to build it based on Dockerfile_intel.
 
 ```bash
-docker pull ghcr.io/huggingface/text-generation-inference:2.2.0
+git clone https://github.com/huggingface/text-generation-inference
+cd text-generation-inference/
+docker build -t opea/llava-tgi-xeon:latest --build-arg PLATFORM=cpu --build-arg http_proxy=${http_proxy} --build-arg https_proxy=${https_proxy} . -f Dockerfile_intel
+cd ../
 ```
 
 Then run the command `docker images`, you will have the following 4 Docker Images:
 
-1. `ghcr.io/huggingface/text-generation-inference:2.2.0`
+1. `opea/llava-tgi-xeon:latest`
 2. `opea/lvm-tgi:latest`
 3. `opea/visualqna:latest`
 4. `opea/visualqna-ui:latest`
@@ -152,7 +157,7 @@ curl http://${host_ip}:8888/v1/visualqna -H "Content-Type: application/json" -d
           {
             "type": "image_url",
             "image_url": {
-              "url": "https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg"
+              "url": "https://www.ilankelman.org/stopsigns/australia.jpg"
             }
           }
         ]
diff --git a/VisualQnA/docker/xeon/compose.yaml b/VisualQnA/docker/xeon/compose.yaml
index 9b95012423..b43e30f31b 100644
--- a/VisualQnA/docker/xeon/compose.yaml
+++ b/VisualQnA/docker/xeon/compose.yaml
@@ -6,7 +6,7 @@ version: "3.8"
 
 services:
   llava-tgi-service:
-    image: ghcr.io/huggingface/text-generation-inference:2.2.0
+    image: opea/llava-tgi-xeon:latest
     container_name: tgi-llava-xeon-server
     ports:
       - "9399:80"
@@ -19,7 +19,7 @@ services:
       https_proxy: ${https_proxy}
       HF_HUB_DISABLE_PROGRESS_BARS: 1
       HF_HUB_ENABLE_HF_TRANSFER: 0
-    command: --model-id ${LVM_MODEL_ID}
+    command: --model-id ${LVM_MODEL_ID} --max-input-length 4096 --max-total-tokens 8192 --cuda-graphs 0
   lvm-tgi:
     image: opea/lvm-tgi:latest
     container_name: lvm-tgi-server
diff --git a/VisualQnA/kubernetes/README.md b/VisualQnA/kubernetes/README.md
new file mode 100644
index 0000000000..808b0764b2
--- /dev/null
+++ b/VisualQnA/kubernetes/README.md
@@ -0,0 +1,57 @@
+# Deploy VisualQnA in a Kubernetes Cluster
+
+This document outlines the deployment process for a Visual Question Answering (VisualQnA) application that utilizes the [GenAIComps](https://github.com/opea-project/GenAIComps.git) microservice components on Intel Xeon servers and Gaudi machines.
+
+Please install GMC in your Kubernetes cluster, if you have not already done so, by following the steps in Section "Getting Started" at [GMC Install](https://github.com/opea-project/GenAIInfra/tree/main/microservices-connector#readme). We will soon publish images to Docker Hub, at which point no builds will be required, further simplifying install.
+
+If you have only Intel Xeon machines you could use the visualqna_xeon.yaml file or if you have a Gaudi cluster you could use visualqna_gaudi.yaml
+In the below example we illustrate on Xeon.
+
+## Deploy the VisualQnA application
+
+1. Create the desired namespace if it does not already exist and deploy the application
+   ```bash
+   export APP_NAMESPACE=CT
+   kubectl create ns $APP_NAMESPACE
+   sed -i "s|namespace: visualqna|namespace: $APP_NAMESPACE|g"  ./visualqna_xeon.yaml
+   kubectl apply -f ./visualqna_xeon.yaml
+   ```
+
+2. Check if the application is up and ready
+   ```bash
+   kubectl get pods -n $APP_NAMESPACE
+   ```
+
+3. Deploy a client pod for testing
+   ```bash
+   kubectl create deployment client-test -n $APP_NAMESPACE --image=python:3.8.13 -- sleep infinity
+   ```
+
+4. Check that client pod is ready
+   ```bash
+   kubectl get pods -n $APP_NAMESPACE
+   ```
+
+5. Send request to application
+   ```bash
+   export CLIENT_POD=$(kubectl get pod -n $APP_NAMESPACE -l app=client-test -o jsonpath={.items..metadata.name})
+   export accessUrl=$(kubectl get gmc -n $APP_NAMESPACE -o jsonpath="{.items[?(@.metadata.name=='visualqna')].status.accessUrl}")
+   kubectl exec "$CLIENT_POD" -n $APP_NAMESPACE -- curl $accessUrl -X POST -d '{"messages": [
+      {
+        "role": "user",
+        "content": [
+          {
+            "type": "text",
+            "text": "What'\''s in this image?"
+          },
+          {
+            "type": "image_url",
+            "image_url": {
+              "url": "https://www.ilankelman.org/stopsigns/australia.jpg"
+            }
+          }
+        ]
+      }
+    ],
+    "max_tokens": 128}' -H 'Content-Type: application/json' > $LOG_PATH/gmc_visualqna.log
+   ```
diff --git a/VisualQnA/kubernetes/manifests/README.md b/VisualQnA/kubernetes/manifests/README.md
new file mode 100644
index 0000000000..9973b15e7c
--- /dev/null
+++ b/VisualQnA/kubernetes/manifests/README.md
@@ -0,0 +1,51 @@
+# Deploy VisualQnA in Kubernetes Cluster
+
+> [NOTE]
+> You can also customize the "LVM_MODEL_ID" if needed.
+
+> You need to make sure you have created the directory `/mnt/opea-models` to save the cached model on the node where the visualqna workload is running. Otherwise, you need to modify the `visualqna.yaml` file to change the `model-volume` to a directory that exists on the node.
+
+## Deploy On Xeon
+
+```
+cd GenAIExamples/visualqna/kubernetes/manifests/xeon
+kubectl apply -f visualqna.yaml
+```
+
+## Deploy On Gaudi
+
+```
+cd GenAIExamples/visualqna/kubernetes/manifests/gaudi
+kubectl apply -f visualqna.yaml
+```
+
+## Verify Services
+
+To verify the installation, run the command `kubectl get pod` to make sure all pods are running.
+
+Then run the command `kubectl port-forward svc/visualqna 8888:8888` to expose the visualqna service for access.
+
+Open another terminal and run the following command to verify the service if working:
+
+```console
+curl http://localhost:8888/v1/visualqna \
+    -H 'Content-Type: application/json' \
+    -d '{"messages": [
+      {
+        "role": "user",
+        "content": [
+          {
+            "type": "text",
+            "text": "What'\''s in this image?"
+          },
+          {
+            "type": "image_url",
+            "image_url": {
+              "url": "https://www.ilankelman.org/stopsigns/australia.jpg"
+            }
+          }
+        ]
+      }
+    ],
+    "max_tokens": 128}'
+```
diff --git a/VisualQnA/kubernetes/manifests/gaudi/visualqna.yaml b/VisualQnA/kubernetes/manifests/gaudi/visualqna.yaml
new file mode 100644
index 0000000000..6f00bfb8ce
--- /dev/null
+++ b/VisualQnA/kubernetes/manifests/gaudi/visualqna.yaml
@@ -0,0 +1,298 @@
+---
+# Source: visualqna/charts/lvm-uservice/templates/configmap.yaml
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
+
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: visualqna-lvm-uservice-config
+  labels:
+    helm.sh/chart: lvm-uservice-0.8.0
+    app.kubernetes.io/name: lvm-uservice
+    app.kubernetes.io/instance: visualqna
+    app.kubernetes.io/version: "1.0.0"
+    app.kubernetes.io/managed-by: Helm
+data:
+  LVM_ENDPOINT: "http://visualqna-tgi"
+  HF_HOME: "/tmp/.cache/huggingface"
+  http_proxy: ""
+  https_proxy: ""
+  no_proxy: ""
+---
+# Source: visualqna/charts/tgi/templates/configmap.yaml
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
+
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: visualqna-tgi-config
+  labels:
+    helm.sh/chart: tgi-0.8.0
+    app.kubernetes.io/name: tgi
+    app.kubernetes.io/instance: visualqna
+    app.kubernetes.io/version: "2.1.0"
+    app.kubernetes.io/managed-by: Helm
+data:
+  MODEL_ID: "llava-hf/llava-v1.6-mistral-7b-hf"
+  PORT: "8399"
+  MAX_INPUT_TOKENS: "4096"
+  MAX_TOTAL_TOKENS: "8192"
+  http_proxy: ""
+  https_proxy: ""
+  no_proxy: ""
+  HABANA_LOGS: "/tmp/habana_logs"
+  NUMBA_CACHE_DIR: "/tmp"
+  TRANSFORMERS_CACHE: "/tmp/transformers_cache"
+  HF_HOME: "/tmp/.cache/huggingface"
+---
+# Source: visualqna/charts/lvm-uservice/templates/service.yaml
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
+
+apiVersion: v1
+kind: Service
+metadata:
+  name: visualqna-lvm-uservice
+  labels:
+    helm.sh/chart: lvm-uservice-0.8.0
+    app.kubernetes.io/name: lvm-uservice
+    app.kubernetes.io/instance: visualqna
+    app.kubernetes.io/version: "1.0.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: visualqna
+---
+# Source: visualqna/charts/tgi/templates/service.yaml
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
+
+apiVersion: v1
+kind: Service
+metadata:
+  name: visualqna-tgi
+  labels:
+    helm.sh/chart: tgi-0.8.0
+    app.kubernetes.io/name: tgi
+    app.kubernetes.io/instance: visualqna
+    app.kubernetes.io/version: "2.1.0"
+    app.kubernetes.io/managed-by: Helm
+spec:
+  type: ClusterIP
+  ports:
+    - port: 80
+      targetPort: 8399
+      protocol: TCP
+      name: tgi
+  selector:
+    app.kubernetes.io/name: tgi
+    app.kubernetes.io/instance: visualqna
+---
+# Source: visualqna/templates/service.yaml
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
+
+apiVersion: v1
+kind: Service
+metadata:
+  name: visualqna
+  labels:
+    helm.sh/chart: visualqna-0.8.0
+    app.kubernetes.io/name: visualqna
+    app.kubernetes.io/instance: visualqna
+    app.kubernetes.io/version: "1.0.0"
+    app.kubernetes.io/managed-by: Helm
+spec:
+  type: ClusterIP
+  ports:
+    - port: 8888
+      targetPort: 8888
+      protocol: TCP
+      name: visualqna
+  selector:
+    app.kubernetes.io/name: visualqna
+    app.kubernetes.io/instance: visualqna
+---
+# Source: visualqna/charts/lvm-uservice/templates/deployment.yaml
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
+
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: visualqna-lvm-uservice
+  labels:
+    helm.sh/chart: lvm-uservice-0.8.0
+    app.kubernetes.io/name: lvm-uservice
+    app.kubernetes.io/instance: visualqna
+    app.kubernetes.io/version: "1.0.0"
+    app.kubernetes.io/managed-by: Helm
+spec:
+  replicas: 1
+  selector:
+    matchLabels:
+      app.kubernetes.io/name: lvm-uservice
+      app.kubernetes.io/instance: visualqna
+  template:
+    metadata:
+      labels:
+        app.kubernetes.io/name: lvm-uservice
+        app.kubernetes.io/instance: visualqna
+    spec:
+      securityContext:
+        {}
+      containers:
+        - name: visualqna
+          envFrom:
+            - configMapRef:
+                name: visualqna-lvm-uservice-config
+          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
+          resources:
+            {}
+      volumes:
+        - name: tmp
+          emptyDir: {}
+---
+# Source: visualqna/charts/tgi/templates/deployment.yaml
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
+
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: visualqna-tgi
+  labels:
+    helm.sh/chart: tgi-0.8.0
+    app.kubernetes.io/name: tgi
+    app.kubernetes.io/instance: visualqna
+    app.kubernetes.io/version: "2.1.0"
+    app.kubernetes.io/managed-by: Helm
+spec:
+  replicas: 1
+  selector:
+    matchLabels:
+      app.kubernetes.io/name: tgi
+      app.kubernetes.io/instance: visualqna
+  template:
+    metadata:
+      labels:
+        app.kubernetes.io/name: tgi
+        app.kubernetes.io/instance: visualqna
+    spec:
+      securityContext:
+        {}
+      containers:
+        - name: tgi
+          envFrom:
+            - configMapRef:
+                name: visualqna-tgi-config
+          securityContext:
+            {}
+          image: "opea/llava-tgi:latest"
+          imagePullPolicy: IfNotPresent
+          volumeMounts:
+            - mountPath: /data
+              name: model-volume
+            - mountPath: /tmp
+              name: tmp
+          ports:
+            - name: http
+              containerPort: 8399
+              protocol: TCP
+          resources:
+            limits:
+              habana.ai/gaudi: 1
+      volumes:
+        - name: model-volume
+          hostPath:
+            path: /mnt/opea-models
+            type: Directory
+        - name: tmp
+          emptyDir: {}
+---
+# Source: visualqna/templates/deployment.yaml
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
+
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: visualqna
+  labels:
+    helm.sh/chart: visualqna-0.8.0
+    app.kubernetes.io/name: visualqna
+    app.kubernetes.io/instance: visualqna
+    app.kubernetes.io/version: "1.0.0"
+    app.kubernetes.io/managed-by: Helm
+spec:
+  replicas: 1
+  selector:
+    matchLabels:
+      app.kubernetes.io/name: visualqna
+      app.kubernetes.io/instance: visualqna
+  template:
+    metadata:
+      labels:
+        app.kubernetes.io/name: visualqna
+        app.kubernetes.io/instance: visualqna
+    spec:
+      securityContext:
+        null
+      containers:
+        - name: visualqna
+          env:
+            - name: LVM_SERVICE_HOST_IP
+              value: visualqna-lvm-uservice
+            #- name: MEGA_SERVICE_PORT
+            #  value: 8888
+          securityContext:
+            allowPrivilegeEscalation: false
+            capabilities:
+              drop:
+              - ALL
+            readOnlyRootFilesystem: true
+            runAsNonRoot: true
+            runAsUser: 1000
+            seccompProfile:
+              type: RuntimeDefault
+          image: "opea/visualqna:latest"
+          imagePullPolicy: IfNotPresent
+          volumeMounts:
+            - mountPath: /tmp
+              name: tmp
+          ports:
+            - name: visualqna
+              containerPort: 8888
+              protocol: TCP
+          resources:
+            null
+      volumes:
+        - name: tmp
+          emptyDir: {}
diff --git a/VisualQnA/kubernetes/manifests/xeon/visualqna.yaml b/VisualQnA/kubernetes/manifests/xeon/visualqna.yaml
new file mode 100644
index 0000000000..744853d810
--- /dev/null
+++ b/VisualQnA/kubernetes/manifests/xeon/visualqna.yaml
@@ -0,0 +1,298 @@
+---
+# Source: visualqna/charts/lvm-uservice/templates/configmap.yaml
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
+
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: visualqna-lvm-uservice-config
+  labels:
+    helm.sh/chart: lvm-uservice-0.8.0
+    app.kubernetes.io/name: lvm-uservice
+    app.kubernetes.io/instance: visualqna
+    app.kubernetes.io/version: "1.0.0"
+    app.kubernetes.io/managed-by: Helm
+data:
+  LVM_ENDPOINT: "http://visualqna-tgi"
+  HF_HOME: "/tmp/.cache/huggingface"
+  http_proxy: ""
+  https_proxy: ""
+  no_proxy: ""
+---
+# Source: visualqna/charts/tgi/templates/configmap.yaml
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
+
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: visualqna-tgi-config
+  labels:
+    helm.sh/chart: tgi-0.8.0
+    app.kubernetes.io/name: tgi
+    app.kubernetes.io/instance: visualqna
+    app.kubernetes.io/version: "2.1.0"
+    app.kubernetes.io/managed-by: Helm
+data:
+  MODEL_ID: "llava-hf/llava-v1.6-mistral-7b-hf"
+  PORT: "8399"
+  MAX_INPUT_TOKENS: "4096"
+  MAX_TOTAL_TOKENS: "8192"
+  CUDA_GRAPHS: "0"
+  http_proxy: ""
+  https_proxy: ""
+  no_proxy: ""
+  HABANA_LOGS: "/tmp/habana_logs"
+  NUMBA_CACHE_DIR: "/tmp"
+  TRANSFORMERS_CACHE: "/tmp/transformers_cache"
+  HF_HOME: "/tmp/.cache/huggingface"
+---
+# Source: visualqna/charts/lvm-uservice/templates/service.yaml
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
+
+apiVersion: v1
+kind: Service
+metadata:
+  name: visualqna-lvm-uservice
+  labels:
+    helm.sh/chart: lvm-uservice-0.8.0
+    app.kubernetes.io/name: lvm-uservice
+    app.kubernetes.io/instance: visualqna
+    app.kubernetes.io/version: "1.0.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: visualqna
+---
+# Source: visualqna/charts/tgi/templates/service.yaml
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
+
+apiVersion: v1
+kind: Service
+metadata:
+  name: visualqna-tgi
+  labels:
+    helm.sh/chart: tgi-0.8.0
+    app.kubernetes.io/name: tgi
+    app.kubernetes.io/instance: visualqna
+    app.kubernetes.io/version: "2.1.0"
+    app.kubernetes.io/managed-by: Helm
+spec:
+  type: ClusterIP
+  ports:
+    - port: 80
+      targetPort: 8399
+      protocol: TCP
+      name: tgi
+  selector:
+    app.kubernetes.io/name: tgi
+    app.kubernetes.io/instance: visualqna
+---
+# Source: visualqna/templates/service.yaml
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
+
+apiVersion: v1
+kind: Service
+metadata:
+  name: visualqna
+  labels:
+    helm.sh/chart: visualqna-0.8.0
+    app.kubernetes.io/name: visualqna
+    app.kubernetes.io/instance: visualqna
+    app.kubernetes.io/version: "1.0.0"
+    app.kubernetes.io/managed-by: Helm
+spec:
+  type: ClusterIP
+  ports:
+    - port: 8888
+      targetPort: 8888
+      protocol: TCP
+      name: visualqna
+  selector:
+    app.kubernetes.io/name: visualqna
+    app.kubernetes.io/instance: visualqna
+---
+# Source: visualqna/charts/lvm-uservice/templates/deployment.yaml
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
+
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: visualqna-lvm-uservice
+  labels:
+    helm.sh/chart: lvm-uservice-0.8.0
+    app.kubernetes.io/name: lvm-uservice
+    app.kubernetes.io/instance: visualqna
+    app.kubernetes.io/version: "1.0.0"
+    app.kubernetes.io/managed-by: Helm
+spec:
+  replicas: 1
+  selector:
+    matchLabels:
+      app.kubernetes.io/name: lvm-uservice
+      app.kubernetes.io/instance: visualqna
+  template:
+    metadata:
+      labels:
+        app.kubernetes.io/name: lvm-uservice
+        app.kubernetes.io/instance: visualqna
+    spec:
+      securityContext:
+        {}
+      containers:
+        - name: visualqna
+          envFrom:
+            - configMapRef:
+                name: visualqna-lvm-uservice-config
+          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
+          resources:
+            {}
+      volumes:
+        - name: tmp
+          emptyDir: {}
+---
+# Source: visualqna/charts/tgi/templates/deployment.yaml
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
+
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: visualqna-tgi
+  labels:
+    helm.sh/chart: tgi-0.8.0
+    app.kubernetes.io/name: tgi
+    app.kubernetes.io/instance: visualqna
+    app.kubernetes.io/version: "2.1.0"
+    app.kubernetes.io/managed-by: Helm
+spec:
+  replicas: 1
+  selector:
+    matchLabels:
+      app.kubernetes.io/name: tgi
+      app.kubernetes.io/instance: visualqna
+  template:
+    metadata:
+      labels:
+        app.kubernetes.io/name: tgi
+        app.kubernetes.io/instance: visualqna
+    spec:
+      securityContext:
+        {}
+      containers:
+        - name: tgi
+          envFrom:
+            - configMapRef:
+                name: visualqna-tgi-config
+          securityContext:
+            {}
+          image: "ghcr.io/huggingface/text-generation-inference:2.2.0"
+          imagePullPolicy: IfNotPresent
+          volumeMounts:
+            - mountPath: /data
+              name: model-volume
+            - mountPath: /tmp
+              name: tmp
+          ports:
+            - name: http
+              containerPort: 8399
+              protocol: TCP
+          resources:
+            {}
+      volumes:
+        - name: model-volume
+          hostPath:
+            path: /mnt/opea-models
+            type: Directory
+        - name: tmp
+          emptyDir: {}
+---
+# Source: visualqna/templates/deployment.yaml
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
+
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: visualqna
+  labels:
+    helm.sh/chart: visualqna-0.8.0
+    app.kubernetes.io/name: visualqna
+    app.kubernetes.io/instance: visualqna
+    app.kubernetes.io/version: "1.0.0"
+    app.kubernetes.io/managed-by: Helm
+spec:
+  replicas: 1
+  selector:
+    matchLabels:
+      app.kubernetes.io/name: visualqna
+      app.kubernetes.io/instance: visualqna
+  template:
+    metadata:
+      labels:
+        app.kubernetes.io/name: visualqna
+        app.kubernetes.io/instance: visualqna
+    spec:
+      securityContext:
+        null
+      containers:
+        - name: visualqna
+          env:
+            - name: LVM_SERVICE_HOST_IP
+              value: visualqna-lvm-uservice
+            #- name: MEGA_SERVICE_PORT
+            #  value: 8888
+          securityContext:
+            allowPrivilegeEscalation: false
+            capabilities:
+              drop:
+              - ALL
+            readOnlyRootFilesystem: true
+            runAsNonRoot: true
+            runAsUser: 1000
+            seccompProfile:
+              type: RuntimeDefault
+          image: "opea/visualqna:latest"
+          imagePullPolicy: IfNotPresent
+          volumeMounts:
+            - mountPath: /tmp
+              name: tmp
+          ports:
+            - name: visualqna
+              containerPort: 8888
+              protocol: TCP
+          resources:
+            null
+      volumes:
+        - name: tmp
+          emptyDir: {}
diff --git a/VisualQnA/kubernetes/visualqna_gaudi.yaml b/VisualQnA/kubernetes/visualqna_gaudi.yaml
new file mode 100644
index 0000000000..4bd8248026
--- /dev/null
+++ b/VisualQnA/kubernetes/visualqna_gaudi.yaml
@@ -0,0 +1,34 @@
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
+
+apiVersion: gmc.opea.io/v1alpha3
+kind: GMConnector
+metadata:
+  labels:
+    app.kubernetes.io/name: gmconnector
+    app.kubernetes.io/managed-by: kustomize
+    gmc/platform: gaudi
+  name: visualqna
+  namespace: visualqna
+spec:
+  routerConfig:
+    name: router
+    serviceName: router-service
+  nodes:
+    root:
+      routerType: Sequence
+      steps:
+      - name: Lvm
+        data: $response
+        internalService:
+          serviceName: visualqna-service
+          config:
+            endpoint: /v1/lvm
+            LVM_ENDPOINT: visualqna-tgi-svc
+      - name: TgiGaudi
+        internalService:
+          serviceName: visualqna-tgi-svc
+          config:
+            MODEL_ID: llava-hf/llava-v1.6-mistral-7b-hf
+            endpoint: /generate
+          isDownstreamService: true
diff --git a/VisualQnA/kubernetes/visualqna_xeon.yaml b/VisualQnA/kubernetes/visualqna_xeon.yaml
new file mode 100644
index 0000000000..c789c09dab
--- /dev/null
+++ b/VisualQnA/kubernetes/visualqna_xeon.yaml
@@ -0,0 +1,34 @@
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
+
+apiVersion: gmc.opea.io/v1alpha3
+kind: GMConnector
+metadata:
+  labels:
+    app.kubernetes.io/name: gmconnector
+    app.kubernetes.io/managed-by: kustomize
+    gmc/platform: xeon
+  name: visualqna
+  namespace: visualqna
+spec:
+  routerConfig:
+    name: router
+    serviceName: router-service
+  nodes:
+    root:
+      routerType: Sequence
+      steps:
+      - name: Lvm
+        data: $response
+        internalService:
+          serviceName: visualqna-service
+          config:
+            endpoint: /v1/lvm
+            LVM_ENDPOINT: visualqna-tgi-svc
+      - name: Tgi
+        internalService:
+          serviceName: visualqna-tgi-svc
+          config:
+            MODEL_ID: llava-hf/llava-v1.6-mistral-7b-hf
+            endpoint: /generate
+          isDownstreamService: true

From 64cea3ba45b2cf5e1c3e7de97e6f53779a9245e3 Mon Sep 17 00:00:00 2001
From: Sihan Chen <39623753+Spycsh@users.noreply.github.com>
Date: Tue, 13 Aug 2024 17:38:18 +0800
Subject: [PATCH 29/57] add k8s support for audioqna (#583)

* add k8s support for audioqna

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Signed-off-by: dmsuehir <dina.s.jones@intel.com>
---
 AudioQnA/kubernetes/manifests/README.md       |  32 ++
 .../kubernetes/manifests/gaudi/audioqna.yaml  | 439 ++++++++++++++++++
 .../kubernetes/manifests/xeon/audioqna.yaml   | 395 ++++++++++++++++
 3 files changed, 866 insertions(+)
 create mode 100644 AudioQnA/kubernetes/manifests/README.md
 create mode 100644 AudioQnA/kubernetes/manifests/gaudi/audioqna.yaml
 create mode 100644 AudioQnA/kubernetes/manifests/xeon/audioqna.yaml

diff --git a/AudioQnA/kubernetes/manifests/README.md b/AudioQnA/kubernetes/manifests/README.md
new file mode 100644
index 0000000000..ab1ce2cbcd
--- /dev/null
+++ b/AudioQnA/kubernetes/manifests/README.md
@@ -0,0 +1,32 @@
+# Deploy VisualQnA in a Kubernetes Cluster
+
+> [NOTE]
+> The following values must be set before you can deploy:
+> HUGGINGFACEHUB_API_TOKEN
+> You can also customize the "MODEL_ID" and "model-volume"
+
+## Deploy On Xeon
+```
+cd GenAIExamples/AudioQnA/kubernetes/manifests/xeon
+export HUGGINGFACEHUB_API_TOKEN="YourOwnToken"
+sed -i "s/insert-your-huggingface-token-here/${HUGGINGFACEHUB_API_TOKEN}/g" audioqna.yaml
+kubectl apply -f audioqna.yaml
+```
+## Deploy On Gaudi
+```
+cd GenAIExamples/AudioQnA/kubernetes/manifests/gaudi
+export HUGGINGFACEHUB_API_TOKEN="YourOwnToken"
+sed -i "s/insert-your-huggingface-token-here/${HUGGINGFACEHUB_API_TOKEN}/g" audioqna.yaml
+kubectl apply -f audioqna.yaml
+```
+
+
+## Verify Services
+
+Make sure all the pods are running, and restart the audioqna-xxxx pod if necessary.
+
+```bash
+kubectl get pods
+
+curl http://${host_ip}:3008/v1/audioqna   -X POST   -d '{"audio": "UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA", "max_tokens":64}'   -H 'Content-Type: application/json'
+```
diff --git a/AudioQnA/kubernetes/manifests/gaudi/audioqna.yaml b/AudioQnA/kubernetes/manifests/gaudi/audioqna.yaml
new file mode 100644
index 0000000000..5a824ef3e6
--- /dev/null
+++ b/AudioQnA/kubernetes/manifests/gaudi/audioqna.yaml
@@ -0,0 +1,439 @@
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
+
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: audio-qna-config
+  namespace: default
+data:
+  ASR_ENDPOINT: http://whisper-svc.default.svc.cluster.local:7066
+  TTS_ENDPOINT: http://speecht5-svc.default.svc.cluster.local:7055
+  LLM_MODEL_ID: Intel/neural-chat-7b-v3-3
+  HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
+  TGI_LLM_ENDPOINT: http://llm-dependency-svc.default.svc.cluster.local:3006
+  MEGA_SERVICE_HOST_IP: audioqna-backend-server-svc
+  ASR_SERVICE_HOST_IP: asr-svc
+  ASR_SERVICE_PORT: "3001"
+  LLM_SERVICE_HOST_IP: llm-svc
+  LLM_SERVICE_PORT: "3007"
+  TTS_SERVICE_HOST_IP: tts-svc
+  TTS_SERVICE_PORT: "3002"
+
+---
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: asr-deploy
+  namespace: default
+spec:
+  replicas: 1
+  selector:
+    matchLabels:
+      app: asr-deploy
+  template:
+    metadata:
+      annotations:
+        sidecar.istio.io/rewriteAppHTTPProbers: 'true'
+      labels:
+        app: asr-deploy
+    spec:
+      topologySpreadConstraints:
+      - maxSkew: 1
+        topologyKey: kubernetes.io/hostname
+        whenUnsatisfiable: ScheduleAnyway
+        labelSelector:
+          matchLabels:
+            app: asr-deploy
+      hostIPC: true
+      containers:
+      - envFrom:
+        - configMapRef:
+            name: audio-qna-config
+        image: opea/asr:latest
+        imagePullPolicy: IfNotPresent
+        name: asr-deploy
+        args: null
+        ports:
+        - containerPort: 9099
+      serviceAccountName: default
+---
+kind: Service
+apiVersion: v1
+metadata:
+  name: asr-svc
+spec:
+  type: ClusterIP
+  selector:
+    app: asr-deploy
+  ports:
+  - name: service
+    port: 3001
+    targetPort: 9099
+---
+
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: whisper-deploy
+  namespace: default
+spec:
+  replicas: 1
+  selector:
+    matchLabels:
+      app: whisper-deploy
+  template:
+    metadata:
+      annotations:
+        sidecar.istio.io/rewriteAppHTTPProbers: 'true'
+      labels:
+        app: whisper-deploy
+    spec:
+      topologySpreadConstraints:
+      - maxSkew: 1
+        topologyKey: kubernetes.io/hostname
+        whenUnsatisfiable: ScheduleAnyway
+        labelSelector:
+          matchLabels:
+            app: whisper-deploy
+      hostIPC: true
+      containers:
+      - envFrom:
+        - configMapRef:
+            name: audio-qna-config
+        image: opea/whisper-gaudi:latest
+        imagePullPolicy: IfNotPresent
+        name: whisper-deploy
+        args: null
+        ports:
+        - containerPort: 7066
+        resources:
+          limits:
+            habana.ai/gaudi: 1
+        env:
+        - name: OMPI_MCA_btl_vader_single_copy_mechanism
+          value: none
+        - name: PT_HPU_ENABLE_LAZY_COLLECTIVES
+          value: 'true'
+        - name: runtime
+          value: habana
+        - name: HABANA_VISIBLE_DEVICES
+          value: all
+      serviceAccountName: default
+---
+kind: Service
+apiVersion: v1
+metadata:
+  name: whisper-svc
+spec:
+  type: ClusterIP
+  selector:
+    app: whisper-deploy
+  ports:
+  - name: service
+    port: 7066
+    targetPort: 7066
+
+---
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: tts-deploy
+  namespace: default
+spec:
+  replicas: 1
+  selector:
+    matchLabels:
+      app: tts-deploy
+  template:
+    metadata:
+      annotations:
+        sidecar.istio.io/rewriteAppHTTPProbers: 'true'
+      labels:
+        app: tts-deploy
+    spec:
+      topologySpreadConstraints:
+      - maxSkew: 1
+        topologyKey: kubernetes.io/hostname
+        whenUnsatisfiable: ScheduleAnyway
+        labelSelector:
+          matchLabels:
+            app: tts-deploy
+      hostIPC: true
+      containers:
+      - envFrom:
+        - configMapRef:
+            name: audio-qna-config
+        image: opea/tts:latest
+        imagePullPolicy: IfNotPresent
+        name: tts-deploy
+        args: null
+        ports:
+        - containerPort: 9088
+      serviceAccountName: default
+---
+kind: Service
+apiVersion: v1
+metadata:
+  name: tts-svc
+spec:
+  type: ClusterIP
+  selector:
+    app: tts-deploy
+  ports:
+  - name: service
+    port: 3002
+    targetPort: 9088
+
+---
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: speecht5-deploy
+  namespace: default
+spec:
+  replicas: 1
+  selector:
+    matchLabels:
+      app: speecht5-deploy
+  template:
+    metadata:
+      annotations:
+        sidecar.istio.io/rewriteAppHTTPProbers: 'true'
+      labels:
+        app: speecht5-deploy
+    spec:
+      topologySpreadConstraints:
+      - maxSkew: 1
+        topologyKey: kubernetes.io/hostname
+        whenUnsatisfiable: ScheduleAnyway
+        labelSelector:
+          matchLabels:
+            app: speecht5-deploy
+      hostIPC: true
+      containers:
+      - envFrom:
+        - configMapRef:
+            name: audio-qna-config
+        image: opea/speecht5-gaudi:latest
+        imagePullPolicy: IfNotPresent
+        name: speecht5-deploy
+        args: null
+        ports:
+        - containerPort: 7055
+        resources:
+          limits:
+            habana.ai/gaudi: 1
+        env:
+        - name: OMPI_MCA_btl_vader_single_copy_mechanism
+          value: none
+        - name: PT_HPU_ENABLE_LAZY_COLLECTIVES
+          value: 'true'
+        - name: runtime
+          value: habana
+        - name: HABANA_VISIBLE_DEVICES
+          value: all
+      serviceAccountName: default
+---
+kind: Service
+apiVersion: v1
+metadata:
+  name: speecht5-svc
+spec:
+  type: ClusterIP
+  selector:
+    app: speecht5-deploy
+  ports:
+  - name: service
+    port: 7055
+    targetPort: 7055
+
+---
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: llm-dependency-deploy
+  namespace: default
+spec:
+  replicas: 1
+  selector:
+    matchLabels:
+      app: llm-dependency-deploy
+  template:
+    metadata:
+      annotations:
+        sidecar.istio.io/rewriteAppHTTPProbers: 'true'
+      labels:
+        app: llm-dependency-deploy
+    spec:
+      hostIPC: true
+      containers:
+      - envFrom:
+        - configMapRef:
+            name: audio-qna-config
+        image: ghcr.io/huggingface/tgi-gaudi:2.0.1
+        name: llm-dependency-deploy-demo
+        securityContext:
+          capabilities:
+            add:
+            - SYS_NICE
+        args:
+        - --model-id
+        - $(LLM_MODEL_ID)
+        - --max-input-length
+        - '2048'
+        - --max-total-tokens
+        - '4096'
+        - --max-batch-total-tokens
+        - '65536'
+        - --max-batch-prefill-tokens
+        - '4096'
+        volumeMounts:
+        - mountPath: /data
+          name: model-volume
+        - mountPath: /dev/shm
+          name: shm
+        ports:
+        - containerPort: 80
+        resources:
+          limits:
+            habana.ai/gaudi: 1
+        env:
+        - name: OMPI_MCA_btl_vader_single_copy_mechanism
+          value: none
+        - name: PT_HPU_ENABLE_LAZY_COLLECTIVES
+          value: 'true'
+        - name: runtime
+          value: habana
+        - name: HABANA_VISIBLE_DEVICES
+          value: all
+        - name: PREFILL_BATCH_BUCKET_SIZE
+          value: "1"
+        - name: BATCH_BUCKET_SIZE
+          value: "8"
+      serviceAccountName: default
+      volumes:
+      - name: model-volume
+        hostPath:
+          path: /home/sdp/cesg
+          type: Directory
+      - name: shm
+        emptyDir:
+          medium: Memory
+          sizeLimit: 1Gi
+---
+kind: Service
+apiVersion: v1
+metadata:
+  name: llm-dependency-svc
+spec:
+  type: ClusterIP
+  selector:
+    app: llm-dependency-deploy
+  ports:
+  - name: service
+    port: 3006
+    targetPort: 80
+
+---
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: llm-deploy
+  namespace: default
+spec:
+  replicas: 1
+  selector:
+    matchLabels:
+      app: llm-deploy
+  template:
+    metadata:
+      annotations:
+        sidecar.istio.io/rewriteAppHTTPProbers: 'true'
+      labels:
+        app: llm-deploy
+    spec:
+      topologySpreadConstraints:
+      - maxSkew: 1
+        topologyKey: kubernetes.io/hostname
+        whenUnsatisfiable: ScheduleAnyway
+        labelSelector:
+          matchLabels:
+            app: llm-deploy
+      hostIPC: true
+      containers:
+      - envFrom:
+        - configMapRef:
+            name: audio-qna-config
+        image: opea/llm-tgi:latest
+        imagePullPolicy: IfNotPresent
+        name: llm-deploy
+        args: null
+        ports:
+        - containerPort: 9000
+      serviceAccountName: default
+---
+kind: Service
+apiVersion: v1
+metadata:
+  name: llm-svc
+spec:
+  type: ClusterIP
+  selector:
+    app: llm-deploy
+  ports:
+  - name: service
+    port: 3007
+    targetPort: 9000
+
+---
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: audioqna-backend-server-deploy
+  namespace: default
+spec:
+  replicas: 1
+  selector:
+    matchLabels:
+      app: audioqna-backend-server-deploy
+  template:
+    metadata:
+      annotations:
+        sidecar.istio.io/rewriteAppHTTPProbers: 'true'
+      labels:
+        app: audioqna-backend-server-deploy
+    spec:
+      topologySpreadConstraints:
+      - maxSkew: 1
+        topologyKey: kubernetes.io/hostname
+        whenUnsatisfiable: ScheduleAnyway
+        labelSelector:
+          matchLabels:
+            app: audioqna-backend-server-deploy
+      hostIPC: true
+      containers:
+      - envFrom:
+        - configMapRef:
+            name: audio-qna-config
+        image: opea/audioqna:latest
+        imagePullPolicy: IfNotPresent
+        name: audioqna-backend-server-deploy
+        args: null
+        ports:
+        - containerPort: 8888
+      serviceAccountName: default
+---
+kind: Service
+apiVersion: v1
+metadata:
+  name: audioqna-backend-server-svc
+spec:
+  type: NodePort
+  selector:
+    app: audioqna-backend-server-deploy
+  ports:
+  - name: service
+    port: 3008
+    targetPort: 8888
+    nodePort: 30666
diff --git a/AudioQnA/kubernetes/manifests/xeon/audioqna.yaml b/AudioQnA/kubernetes/manifests/xeon/audioqna.yaml
new file mode 100644
index 0000000000..89b3e6b1a4
--- /dev/null
+++ b/AudioQnA/kubernetes/manifests/xeon/audioqna.yaml
@@ -0,0 +1,395 @@
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
+
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: audio-qna-config
+  namespace: default
+data:
+  ASR_ENDPOINT: http://whisper-svc.default.svc.cluster.local:7066
+  TTS_ENDPOINT: http://speecht5-svc.default.svc.cluster.local:7055
+  LLM_MODEL_ID: Intel/neural-chat-7b-v3-3
+  HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
+  TGI_LLM_ENDPOINT: http://llm-dependency-svc.default.svc.cluster.local:3006
+  MEGA_SERVICE_HOST_IP: audioqna-backend-server-svc
+  ASR_SERVICE_HOST_IP: asr-svc
+  ASR_SERVICE_PORT: "3001"
+  LLM_SERVICE_HOST_IP: llm-svc
+  LLM_SERVICE_PORT: "3007"
+  TTS_SERVICE_HOST_IP: tts-svc
+  TTS_SERVICE_PORT: "3002"
+
+---
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: asr-deploy
+  namespace: default
+spec:
+  replicas: 1
+  selector:
+    matchLabels:
+      app: asr-deploy
+  template:
+    metadata:
+      annotations:
+        sidecar.istio.io/rewriteAppHTTPProbers: 'true'
+      labels:
+        app: asr-deploy
+    spec:
+      topologySpreadConstraints:
+      - maxSkew: 1
+        topologyKey: kubernetes.io/hostname
+        whenUnsatisfiable: ScheduleAnyway
+        labelSelector:
+          matchLabels:
+            app: asr-deploy
+      hostIPC: true
+      containers:
+      - envFrom:
+        - configMapRef:
+            name: audio-qna-config
+        image: opea/asr:latest
+        imagePullPolicy: IfNotPresent
+        name: asr-deploy
+        args: null
+        ports:
+        - containerPort: 9099
+      serviceAccountName: default
+---
+kind: Service
+apiVersion: v1
+metadata:
+  name: asr-svc
+spec:
+  type: ClusterIP
+  selector:
+    app: asr-deploy
+  ports:
+  - name: service
+    port: 3001
+    targetPort: 9099
+---
+
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: whisper-deploy
+  namespace: default
+spec:
+  replicas: 1
+  selector:
+    matchLabels:
+      app: whisper-deploy
+  template:
+    metadata:
+      annotations:
+        sidecar.istio.io/rewriteAppHTTPProbers: 'true'
+      labels:
+        app: whisper-deploy
+    spec:
+      topologySpreadConstraints:
+      - maxSkew: 1
+        topologyKey: kubernetes.io/hostname
+        whenUnsatisfiable: ScheduleAnyway
+        labelSelector:
+          matchLabels:
+            app: whisper-deploy
+      hostIPC: true
+      containers:
+      - envFrom:
+        - configMapRef:
+            name: audio-qna-config
+        image: opea/whisper:latest
+        imagePullPolicy: IfNotPresent
+        name: whisper-deploy
+        args: null
+        ports:
+        - containerPort: 7066
+      serviceAccountName: default
+---
+kind: Service
+apiVersion: v1
+metadata:
+  name: whisper-svc
+spec:
+  type: ClusterIP
+  selector:
+    app: whisper-deploy
+  ports:
+  - name: service
+    port: 7066
+    targetPort: 7066
+
+---
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: tts-deploy
+  namespace: default
+spec:
+  replicas: 1
+  selector:
+    matchLabels:
+      app: tts-deploy
+  template:
+    metadata:
+      annotations:
+        sidecar.istio.io/rewriteAppHTTPProbers: 'true'
+      labels:
+        app: tts-deploy
+    spec:
+      topologySpreadConstraints:
+      - maxSkew: 1
+        topologyKey: kubernetes.io/hostname
+        whenUnsatisfiable: ScheduleAnyway
+        labelSelector:
+          matchLabels:
+            app: tts-deploy
+      hostIPC: true
+      containers:
+      - envFrom:
+        - configMapRef:
+            name: audio-qna-config
+        image: opea/tts:latest
+        imagePullPolicy: IfNotPresent
+        name: tts-deploy
+        args: null
+        ports:
+        - containerPort: 9088
+      serviceAccountName: default
+---
+kind: Service
+apiVersion: v1
+metadata:
+  name: tts-svc
+spec:
+  type: ClusterIP
+  selector:
+    app: tts-deploy
+  ports:
+  - name: service
+    port: 3002
+    targetPort: 9088
+
+---
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: speecht5-deploy
+  namespace: default
+spec:
+  replicas: 1
+  selector:
+    matchLabels:
+      app: speecht5-deploy
+  template:
+    metadata:
+      annotations:
+        sidecar.istio.io/rewriteAppHTTPProbers: 'true'
+      labels:
+        app: speecht5-deploy
+    spec:
+      topologySpreadConstraints:
+      - maxSkew: 1
+        topologyKey: kubernetes.io/hostname
+        whenUnsatisfiable: ScheduleAnyway
+        labelSelector:
+          matchLabels:
+            app: speecht5-deploy
+      hostIPC: true
+      containers:
+      - envFrom:
+        - configMapRef:
+            name: audio-qna-config
+        image: opea/speecht5:latest
+        imagePullPolicy: IfNotPresent
+        name: speecht5-deploy
+        args: null
+        ports:
+        - containerPort: 7055
+      serviceAccountName: default
+---
+kind: Service
+apiVersion: v1
+metadata:
+  name: speecht5-svc
+spec:
+  type: ClusterIP
+  selector:
+    app: speecht5-deploy
+  ports:
+  - name: service
+    port: 7055
+    targetPort: 7055
+
+---
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: llm-dependency-deploy
+  namespace: default
+spec:
+  replicas: 1
+  selector:
+    matchLabels:
+      app: llm-dependency-deploy
+  template:
+    metadata:
+      annotations:
+        sidecar.istio.io/rewriteAppHTTPProbers: 'true'
+      labels:
+        app: llm-dependency-deploy
+    spec:
+      hostIPC: true
+      containers:
+      - envFrom:
+        - configMapRef:
+            name: audio-qna-config
+        image: ghcr.io/huggingface/text-generation-inference:2.2.0
+        name: llm-dependency-deploy-demo
+        securityContext:
+          capabilities:
+            add:
+            - SYS_NICE
+        args:
+        - --model-id
+        - $(LLM_MODEL_ID)
+        - --max-input-length
+        - '2048'
+        - --max-total-tokens
+        - '4096'
+        volumeMounts:
+        - mountPath: /data
+          name: model-volume
+        - mountPath: /dev/shm
+          name: shm
+        ports:
+        - containerPort: 80
+      serviceAccountName: default
+      volumes:
+      - name: model-volume
+        hostPath:
+          path: /home/sdp/cesg
+          type: Directory
+      - name: shm
+        emptyDir:
+          medium: Memory
+          sizeLimit: 1Gi
+---
+kind: Service
+apiVersion: v1
+metadata:
+  name: llm-dependency-svc
+spec:
+  type: ClusterIP
+  selector:
+    app: llm-dependency-deploy
+  ports:
+  - name: service
+    port: 3006
+    targetPort: 80
+
+---
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: llm-deploy
+  namespace: default
+spec:
+  replicas: 1
+  selector:
+    matchLabels:
+      app: llm-deploy
+  template:
+    metadata:
+      annotations:
+        sidecar.istio.io/rewriteAppHTTPProbers: 'true'
+      labels:
+        app: llm-deploy
+    spec:
+      topologySpreadConstraints:
+      - maxSkew: 1
+        topologyKey: kubernetes.io/hostname
+        whenUnsatisfiable: ScheduleAnyway
+        labelSelector:
+          matchLabels:
+            app: llm-deploy
+      hostIPC: true
+      containers:
+      - envFrom:
+        - configMapRef:
+            name: audio-qna-config
+        image: opea/llm-tgi:latest
+        imagePullPolicy: IfNotPresent
+        name: llm-deploy
+        args: null
+        ports:
+        - containerPort: 9000
+      serviceAccountName: default
+---
+kind: Service
+apiVersion: v1
+metadata:
+  name: llm-svc
+spec:
+  type: ClusterIP
+  selector:
+    app: llm-deploy
+  ports:
+  - name: service
+    port: 3007
+    targetPort: 9000
+
+---
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: audioqna-backend-server-deploy
+  namespace: default
+spec:
+  replicas: 1
+  selector:
+    matchLabels:
+      app: audioqna-backend-server-deploy
+  template:
+    metadata:
+      annotations:
+        sidecar.istio.io/rewriteAppHTTPProbers: 'true'
+      labels:
+        app: audioqna-backend-server-deploy
+    spec:
+      topologySpreadConstraints:
+      - maxSkew: 1
+        topologyKey: kubernetes.io/hostname
+        whenUnsatisfiable: ScheduleAnyway
+        labelSelector:
+          matchLabels:
+            app: audioqna-backend-server-deploy
+      hostIPC: true
+      containers:
+      - envFrom:
+        - configMapRef:
+            name: audio-qna-config
+        image: opea/audioqna:latest
+        imagePullPolicy: IfNotPresent
+        name: audioqna-backend-server-deploy
+        args: null
+        ports:
+        - containerPort: 8888
+      serviceAccountName: default
+---
+kind: Service
+apiVersion: v1
+metadata:
+  name: audioqna-backend-server-svc
+spec:
+  type: NodePort
+  selector:
+    app: audioqna-backend-server-deploy
+  ports:
+  - name: service
+    port: 3008
+    targetPort: 8888
+    nodePort: 30666

From 4bde57f7714530df37e62e724eb99750e95b845f Mon Sep 17 00:00:00 2001
From: "chen, suyue" <suyue.chen@intel.com>
Date: Tue, 13 Aug 2024 17:51:08 +0800
Subject: [PATCH 30/57] fix corner issue in CI test (#585)

Signed-off-by: chensuyue <suyue.chen@intel.com>
Signed-off-by: dmsuehir <dina.s.jones@intel.com>
---
 .github/workflows/_run-docker-compose.yml   | 6 +++++-
 .github/workflows/pr-docker-compose-e2e.yml | 1 +
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/_run-docker-compose.yml b/.github/workflows/_run-docker-compose.yml
index 1d550706a0..39b2b9d342 100644
--- a/.github/workflows/_run-docker-compose.yml
+++ b/.github/workflows/_run-docker-compose.yml
@@ -63,6 +63,7 @@ jobs:
     strategy:
       matrix:
         test_case: ${{ fromJSON(needs.get-test-case.outputs.test_cases) }}
+      fail-fast: false
     runs-on: ${{ inputs.hardware }}
     continue-on-error: true
     steps:
@@ -100,7 +101,10 @@ jobs:
         if: cancelled() || failure()
         run: |
           cd ${{ github.workspace }}/${{ inputs.example }}/docker/${{ inputs.hardware }}
-          docker compose stop && docker compose rm -f
+          yaml_files=$(find . -type f -name "*compose*yaml")
+          for file in $yaml_files; do
+              docker compose -f ${file} stop && docker compose -f ${file} rm -f || true
+          done
           docker system prune -f
           docker rmi $(docker images --filter reference="*:5000/*/*" -q) || true
 
diff --git a/.github/workflows/pr-docker-compose-e2e.yml b/.github/workflows/pr-docker-compose-e2e.yml
index 856b25c6a3..7706f4f111 100644
--- a/.github/workflows/pr-docker-compose-e2e.yml
+++ b/.github/workflows/pr-docker-compose-e2e.yml
@@ -40,6 +40,7 @@ jobs:
     needs: [job1, mega-image-build]
     strategy:
       matrix: ${{ fromJSON(needs.job1.outputs.run_matrix) }}
+      fail-fast: false
     uses: ./.github/workflows/_run-docker-compose.yml
     with:
       tag: ${{ needs.mega-image-build.outputs.image_tag }}

From f7b591d94f8f4e4a52dc67d40e6f51e79e997ddc Mon Sep 17 00:00:00 2001
From: Steve Zhang <huailong.zhang@intel.com>
Date: Wed, 14 Aug 2024 14:39:46 +0800
Subject: [PATCH 31/57] Add dataprep microservice to chatQnA example and the
 e2e test (#589)

Signed-off-by: zhlsunshine <huailong.zhang@intel.com>
Signed-off-by: dmsuehir <dina.s.jones@intel.com>
---
 .../kubernetes/chatQnA_dataprep_gaudi.yaml    |  76 +++++++++++++
 ChatQnA/kubernetes/chatQnA_dataprep_xeon.yaml |  76 +++++++++++++
 ChatQnA/tests/test_gmc_on_gaudi.sh            | 105 ++++++++++++++----
 ChatQnA/tests/test_gmc_on_xeon.sh             | 100 ++++++++++++++---
 4 files changed, 320 insertions(+), 37 deletions(-)
 create mode 100644 ChatQnA/kubernetes/chatQnA_dataprep_gaudi.yaml
 create mode 100644 ChatQnA/kubernetes/chatQnA_dataprep_xeon.yaml

diff --git a/ChatQnA/kubernetes/chatQnA_dataprep_gaudi.yaml b/ChatQnA/kubernetes/chatQnA_dataprep_gaudi.yaml
new file mode 100644
index 0000000000..85844c7c74
--- /dev/null
+++ b/ChatQnA/kubernetes/chatQnA_dataprep_gaudi.yaml
@@ -0,0 +1,76 @@
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
+
+apiVersion: gmc.opea.io/v1alpha3
+kind: GMConnector
+metadata:
+  labels:
+    app.kubernetes.io/name: gmconnector
+    app.kubernetes.io/managed-by: kustomize
+    gmc/platform: gaudi
+  name: chatqa
+  namespace: chatqa
+spec:
+  routerConfig:
+    name: router
+    serviceName: router-service
+  nodes:
+    root:
+      routerType: Sequence
+      steps:
+      - name: Embedding
+        internalService:
+          serviceName: embedding-svc
+          config:
+            endpoint: /v1/embeddings
+            TEI_EMBEDDING_ENDPOINT: tei-embedding-gaudi-svc
+      - name: TeiEmbeddingGaudi
+        internalService:
+          serviceName: tei-embedding-gaudi-svc
+          isDownstreamService: true
+      - name: Retriever
+        data: $response
+        internalService:
+          serviceName: retriever-svc
+          config:
+            endpoint: /v1/retrieval
+            REDIS_URL: redis-vector-db
+            TEI_EMBEDDING_ENDPOINT: tei-embedding-gaudi-svc
+      - name: VectorDB
+        internalService:
+          serviceName: redis-vector-db
+          isDownstreamService: true
+      - name: Reranking
+        data: $response
+        internalService:
+          serviceName: reranking-svc
+          config:
+            endpoint: /v1/reranking
+            TEI_RERANKING_ENDPOINT: tei-reranking-svc
+      - name: TeiReranking
+        internalService:
+          serviceName: tei-reranking-svc
+          config:
+            endpoint: /rerank
+          isDownstreamService: true
+      - name: Llm
+        data: $response
+        internalService:
+          serviceName: llm-svc
+          config:
+            endpoint: /v1/chat/completions
+            TGI_LLM_ENDPOINT: tgi-gaudi-svc
+      - name: TgiGaudi
+        internalService:
+          serviceName: tgi-gaudi-svc
+          config:
+            endpoint: /generate
+          isDownstreamService: true
+      - name: DataPrep
+        internalService:
+          serviceName: data-prep-svc
+          config:
+            endpoint: /v1/dataprep
+            REDIS_URL: redis-vector-db
+            TEI_ENDPOINT: tei-embedding-gaudi-svc
+          isDownstreamService: true
diff --git a/ChatQnA/kubernetes/chatQnA_dataprep_xeon.yaml b/ChatQnA/kubernetes/chatQnA_dataprep_xeon.yaml
new file mode 100644
index 0000000000..64265e99fa
--- /dev/null
+++ b/ChatQnA/kubernetes/chatQnA_dataprep_xeon.yaml
@@ -0,0 +1,76 @@
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
+
+apiVersion: gmc.opea.io/v1alpha3
+kind: GMConnector
+metadata:
+  labels:
+    app.kubernetes.io/name: gmconnector
+    app.kubernetes.io/managed-by: kustomize
+    gmc/platform: xeon
+  name: chatqa
+  namespace: chatqa
+spec:
+  routerConfig:
+    name: router
+    serviceName: router-service
+  nodes:
+    root:
+      routerType: Sequence
+      steps:
+      - name: Embedding
+        internalService:
+          serviceName: embedding-svc
+          config:
+            endpoint: /v1/embeddings
+            TEI_EMBEDDING_ENDPOINT: tei-embedding-svc
+      - name: TeiEmbedding
+        internalService:
+          serviceName: tei-embedding-svc
+          isDownstreamService: true
+      - name: Retriever
+        data: $response
+        internalService:
+          serviceName: retriever-svc
+          config:
+            endpoint: /v1/retrieval
+            REDIS_URL: redis-vector-db
+            TEI_EMBEDDING_ENDPOINT: tei-embedding-svc
+      - name: VectorDB
+        internalService:
+          serviceName: redis-vector-db
+          isDownstreamService: true
+      - name: Reranking
+        data: $response
+        internalService:
+          serviceName: reranking-svc
+          config:
+            endpoint: /v1/reranking
+            TEI_RERANKING_ENDPOINT: tei-reranking-svc
+      - name: TeiReranking
+        internalService:
+          serviceName: tei-reranking-svc
+          config:
+            endpoint: /rerank
+          isDownstreamService: true
+      - name: Llm
+        data: $response
+        internalService:
+          serviceName: llm-svc
+          config:
+            endpoint: /v1/chat/completions
+            TGI_LLM_ENDPOINT: tgi-service-m
+      - name: Tgi
+        internalService:
+          serviceName: tgi-service-m
+          config:
+            endpoint: /generate
+          isDownstreamService: true
+      - name: DataPrep
+        internalService:
+          serviceName: data-prep-svc
+          config:
+            endpoint: /v1/dataprep
+            REDIS_URL: redis-vector-db
+            TEI_ENDPOINT: tei-embedding-svc
+          isDownstreamService: true
diff --git a/ChatQnA/tests/test_gmc_on_gaudi.sh b/ChatQnA/tests/test_gmc_on_gaudi.sh
index 7e09dcf1d9..3b926c01c0 100755
--- a/ChatQnA/tests/test_gmc_on_gaudi.sh
+++ b/ChatQnA/tests/test_gmc_on_gaudi.sh
@@ -7,11 +7,13 @@ USER_ID=$(whoami)
 LOG_PATH=/home/$(whoami)/logs
 MOUNT_DIR=/home/$USER_ID/.cache/huggingface/hub
 IMAGE_REPO=${IMAGE_REPO:-}
+CHATQNA_DATAPREP_NAMESPACE="${APP_NAMESPACE}-chatqna-dataprep"
 
 function install_chatqna() {
+   # Create namespace APP_NAMESPACE
    kubectl create ns $APP_NAMESPACE
-   sed -i "s|namespace: chatqa|namespace: $APP_NAMESPACE|g"  ./chatQnA_xeon.yaml
-   kubectl apply -f ./chatQnA_xeon.yaml
+   sed -i "s|namespace: chatqa|namespace: $APP_NAMESPACE|g"  ./chatQnA_gaudi.yaml
+   kubectl apply -f ./chatQnA_gaudi.yaml
 
    # Wait until the router service is ready
    echo "Waiting for the chatqa router service to be ready..."
@@ -20,9 +22,25 @@ function install_chatqna() {
    echo $output
 
    # Wait until the tgi pod is ready
-   TGI_POD_NAME=$(kubectl get pods --namespace=$APP_NAMESPACE | grep ^tgi-service | awk '{print $1}')
+   TGI_POD_NAME=$(kubectl get pods --namespace=$APP_NAMESPACE | grep ^tgi-gaudi | awk '{print $1}')
    kubectl describe pod $TGI_POD_NAME -n $APP_NAMESPACE
    kubectl wait --for=condition=ready pod/$TGI_POD_NAME --namespace=$APP_NAMESPACE --timeout=300s
+
+   # Create namespace CHATQNA_DATAPREP_NAMESPACE
+   kubectl create ns $CHATQNA_DATAPREP_NAMESPACE
+   sed -i "s|namespace: chatqa|namespace: $CHATQNA_DATAPREP_NAMESPACE|g"  ./chatQnA_dataprep_gaudi.yaml
+   kubectl apply -f ./chatQnA_dataprep_gaudi.yaml
+
+   # Wait until the router service is ready
+   echo "Waiting for the chatqa-dataprep router service to be ready..."
+   wait_until_pod_ready "chatqa-dataprep router" $CHATQNA_DATAPREP_NAMESPACE "router-service"
+   output=$(kubectl get pods -n $CHATQNA_DATAPREP_NAMESPACE)
+   echo $output
+
+   # Wait until the tgi pod is ready
+   TGI_POD_NAME=$(kubectl get pods --namespace=$CHATQNA_DATAPREP_NAMESPACE | grep ^tgi-gaudi | awk '{print $1}')
+   kubectl describe pod $TGI_POD_NAME -n $CHATQNA_DATAPREP_NAMESPACE
+   kubectl wait --for=condition=ready pod/$TGI_POD_NAME --namespace=$CHATQNA_DATAPREP_NAMESPACE --timeout=300s
 }
 
 function validate_chatqna() {
@@ -32,23 +50,6 @@ function validate_chatqna() {
    # wait for client pod ready
    wait_until_pod_ready "client-test" $APP_NAMESPACE "client-test"
 
-   max_retry=20
-   # make sure microservice retriever is ready
-   # try to curl retriever-svc for max_retry times
-   for ((i=1; i<=max_retry; i++))
-   do
-     curl http://retriever-svc.$APP_NAMESPACE:7000/v1/retrieval -X POST \
-       -d '{"text":"What is the revenue of Nike in 2023?","embedding":"'"${your_embedding}"'"}' \
-       -H 'Content-Type: application/json' && break
-     sleep 10
-   done
-
-   # if i is bigger than max_retry, then exit with error
-   if [ $i -gt $max_retry ]; then
-       echo "Microservice failed, exit with error."
-       exit 1
-   fi
-
    kubectl get pods -n $APP_NAMESPACE
    # send request to chatqnA
    export CLIENT_POD=$(kubectl get pod -n $APP_NAMESPACE -l app=client-test -o jsonpath={.items..metadata.name})
@@ -80,6 +81,69 @@ function validate_chatqna() {
    rm -f ./gmc.opea.io_gmconnectors.yaml ./gmc-manager-rbac.yaml ./gmc-manager.yaml manifests/gmc-router.yaml
 }
 
+function validate_chatqna_dataprep() {
+   # deploy client pod for testing
+   kubectl create deployment client-test -n $CHATQNA_DATAPREP_NAMESPACE --image=python:3.8.13 -- sleep infinity
+
+   # wait for client pod ready
+   wait_until_pod_ready "client-test" $CHATQNA_DATAPREP_NAMESPACE "client-test"
+   # giving time to populating data
+
+   kubectl get pods -n $CHATQNA_DATAPREP_NAMESPACE
+   # send request to chatqnA
+   export CLIENT_POD=$(kubectl get pod -n $CHATQNA_DATAPREP_NAMESPACE -l app=client-test -o jsonpath={.items..metadata.name})
+   echo "$CLIENT_POD"
+   accessUrl=$(kubectl get gmc -n $CHATQNA_DATAPREP_NAMESPACE -o jsonpath="{.items[?(@.metadata.name=='chatqa')].status.accessUrl}")
+   kubectl exec "$CLIENT_POD" -n $CHATQNA_DATAPREP_NAMESPACE -- curl "$accessUrl/dataprep"  -X POST  -F 'link_list=["https://raw.githubusercontent.com/opea-project/GenAIInfra/main/microservices-connector/test/data/gaudi.txt"]' -H "Content-Type: multipart/form-data" > $LOG_PATH/curl_dataprep.log
+   exit_code=$?
+   if [ $exit_code -ne 0 ]; then
+       echo "chatqna failed, please check the logs in ${LOG_PATH}!"
+       exit 1
+   fi
+
+   echo "Checking response results, make sure the output is reasonable. "
+   local status=false
+   if [[ -f $LOG_PATH/curl_dataprep.log ]] && \
+   [[ $(grep -c "Data preparation succeeded" $LOG_PATH/curl_dataprep.log) != 0 ]]; then
+       status=true
+   fi
+   if [ $status == false ]; then
+       if [[ -f $LOG_PATH/curl_dataprep.log ]]; then
+           cat $LOG_PATH/curl_dataprep.log
+       fi
+       echo "Response check failed, please check the logs in artifacts!"
+       exit 1
+   else
+       echo "Response check succeed!"
+   fi
+
+   kubectl exec "$CLIENT_POD" -n $CHATQNA_DATAPREP_NAMESPACE -- curl $accessUrl  -X POST  -d '{"text":"What are the key features of Intel Gaudi?","parameters":{"max_new_tokens":17, "do_sample": true}}' -H 'Content-Type: application/json' > $LOG_PATH/curl_chatqna_dataprep.log
+   exit_code=$?
+   if [ $exit_code -ne 0 ]; then
+       echo "chatqna failed, please check the logs in ${LOG_PATH}!"
+       exit 1
+   fi
+
+   echo "Checking response results, make sure the output is reasonable. "
+   local status=false
+   if [[ -f $LOG_PATH/curl_chatqna_dataprep.log ]] && \
+   [[ $(grep -c "[DONE]" $LOG_PATH/curl_chatqna_dataprep.log) != 0 ]]; then
+       status=true
+   fi
+   if [ $status == false ]; then
+       if [[ -f $LOG_PATH/curl_chatqna_dataprep.log ]]; then
+           cat $LOG_PATH/curl_chatqna_dataprep.log
+       fi
+       echo "Response check failed, please check the logs in artifacts!"
+       exit 1
+   else
+       echo "Response check succeed!"
+   fi
+
+   rm -f ./gmc.opea.io_gmconnectors.yaml ./gmc-manager-rbac.yaml ./gmc-manager.yaml manifests/gmc-router.yaml
+   kubectl delete ns $CHATQNA_DATAPREP_NAMESPACE
+}
+
 function wait_until_pod_ready() {
     echo "Waiting for the $1 to be ready..."
     max_retries=30
@@ -140,6 +204,7 @@ case "$1" in
     validate_ChatQnA)
         pushd ChatQnA/kubernetes
         validate_chatqna
+        validate_chatqna_dataprep
         popd
         ;;
     *)
diff --git a/ChatQnA/tests/test_gmc_on_xeon.sh b/ChatQnA/tests/test_gmc_on_xeon.sh
index 132f62999b..69409308f1 100755
--- a/ChatQnA/tests/test_gmc_on_xeon.sh
+++ b/ChatQnA/tests/test_gmc_on_xeon.sh
@@ -7,8 +7,10 @@ USER_ID=$(whoami)
 LOG_PATH=/home/$(whoami)/logs
 MOUNT_DIR=/home/$USER_ID/.cache/huggingface/hub
 IMAGE_REPO=${IMAGE_REPO:-}
+CHATQNA_DATAPREP_NAMESPACE="${APP_NAMESPACE}-chatqna-dataprep"
 
 function install_chatqna() {
+   # Create namespace APP_NAMESPACE
    kubectl create ns $APP_NAMESPACE
    sed -i "s|namespace: chatqa|namespace: $APP_NAMESPACE|g"  ./chatQnA_xeon.yaml
    kubectl apply -f ./chatQnA_xeon.yaml
@@ -23,6 +25,22 @@ function install_chatqna() {
    TGI_POD_NAME=$(kubectl get pods --namespace=$APP_NAMESPACE | grep ^tgi-service | awk '{print $1}')
    kubectl describe pod $TGI_POD_NAME -n $APP_NAMESPACE
    kubectl wait --for=condition=ready pod/$TGI_POD_NAME --namespace=$APP_NAMESPACE --timeout=300s
+
+   # Create namespace CHATQNA_DATAPREP_NAMESPACE
+   kubectl create ns $CHATQNA_DATAPREP_NAMESPACE
+   sed -i "s|namespace: chatqa|namespace: $CHATQNA_DATAPREP_NAMESPACE|g"  ./chatQnA_dataprep_xeon.yaml
+   kubectl apply -f ./chatQnA_dataprep_xeon.yaml
+
+   # Wait until the router service is ready
+   echo "Waiting for the chatqa-dataprep router service to be ready..."
+   wait_until_pod_ready "chatqa-dataprep router" $CHATQNA_DATAPREP_NAMESPACE "router-service"
+   output=$(kubectl get pods -n $CHATQNA_DATAPREP_NAMESPACE)
+   echo $output
+
+   # Wait until the tgi pod is ready
+   TGI_POD_NAME=$(kubectl get pods --namespace=$CHATQNA_DATAPREP_NAMESPACE | grep ^tgi-service | awk '{print $1}')
+   kubectl describe pod $TGI_POD_NAME -n $CHATQNA_DATAPREP_NAMESPACE
+   kubectl wait --for=condition=ready pod/$TGI_POD_NAME --namespace=$CHATQNA_DATAPREP_NAMESPACE --timeout=300s
 }
 
 function validate_chatqna() {
@@ -33,23 +51,6 @@ function validate_chatqna() {
    wait_until_pod_ready "client-test" $APP_NAMESPACE "client-test"
    # giving time to populating data
 
-   max_retry=20
-   # make sure microservice retriever is ready
-   # try to curl retriever-svc for max_retry times
-   for ((i=1; i<=max_retry; i++))
-   do
-     curl http://retriever-svc.$APP_NAMESPACE:7000/v1/retrieval -X POST \
-       -d '{"text":"What is the revenue of Nike in 2023?","embedding":"'"${your_embedding}"'"}' \
-       -H 'Content-Type: application/json' && break
-     sleep 10
-   done
-
-   # if i is bigger than max_retry, then exit with error
-   if [ $i -gt $max_retry ]; then
-       echo "Microservice failed, exit with error."
-       exit 1
-   fi
-
    kubectl get pods -n $APP_NAMESPACE
    # send request to chatqnA
    export CLIENT_POD=$(kubectl get pod -n $APP_NAMESPACE -l app=client-test -o jsonpath={.items..metadata.name})
@@ -81,6 +82,70 @@ function validate_chatqna() {
    rm -f ./gmc.opea.io_gmconnectors.yaml ./gmc-manager-rbac.yaml ./gmc-manager.yaml manifests/gmc-router.yaml
 }
 
+
+function validate_chatqna_dataprep() {
+   # deploy client pod for testing
+   kubectl create deployment client-test -n $CHATQNA_DATAPREP_NAMESPACE --image=python:3.8.13 -- sleep infinity
+
+   # wait for client pod ready
+   wait_until_pod_ready "client-test" $CHATQNA_DATAPREP_NAMESPACE "client-test"
+   # giving time to populating data
+
+   kubectl get pods -n $CHATQNA_DATAPREP_NAMESPACE
+   # send request to chatqnA
+   export CLIENT_POD=$(kubectl get pod -n $CHATQNA_DATAPREP_NAMESPACE -l app=client-test -o jsonpath={.items..metadata.name})
+   echo "$CLIENT_POD"
+   accessUrl=$(kubectl get gmc -n $CHATQNA_DATAPREP_NAMESPACE -o jsonpath="{.items[?(@.metadata.name=='chatqa')].status.accessUrl}")
+   kubectl exec "$CLIENT_POD" -n $CHATQNA_DATAPREP_NAMESPACE -- curl "$accessUrl/dataprep"  -X POST  -F 'link_list=["https://raw.githubusercontent.com/opea-project/GenAIInfra/main/microservices-connector/test/data/gaudi.txt"]' -H "Content-Type: multipart/form-data" > $LOG_PATH/curl_dataprep.log
+   exit_code=$?
+   if [ $exit_code -ne 0 ]; then
+       echo "chatqna failed, please check the logs in ${LOG_PATH}!"
+       exit 1
+   fi
+
+   echo "Checking response results, make sure the output is reasonable. "
+   local status=false
+   if [[ -f $LOG_PATH/curl_dataprep.log ]] && \
+   [[ $(grep -c "Data preparation succeeded" $LOG_PATH/curl_dataprep.log) != 0 ]]; then
+       status=true
+   fi
+   if [ $status == false ]; then
+       if [[ -f $LOG_PATH/curl_dataprep.log ]]; then
+           cat $LOG_PATH/curl_dataprep.log
+       fi
+       echo "Response check failed, please check the logs in artifacts!"
+       exit 1
+   else
+       echo "Response check succeed!"
+   fi
+
+   kubectl exec "$CLIENT_POD" -n $CHATQNA_DATAPREP_NAMESPACE -- curl $accessUrl  -X POST  -d '{"text":"What are the key features of Intel Gaudi?","parameters":{"max_new_tokens":17, "do_sample": true}}' -H 'Content-Type: application/json' > $LOG_PATH/curl_chatqna_dataprep.log
+   exit_code=$?
+   if [ $exit_code -ne 0 ]; then
+       echo "chatqna failed, please check the logs in ${LOG_PATH}!"
+       exit 1
+   fi
+
+   echo "Checking response results, make sure the output is reasonable. "
+   local status=false
+   if [[ -f $LOG_PATH/curl_chatqna_dataprep.log ]] && \
+   [[ $(grep -c "[DONE]" $LOG_PATH/curl_chatqna_dataprep.log) != 0 ]]; then
+       status=true
+   fi
+   if [ $status == false ]; then
+       if [[ -f $LOG_PATH/curl_chatqna_dataprep.log ]]; then
+           cat $LOG_PATH/curl_chatqna_dataprep.log
+       fi
+       echo "Response check failed, please check the logs in artifacts!"
+       exit 1
+   else
+       echo "Response check succeed!"
+   fi
+
+   rm -f ./gmc.opea.io_gmconnectors.yaml ./gmc-manager-rbac.yaml ./gmc-manager.yaml manifests/gmc-router.yaml
+   kubectl delete ns $CHATQNA_DATAPREP_NAMESPACE
+}
+
 function wait_until_pod_ready() {
     echo "Waiting for the $1 to be ready..."
     max_retries=30
@@ -141,6 +206,7 @@ case "$1" in
     validate_ChatQnA)
         pushd ChatQnA/kubernetes
         validate_chatqna
+        validate_chatqna_dataprep
         popd
         ;;
     *)

From 9616208b96aaccfdb38989a0486eb1562b5a44c0 Mon Sep 17 00:00:00 2001
From: Jaswanth Karani <karani.jaswanth@gmail.com>
Date: Wed, 14 Aug 2024 12:17:20 +0530
Subject: [PATCH 32/57] fixed ISSUE-528 (#590)

* fixed ISSUE-528

Signed-off-by: jaswanth8888 <karani.jaswanth@gmail.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Signed-off-by: jaswanth8888 <karani.jaswanth@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Signed-off-by: dmsuehir <dina.s.jones@intel.com>
---
 ChatQnA/docker/gaudi/README.md            |  9 ++---
 ChatQnA/docker/gpu/README.md              | 40 +++++++++++++++++++++++
 ChatQnA/docker/ui/docker/Dockerfile.react | 13 +++-----
 ChatQnA/docker/ui/react/.env.production   |  2 ++
 ChatQnA/docker/ui/react/env.sh            | 15 +++++++++
 ChatQnA/docker/xeon/README.md             | 18 ++++------
 6 files changed, 71 insertions(+), 26 deletions(-)
 create mode 100644 ChatQnA/docker/ui/react/.env.production
 create mode 100644 ChatQnA/docker/ui/react/env.sh

diff --git a/ChatQnA/docker/gaudi/README.md b/ChatQnA/docker/gaudi/README.md
index f32d121308..91df664fd1 100644
--- a/ChatQnA/docker/gaudi/README.md
+++ b/ChatQnA/docker/gaudi/README.md
@@ -124,9 +124,7 @@ Build frontend Docker image that enables Conversational experience with ChatQnA
 
 ```bash
 cd GenAIExamples/ChatQnA/docker/ui/
-export BACKEND_SERVICE_ENDPOINT="http://${host_ip}:8888/v1/chatqna"
-export DATAPREP_SERVICE_ENDPOINT="http://${host_ip}:6007/v1/dataprep"
-docker build --no-cache -t opea/chatqna-conversation-ui:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy --build-arg BACKEND_SERVICE_ENDPOINT=$BACKEND_SERVICE_ENDPOINT --build-arg DATAPREP_SERVICE_ENDPOINT=$DATAPREP_SERVICE_ENDPOINT -f ./docker/Dockerfile.react .
+docker build --no-cache -t opea/chatqna-conversation-ui:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f ./docker/Dockerfile.react .
 cd ../../../..
 ```
 
@@ -426,9 +424,8 @@ chaqna-gaudi-conversation-ui-server:
   image: opea/chatqna-conversation-ui:latest
   container_name: chatqna-gaudi-conversation-ui-server
   environment:
-    - no_proxy=${no_proxy}
-    - https_proxy=${https_proxy}
-    - http_proxy=${http_proxy}
+    - APP_BACKEND_SERVICE_ENDPOINT=${BACKEND_SERVICE_ENDPOINT}
+    - APP_DATA_PREP_SERVICE_URL=${DATAPREP_SERVICE_ENDPOINT}
   ports:
     - "5174:80"
   depends_on:
diff --git a/ChatQnA/docker/gpu/README.md b/ChatQnA/docker/gpu/README.md
index a5130b5e5c..41c2aef329 100644
--- a/ChatQnA/docker/gpu/README.md
+++ b/ChatQnA/docker/gpu/README.md
@@ -64,6 +64,16 @@ docker build --no-cache -t opea/chatqna-ui:latest --build-arg https_proxy=$https
 cd ../../../..
 ```
 
+### 9. Build React UI Docker Image (Optional)
+
+Construct the frontend Docker image using the command below:
+
+```bash
+cd GenAIExamples/ChatQnA/docker/ui/
+docker build --no-cache -t opea/chatqna-react-ui:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f ./docker/Dockerfile.react .
+cd ../../../..
+```
+
 Then run the command `docker images`, you will have the following 7 Docker Images:
 
 1. `opea/embedding-tei:latest`
@@ -73,6 +83,7 @@ Then run the command `docker images`, you will have the following 7 Docker Image
 5. `opea/dataprep-redis:latest`
 6. `opea/chatqna:latest`
 7. `opea/chatqna-ui:latest`
+8. `opea/chatqna-react-ui:latest`
 
 ## 🚀 Start MicroServices and MegaService
 
@@ -255,4 +266,33 @@ To access the frontend, open the following URL in your browser: http://{host_ip}
       - "80:5173"
 ```
 
+## 🚀 Launch the Conversational UI (Optional)
+
+To access the Conversational UI (react based) frontend, modify the UI service in the `compose.yaml` file. Replace `chaqna-xeon-ui-server` service with the `chatqna-xeon-conversation-ui-server` service as per the config below:
+
+```yaml
+chaqna-xeon-conversation-ui-server:
+  image: opea/chatqna-conversation-ui:latest
+  container_name: chatqna-xeon-conversation-ui-server
+  environment:
+    - APP_BACKEND_SERVICE_ENDPOINT=${BACKEND_SERVICE_ENDPOINT}
+    - APP_DATA_PREP_SERVICE_URL=${DATAPREP_SERVICE_ENDPOINT}
+  ports:
+    - "5174:80"
+  depends_on:
+    - chaqna-xeon-backend-server
+  ipc: host
+  restart: always
+```
+
+Once the services are up, open the following URL in your browser: http://{host_ip}:5174. By default, the UI runs on port 80 internally. If you prefer to use a different host port to access the frontend, you can modify the port mapping in the `compose.yaml` file as shown below:
+
+```yaml
+  chaqna-xeon-conversation-ui-server:
+    image: opea/chatqna-conversation-ui:latest
+    ...
+    ports:
+      - "80:80"
+```
+
 ![project-screenshot](../../assets/img/chat_ui_init.png)
diff --git a/ChatQnA/docker/ui/docker/Dockerfile.react b/ChatQnA/docker/ui/docker/Dockerfile.react
index 8ec70c6577..f023b7afbc 100644
--- a/ChatQnA/docker/ui/docker/Dockerfile.react
+++ b/ChatQnA/docker/ui/docker/Dockerfile.react
@@ -4,23 +4,18 @@
 # Use node 20.11.1 as the base image
 FROM node:20.11.1 as vite-app
  
-COPY . /usr/app
+COPY ./react /usr/app/react
 WORKDIR /usr/app/react
 
-ARG BACKEND_SERVICE_ENDPOINT
-ARG DATAPREP_SERVICE_ENDPOINT
-ENV VITE_BACKEND_SERVICE_ENDPOINT=$BACKEND_SERVICE_ENDPOINT
-ENV VITE_DATA_PREP_SERVICE_URL=$DATAPREP_SERVICE_ENDPOINT
 
 RUN ["npm", "install"]
 RUN ["npm", "run", "build"]
 
 
 FROM nginx:alpine
-EXPOSE 80
 
-
-COPY --from=vite-app /usr/app/react/nginx.conf /etc/nginx/conf.d/default.conf
 COPY --from=vite-app /usr/app/react/dist /usr/share/nginx/html
+COPY ./react/env.sh /docker-entrypoint.d/env.sh
 
-ENTRYPOINT ["nginx", "-g", "daemon off;"]
\ No newline at end of file
+COPY ./react/nginx.conf /etc/nginx/conf.d/default.conf
+RUN chmod +x /docker-entrypoint.d/env.sh
\ No newline at end of file
diff --git a/ChatQnA/docker/ui/react/.env.production b/ChatQnA/docker/ui/react/.env.production
new file mode 100644
index 0000000000..a46e1e3850
--- /dev/null
+++ b/ChatQnA/docker/ui/react/.env.production
@@ -0,0 +1,2 @@
+VITE_BACKEND_SERVICE_ENDPOINT=APP_BACKEND_SERVICE_ENDPOINT
+VITE_DATA_PREP_SERVICE_URL=APP_DATA_PREP_SERVICE_URL
\ No newline at end of file
diff --git a/ChatQnA/docker/ui/react/env.sh b/ChatQnA/docker/ui/react/env.sh
new file mode 100644
index 0000000000..ce1372ea68
--- /dev/null
+++ b/ChatQnA/docker/ui/react/env.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
+
+for i in $(env | grep APP_) #// Make sure to use the prefix MY_APP_ if you have any other prefix in env.production file variable name replace it with MY_APP_
+do
+    key=$(echo $i | cut -d '=' -f 1)
+    value=$(echo $i | cut -d '=' -f 2-)
+    echo $key=$value
+    # sed All files
+    # find /usr/share/nginx/html -type f -exec sed -i "s|${key}|${value}|g" '{}' +
+
+    # sed JS and CSS only
+    find /usr/share/nginx/html -type f \( -name '*.js' -o -name '*.css' \) -exec sed -i "s|${key}|${value}|g" '{}' +
+done
diff --git a/ChatQnA/docker/xeon/README.md b/ChatQnA/docker/xeon/README.md
index e247cedbdc..b607e8532e 100644
--- a/ChatQnA/docker/xeon/README.md
+++ b/ChatQnA/docker/xeon/README.md
@@ -145,10 +145,7 @@ Build frontend Docker image that enables Conversational experience with ChatQnA
 
 ```bash
 cd GenAIExamples/ChatQnA/docker/ui/
-export BACKEND_SERVICE_ENDPOINT="http://${host_ip}:8888/v1/chatqna"
-export DATAPREP_SERVICE_ENDPOINT="http://${host_ip}:6007/v1/dataprep"
-export DATAPREP_GET_FILE_ENDPOINT="http://${host_ip}:6007/v1/dataprep/get_file"
-docker build --no-cache -t opea/chatqna-conversation-ui:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy --build-arg BACKEND_SERVICE_ENDPOINT=$BACKEND_SERVICE_ENDPOINT --build-arg DATAPREP_SERVICE_ENDPOINT=$DATAPREP_SERVICE_ENDPOINT --build-arg DATAPREP_GET_FILE_ENDPOINT=$DATAPREP_GET_FILE_ENDPOINT -f ./docker/Dockerfile.react .
+docker build --no-cache -t opea/chatqna-conversation-ui:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f ./docker/Dockerfile.react .
 cd ../../../..
 ```
 
@@ -396,20 +393,19 @@ To access the frontend, open the following URL in your browser: http://{host_ip}
 
 ## 🚀 Launch the Conversational UI (Optional)
 
-To access the Conversational UI (react based) frontend, modify the UI service in the `compose.yaml` file. Replace `chaqna-gaudi-ui-server` service with the `chatqna-gaudi-conversation-ui-server` service as per the config below:
+To access the Conversational UI (react based) frontend, modify the UI service in the `compose.yaml` file. Replace `chaqna-xeon-ui-server` service with the `chatqna-xeon-conversation-ui-server` service as per the config below:
 
 ```yaml
-chaqna-gaudi-conversation-ui-server:
+chaqna-xeon-conversation-ui-server:
   image: opea/chatqna-conversation-ui:latest
-  container_name: chatqna-gaudi-conversation-ui-server
+  container_name: chatqna-xeon-conversation-ui-server
   environment:
-    - no_proxy=${no_proxy}
-    - https_proxy=${https_proxy}
-    - http_proxy=${http_proxy}
+    - APP_BACKEND_SERVICE_ENDPOINT=${BACKEND_SERVICE_ENDPOINT}
+    - APP_DATA_PREP_SERVICE_URL=${DATAPREP_SERVICE_ENDPOINT}
   ports:
     - "5174:80"
   depends_on:
-    - chaqna-gaudi-backend-server
+    - chaqna-xeon-backend-server
   ipc: host
   restart: always
 ```

From 5b02384545cf6fabe25b84e3f8edd00f15f3af83 Mon Sep 17 00:00:00 2001
From: Ying Chun Guo <yingchun.guo@intel.com>
Date: Wed, 14 Aug 2024 15:53:49 +0800
Subject: [PATCH 33/57] add composible manifest e2e for cd workflow (#588)

Signed-off-by: Yingchun Guo <yingchun.guo@intel.com>
Signed-off-by: dmsuehir <dina.s.jones@intel.com>
---
 .github/workflows/_example-workflow.yml | 14 ++++-
 .github/workflows/_manifest-e2e.yml     | 12 ++--
 .github/workflows/pr-manifest-e2e.yml   | 75 ++-----------------------
 3 files changed, 25 insertions(+), 76 deletions(-)

diff --git a/.github/workflows/_example-workflow.yml b/.github/workflows/_example-workflow.yml
index 1d2654e665..48edbb65cd 100644
--- a/.github/workflows/_example-workflow.yml
+++ b/.github/workflows/_example-workflow.yml
@@ -142,7 +142,19 @@ jobs:
 ####################################################################################################
 # K8S Test
 ####################################################################################################
-# TODO
+  test-k8s-manifest:
+    needs: [build-images]
+    if: ${{ fromJSON(inputs.test_k8s) }}
+    strategy:
+      matrix:
+        hardware: ["xeon", "gaudi"]
+      fail-fast: false
+    uses: ./.github/workflows/_manifest-e2e.yml
+    with:
+      example: ${{ inputs.example }}
+      hardware: ${{ matrix.hardware }}
+      tag: ${{ inputs.tag }}
+    secrets: inherit
 
 
 ####################################################################################################
diff --git a/.github/workflows/_manifest-e2e.yml b/.github/workflows/_manifest-e2e.yml
index a0c3fc5e84..d8127ae5aa 100644
--- a/.github/workflows/_manifest-e2e.yml
+++ b/.github/workflows/_manifest-e2e.yml
@@ -10,7 +10,7 @@ on:
         description: "The example to test on K8s"
         required: true
         type: string
-      node:
+      hardware:
         default: "xeon"
         description: "Nodes to run the test, xeon or gaudi"
         required: true
@@ -23,7 +23,7 @@ on:
 
 jobs:
   manifest-test:
-    runs-on: "k8s-${{ inputs.node }}"
+    runs-on: "k8s-${{ inputs.hardware }}"
     continue-on-error: true
     steps:
       - name: Clean Up Working Directory
@@ -60,14 +60,14 @@ jobs:
       - name: Kubectl install
         id: install
         run: |
-          if [[ ! -f ${{ github.workspace }}/${{ inputs.example }}/tests/test_manifest_on_${{ inputs.node }}.sh ]]; then
+          if [[ ! -f ${{ github.workspace }}/${{ inputs.example }}/tests/test_manifest_on_${{ inputs.hardware }}.sh ]]; then
             echo "No test script found, exist test!"
             exit 0
           else
-            ${{ github.workspace }}/${{ inputs.example }}/tests/test_manifest_on_${{ inputs.node }}.sh init_${{ inputs.example }}
+            ${{ github.workspace }}/${{ inputs.example }}/tests/test_manifest_on_${{ inputs.hardware }}.sh init_${{ inputs.example }}
             echo "should_cleanup=true" >> $GITHUB_ENV
             kubectl create ns $NAMESPACE
-            ${{ github.workspace }}/${{ inputs.example }}/tests/test_manifest_on_${{ inputs.node }}.sh install_${{ inputs.example }} $NAMESPACE
+            ${{ github.workspace }}/${{ inputs.example }}/tests/test_manifest_on_${{ inputs.hardware }}.sh install_${{ inputs.example }} $NAMESPACE
             echo "Testing ${{ inputs.example }}, waiting for pod ready..."
             if kubectl rollout status deployment --namespace "$NAMESPACE" --timeout "$ROLLOUT_TIMEOUT_SECONDS"; then
               echo "Testing manifests ${{ inputs.example }}, waiting for pod ready done!"
@@ -85,7 +85,7 @@ jobs:
           if $skip_validate; then
             echo "Skip validate"
           else
-            ${{ github.workspace }}/${{ inputs.example }}/tests/test_manifest_on_${{ inputs.node }}.sh validate_${{ inputs.example }} $NAMESPACE
+            ${{ github.workspace }}/${{ inputs.example }}/tests/test_manifest_on_${{ inputs.hardware }}.sh validate_${{ inputs.example }} $NAMESPACE
           fi
 
       - name: Kubectl uninstall
diff --git a/.github/workflows/pr-manifest-e2e.yml b/.github/workflows/pr-manifest-e2e.yml
index a427971c3e..43626ba3ea 100644
--- a/.github/workflows/pr-manifest-e2e.yml
+++ b/.github/workflows/pr-manifest-e2e.yml
@@ -40,72 +40,9 @@ jobs:
     needs: [job1, mega-image-build]
     strategy:
       matrix: ${{ fromJSON(needs.job1.outputs.run_matrix) }}
-    runs-on: "k8s-${{ matrix.hardware }}"
-    continue-on-error: true
-    steps:
-      - name: E2e test manifest
-        run: |
-          echo "Matrix - manifest: ${{ matrix.example }}"
-
-      - name: Clean Up Working Directory
-        run: sudo rm -rf ${{github.workspace}}/*
-
-      - name: Checkout out Repo
-        uses: actions/checkout@v4
-        with:
-          fetch-depth: 0
-
-      - name: Set variables
-        run: |
-          if [ ${{ matrix.hardware }} == "gaudi" ]; then IMAGE_REPO=${{ vars.IMAGE_REPO_GAUDI }}; else IMAGE_REPO=${{ vars.IMAGE_REPO_XEON }}; fi
-          echo "IMAGE_REPO=$OPEA_IMAGE_REPO" >> $GITHUB_ENV
-          echo "IMAGE_TAG=${{needs.mega-image-build.outputs.image_tag}}" >> $GITHUB_ENV
-          lower_example=$(echo "${{ matrix.example }}" | tr '[:upper:]' '[:lower:]')
-          echo "NAMESPACE=$lower_example-$(date +%Y%m%d%H%M%S)" >> $GITHUB_ENV
-          echo "ROLLOUT_TIMEOUT_SECONDS=1800s" >> $GITHUB_ENV
-          echo "KUBECTL_TIMEOUT_SECONDS=60s" >> $GITHUB_ENV
-          echo "continue_test=true" >> $GITHUB_ENV
-          echo "should_cleanup=false" >> $GITHUB_ENV
-          echo "skip_validate=true" >> $GITHUB_ENV
-          echo "NAMESPACE=$NAMESPACE"
-
-      - name: Kubectl install
-        id: install
-        run: |
-          if [[ ! -f ${{ github.workspace }}/${{ matrix.example }}/tests/test_manifest_on_${{ matrix.hardware }}.sh ]]; then
-            echo "No test script found, exist test!"
-            exit 0
-          else
-            ${{ github.workspace }}/${{ matrix.example }}/tests/test_manifest_on_${{ matrix.hardware }}.sh init_${{ matrix.example }}
-            echo "should_cleanup=true" >> $GITHUB_ENV
-            kubectl create ns $NAMESPACE
-            ${{ github.workspace }}/${{ matrix.example }}/tests/test_manifest_on_${{ matrix.hardware }}.sh install_${{ matrix.example }} $NAMESPACE
-            echo "Testing ${{ matrix.example }}, waiting for pod ready..."
-            if kubectl rollout status deployment --namespace "$NAMESPACE" --timeout "$ROLLOUT_TIMEOUT_SECONDS"; then
-              echo "Testing manifests ${{ matrix.example }}, waiting for pod ready done!"
-              echo "skip_validate=false" >> $GITHUB_ENV
-            else
-              echo "Timeout waiting for pods in namespace $NAMESPACE to be ready!"
-              exit 1
-            fi
-            sleep 60
-          fi
-
-      - name: Validate e2e test
-        if: always()
-        run: |
-          if $skip_validate; then
-            echo "Skip validate"
-          else
-            ${{ github.workspace }}/${{ matrix.example }}/tests/test_manifest_on_${{ matrix.hardware }}.sh validate_${{ matrix.example }} $NAMESPACE
-          fi
-
-      - name: Kubectl uninstall
-        if: always()
-        run: |
-          if $should_cleanup; then
-            if ! kubectl delete ns $NAMESPACE --timeout=$KUBECTL_TIMEOUT_SECONDS; then
-              kubectl delete pods --namespace $NAMESPACE --force --grace-period=0 --all
-              kubectl delete ns $NAMESPACE --force --grace-period=0 --timeout=$KUBECTL_TIMEOUT_SECONDS
-            fi
-          fi
+    uses: ./.github/workflows/_manifest-e2e.yml
+    with:
+      example: ${{ matrix.example }}
+      hardware: ${{ matrix.hardware }}
+      tag: ${{ needs.mega-image-build.outputs.image_tag }}
+    secrets: inherit

From 1ecee493542118b2184c40c53f0d81dd5bb7156b Mon Sep 17 00:00:00 2001
From: XinyaoWa <xinyao.wang@intel.com>
Date: Wed, 14 Aug 2024 18:03:25 +0800
Subject: [PATCH 34/57] Fix vLLM and vLLM-on-Ray UT bug (#580)

Signed-off-by: Xinyao Wang <xinyao.wang@intel.com>
Co-authored-by: chen, suyue <suyue.chen@intel.com>
Signed-off-by: dmsuehir <dina.s.jones@intel.com>
---
 ChatQnA/docker/gaudi/README.md                   | 12 ++++++------
 ChatQnA/docker/gaudi/compose.yaml                |  2 +-
 ChatQnA/docker/gaudi/compose_vllm.yaml           |  6 +++---
 ChatQnA/docker/gaudi/compose_vllm_ray.yaml       |  6 +++---
 ChatQnA/tests/test_chatqna_on_gaudi.sh           |  4 ++--
 ...on_gaudi.sh => test_chatqna_vllm_on_gaudi.sh} | 14 ++++++++------
 ...m_on_xeon.sh => test_chatqna_vllm_on_xeon.sh} | 16 ++++++++--------
 ...audi.sh => test_chatqna_vllm_ray_on_gaudi.sh} | 11 ++++++-----
 8 files changed, 37 insertions(+), 34 deletions(-)
 rename ChatQnA/tests/{_test_chatqna_vllm_on_gaudi.sh => test_chatqna_vllm_on_gaudi.sh} (96%)
 rename ChatQnA/tests/{_test_chatqna_vllm_on_xeon.sh => test_chatqna_vllm_on_xeon.sh} (96%)
 rename ChatQnA/tests/{_test_chatqna_vllm_ray_on_gaudi.sh => test_chatqna_vllm_ray_on_gaudi.sh} (97%)

diff --git a/ChatQnA/docker/gaudi/README.md b/ChatQnA/docker/gaudi/README.md
index 91df664fd1..75bd412d57 100644
--- a/ChatQnA/docker/gaudi/README.md
+++ b/ChatQnA/docker/gaudi/README.md
@@ -173,9 +173,9 @@ export LLM_MODEL_ID="Intel/neural-chat-7b-v3-3"
 export LLM_MODEL_ID_NAME="neural-chat-7b-v3-3"
 export TEI_EMBEDDING_ENDPOINT="http://${host_ip}:8090"
 export TEI_RERANKING_ENDPOINT="http://${host_ip}:8808"
-export TGI_LLM_ENDPOINT="http://${host_ip}:8008"
-export vLLM_LLM_ENDPOINT="http://${host_ip}:8008"
-export vLLM_RAY_LLM_ENDPOINT="http://${host_ip}:8008"
+export TGI_LLM_ENDPOINT="http://${host_ip}:8005"
+export vLLM_LLM_ENDPOINT="http://${host_ip}:8007"
+export vLLM_RAY_LLM_ENDPOINT="http://${host_ip}:8006"
 export LLM_SERVICE_PORT=9000
 export REDIS_URL="redis://${host_ip}:6379"
 export INDEX_NAME="rag-redis"
@@ -296,7 +296,7 @@ curl http://${host_ip}:8000/v1/reranking \
 
 ```bash
 #TGI Service
-curl http://${host_ip}:8008/generate \
+curl http://${host_ip}:8005/generate \
   -X POST \
   -d '{"inputs":"What is Deep Learning?","parameters":{"max_new_tokens":64, "do_sample": true}}' \
   -H 'Content-Type: application/json'
@@ -304,7 +304,7 @@ curl http://${host_ip}:8008/generate \
 
 ```bash
 #vLLM Service
-curl http://${host_ip}:8008/v1/completions \
+curl http://${host_ip}:8007/v1/completions \
   -H "Content-Type: application/json" \
   -d '{
   "model": "${LLM_MODEL_ID}",
@@ -316,7 +316,7 @@ curl http://${host_ip}:8008/v1/completions \
 
 ```bash
 #vLLM-on-Ray Service
-curl http://${host_ip}:8008/v1/chat/completions \
+curl http://${host_ip}:8006/v1/chat/completions \
   -H "Content-Type: application/json" \
   -d '{"model": "${LLM_MODEL_ID}", "messages": [{"role": "user", "content": "What is Deep Learning?"}]}'
 ```
diff --git a/ChatQnA/docker/gaudi/compose.yaml b/ChatQnA/docker/gaudi/compose.yaml
index 362ce18248..82b8d0b77d 100644
--- a/ChatQnA/docker/gaudi/compose.yaml
+++ b/ChatQnA/docker/gaudi/compose.yaml
@@ -114,7 +114,7 @@ services:
     image: ghcr.io/huggingface/tgi-gaudi:2.0.1
     container_name: tgi-gaudi-server
     ports:
-      - "8008:80"
+      - "8005:80"
     volumes:
       - "./data:/data"
     environment:
diff --git a/ChatQnA/docker/gaudi/compose_vllm.yaml b/ChatQnA/docker/gaudi/compose_vllm.yaml
index 9082bff46e..ec82c9f22e 100644
--- a/ChatQnA/docker/gaudi/compose_vllm.yaml
+++ b/ChatQnA/docker/gaudi/compose_vllm.yaml
@@ -112,7 +112,7 @@ services:
     image: opea/llm-vllm-hpu:latest
     container_name: vllm-gaudi-server
     ports:
-      - "8008:80"
+      - "8007:80"
     volumes:
       - "./data:/data"
     environment:
@@ -122,12 +122,12 @@ services:
       HF_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
       HABANA_VISIBLE_DEVICES: all
       OMPI_MCA_btl_vader_single_copy_mechanism: none
-      LLM_MODEL: ${LLM_MODEL_ID}
+      LLM_MODEL_ID: ${LLM_MODEL_ID}
     runtime: habana
     cap_add:
       - SYS_NICE
     ipc: host
-    command: /bin/bash -c "export VLLM_CPU_KVCACHE_SPACE=40 && python3 -m vllm.entrypoints.openai.api_server --enforce-eager --model $LLM_MODEL --tensor-parallel-size 1 --host 0.0.0.0 --port 80"
+    command: /bin/bash -c "export VLLM_CPU_KVCACHE_SPACE=40 && python3 -m vllm.entrypoints.openai.api_server --enforce-eager --model $LLM_MODEL_ID --tensor-parallel-size 1 --host 0.0.0.0 --port 80 --block-size 128 --max-num-seqs 256 --max-seq_len-to-capture 2048"
   llm:
     image: opea/llm-vllm:latest
     container_name: llm-vllm-gaudi-server
diff --git a/ChatQnA/docker/gaudi/compose_vllm_ray.yaml b/ChatQnA/docker/gaudi/compose_vllm_ray.yaml
index d7fa0ca6ef..5d98a16004 100644
--- a/ChatQnA/docker/gaudi/compose_vllm_ray.yaml
+++ b/ChatQnA/docker/gaudi/compose_vllm_ray.yaml
@@ -112,7 +112,7 @@ services:
     image: opea/llm-vllm-ray-hpu:latest
     container_name: vllm-ray-gaudi-server
     ports:
-      - "8008:8000"
+      - "8006:8000"
     volumes:
       - "./data:/data"
     environment:
@@ -122,12 +122,12 @@ services:
       HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
       HABANA_VISIBLE_DEVICES: all
       OMPI_MCA_btl_vader_single_copy_mechanism: none
-      LLM_MODEL: ${LLM_MODEL_ID}
+      LLM_MODEL_ID: ${LLM_MODEL_ID}
     runtime: habana
     cap_add:
       - SYS_NICE
     ipc: host
-    command: /bin/bash -c "ray start --head && python vllm_ray_openai.py --port_number 8000 --model_id_or_path $LLM_MODEL --tensor_parallel_size 2 --enforce_eager True"
+    command: /bin/bash -c "ray start --head && python vllm_ray_openai.py --port_number 8000 --model_id_or_path $LLM_MODEL_ID --tensor_parallel_size 2 --enforce_eager True"
   llm:
     image: opea/llm-vllm-ray:latest
     container_name: llm-vllm-ray-gaudi-server
diff --git a/ChatQnA/tests/test_chatqna_on_gaudi.sh b/ChatQnA/tests/test_chatqna_on_gaudi.sh
index 3a5e7537be..7c25cb0033 100644
--- a/ChatQnA/tests/test_chatqna_on_gaudi.sh
+++ b/ChatQnA/tests/test_chatqna_on_gaudi.sh
@@ -50,7 +50,7 @@ function start_services() {
     export LLM_MODEL_ID="Intel/neural-chat-7b-v3-3"
     export TEI_EMBEDDING_ENDPOINT="http://${ip_address}:8090"
     export TEI_RERANKING_ENDPOINT="http://${ip_address}:8808"
-    export TGI_LLM_ENDPOINT="http://${ip_address}:8008"
+    export TGI_LLM_ENDPOINT="http://${ip_address}:8005"
     export REDIS_URL="redis://${ip_address}:6379"
     export REDIS_HOST=${ip_address}
     export INDEX_NAME="rag-redis"
@@ -215,7 +215,7 @@ function validate_microservices() {
 
     # tgi for llm service
     validate_service \
-        "${ip_address}:8008/generate" \
+        "${ip_address}:8005/generate" \
         "generated_text" \
         "tgi-llm" \
         "tgi-gaudi-server" \
diff --git a/ChatQnA/tests/_test_chatqna_vllm_on_gaudi.sh b/ChatQnA/tests/test_chatqna_vllm_on_gaudi.sh
similarity index 96%
rename from ChatQnA/tests/_test_chatqna_vllm_on_gaudi.sh
rename to ChatQnA/tests/test_chatqna_vllm_on_gaudi.sh
index 716a206785..99e63e06ba 100644
--- a/ChatQnA/tests/_test_chatqna_vllm_on_gaudi.sh
+++ b/ChatQnA/tests/test_chatqna_vllm_on_gaudi.sh
@@ -50,7 +50,8 @@ function start_services() {
     export LLM_MODEL_ID="Intel/neural-chat-7b-v3-3"
     export TEI_EMBEDDING_ENDPOINT="http://${ip_address}:8090"
     export TEI_RERANKING_ENDPOINT="http://${ip_address}:8808"
-    export vLLM_LLM_ENDPOINT="http://${ip_address}:8008"
+    export vLLM_LLM_ENDPOINT="http://${ip_address}:8007"
+    export LLM_SERVICE_PORT=9000
     export REDIS_URL="redis://${ip_address}:6379"
     export INDEX_NAME="rag-redis"
     export HUGGINGFACEHUB_API_TOKEN=${HUGGINGFACEHUB_API_TOKEN}
@@ -79,12 +80,13 @@ function start_services() {
     # Start Docker Containers
     docker compose -f compose_vllm.yaml up -d
     n=0
-    until [[ "$n" -ge 180 ]]; do
+    until [[ "$n" -ge 25 ]]; do
+        echo "n=$n"
         docker logs vllm-gaudi-server > vllm_service_start.log
-        if grep -q Connected vllm_service_start.log; then
+        if grep -q "Warmup finished" vllm_service_start.log; then
             break
         fi
-        sleep 1s
+        sleep 20s
         n=$((n+1))
     done
 }
@@ -165,7 +167,7 @@ function validate_microservices() {
 
     # vllm for llm service
     validate_services \
-        "${ip_address}:8008/v1/completions" \
+        "${ip_address}:8007/v1/completions" \
         "text" \
         "vllm-llm" \
         "vllm-gaudi-server" \
@@ -185,7 +187,7 @@ function validate_megaservice() {
     # Curl the Mega Service
     validate_services \
         "${ip_address}:8888/v1/chatqna" \
-        "billion" \
+        "data:" \
         "mega-chatqna" \
         "chatqna-gaudi-backend-server" \
         '{"messages": "What is the revenue of Nike in 2023?"}'
diff --git a/ChatQnA/tests/_test_chatqna_vllm_on_xeon.sh b/ChatQnA/tests/test_chatqna_vllm_on_xeon.sh
similarity index 96%
rename from ChatQnA/tests/_test_chatqna_vllm_on_xeon.sh
rename to ChatQnA/tests/test_chatqna_vllm_on_xeon.sh
index e92954313b..a424187cd8 100644
--- a/ChatQnA/tests/_test_chatqna_vllm_on_xeon.sh
+++ b/ChatQnA/tests/test_chatqna_vllm_on_xeon.sh
@@ -26,16 +26,15 @@ function build_docker_images() {
     cd $WORKPATH/docker/ui
     docker build --no-cache -t opea/chatqna-ui:latest -f docker/Dockerfile .
 
-#    cd $WORKPATH
-#    git clone https://github.com/vllm-project/vllm.git
-#    cd vllm
-#    docker build --no-cache -t opea/vllm:latest -f Dockerfile.cpu .
+    # cd $WORKPATH
+    # git clone https://github.com/vllm-project/vllm.git
+    # cd vllm
+    # docker build --no-cache -t opea/vllm:latest -f Dockerfile.cpu .
 
     docker images
 }
 
 function start_services() {
-    # build vllm for each test instead of pull from local registry
     cd $WORKPATH
     git clone https://github.com/vllm-project/vllm.git
     cd vllm
@@ -73,18 +72,19 @@ function start_services() {
             sed -i "s#image: opea/chatqna-ui:latest#image: opea/chatqna-ui:${IMAGE_TAG}#g" compose_vllm.yaml
             sed -i "s#image: opea/chatqna-conversation-ui:latest#image: opea/chatqna-conversation-ui:${IMAGE_TAG}#g" compose_vllm.yaml
             sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose_vllm.yaml
+            sed -i "s#image: ${IMAGE_REPO}opea/vllm:latest#image: opea/vllm:latest#g" compose_vllm.yaml
         fi
     fi
 
     # Start Docker Containers
     docker compose -f compose_vllm.yaml up -d
     n=0
-    until [[ "$n" -ge 100 ]]; do
+    until [[ "$n" -ge 10 ]]; do
         docker logs vllm-service > ${LOG_PATH}/vllm_service_start.log
         if grep -q Connected ${LOG_PATH}/vllm_service_start.log; then
             break
         fi
-        sleep 1s
+        sleep 10s
         n=$((n+1))
     done
 }
@@ -185,7 +185,7 @@ function validate_megaservice() {
     # Curl the Mega Service
     validate_services \
         "${ip_address}:8888/v1/chatqna" \
-        "billion" \
+        "data" \
         "mega-chatqna" \
         "chatqna-xeon-backend-server" \
         '{"messages": "What is the revenue of Nike in 2023?"}'
diff --git a/ChatQnA/tests/_test_chatqna_vllm_ray_on_gaudi.sh b/ChatQnA/tests/test_chatqna_vllm_ray_on_gaudi.sh
similarity index 97%
rename from ChatQnA/tests/_test_chatqna_vllm_ray_on_gaudi.sh
rename to ChatQnA/tests/test_chatqna_vllm_ray_on_gaudi.sh
index ab41c3bb80..9099598bb5 100644
--- a/ChatQnA/tests/_test_chatqna_vllm_ray_on_gaudi.sh
+++ b/ChatQnA/tests/test_chatqna_vllm_ray_on_gaudi.sh
@@ -50,7 +50,7 @@ function start_services() {
     export LLM_MODEL_ID="Intel/neural-chat-7b-v3-3"
     export TEI_EMBEDDING_ENDPOINT="http://${ip_address}:8090"
     export TEI_RERANKING_ENDPOINT="http://${ip_address}:8808"
-    export vLLM_RAY_LLM_ENDPOINT="http://${ip_address}:8008"
+    export vLLM_RAY_LLM_ENDPOINT="http://${ip_address}:8006"
     export LLM_SERVICE_PORT=9000
     export REDIS_URL="redis://${ip_address}:6379"
     export INDEX_NAME="rag-redis"
@@ -80,12 +80,13 @@ function start_services() {
     # Start Docker Containers
     docker compose -f compose_vllm_ray.yaml up -d
     n=0
-    until [[ "$n" -ge 400 ]]; do
+    until [[ "$n" -ge 25 ]]; do
+        echo "n=$n"
         docker logs vllm-ray-gaudi-server > vllm_ray_service_start.log
-        if grep -q Connected vllm_ray_service_start.log; then
+        if grep -q "Warmup finished" vllm_ray_service_start.log; then
             break
         fi
-        sleep 1s
+        sleep 20s
         n=$((n+1))
     done
 }
@@ -166,7 +167,7 @@ function validate_microservices() {
 
     # vllm-on-ray for llm service
     validate_services \
-        "${ip_address}:8008/v1/chat/completions" \
+        "${ip_address}:8006/v1/chat/completions" \
         "content" \
         "vllm-ray-llm" \
         "vllm-ray-gaudi-server" \

From 660e40131fd7d6dbd4fda95f2cd0894545f82067 Mon Sep 17 00:00:00 2001
From: Letong Han <106566639+letonghan@users.noreply.github.com>
Date: Wed, 14 Aug 2024 22:31:27 +0800
Subject: [PATCH 35/57] Fix ChatQnA Qdrant CI issues (#569)

Signed-off-by: letonghan <letong.han@intel.com>
Signed-off-by: dmsuehir <dina.s.jones@intel.com>
---
 ChatQnA/docker/xeon/README_qdrant.md          | 107 +++++++-----------
 ChatQnA/docker/xeon/compose_qdrant.yaml       |  38 +++----
 ...xeon.sh => test_chatqna_qdrant_on_xeon.sh} |  98 ++++++++++------
 3 files changed, 116 insertions(+), 127 deletions(-)
 rename ChatQnA/tests/{_test_chatqna_qdrant_on_xeon.sh => test_chatqna_qdrant_on_xeon.sh} (66%)

diff --git a/ChatQnA/docker/xeon/README_qdrant.md b/ChatQnA/docker/xeon/README_qdrant.md
index 4fd3b4e8a1..fd28d306ab 100644
--- a/ChatQnA/docker/xeon/README_qdrant.md
+++ b/ChatQnA/docker/xeon/README_qdrant.md
@@ -20,37 +20,41 @@ qdrant-vector-db
 Port 6333 - Open to 0.0.0.0/0
 Port 6334 - Open to 0.0.0.0/0
 
+dataprep-qdrant-server
+======================
+Port 6043 - Open to 0.0.0.0/0
+
 tei_embedding_service
 =====================
-Port 6006 - Open to 0.0.0.0/0
+Port 6040 - Open to 0.0.0.0/0
 
 embedding
 =========
-Port 6000 - Open to 0.0.0.0/0
+Port 6044 - Open to 0.0.0.0/0
 
 retriever
 =========
-Port 7000 - Open to 0.0.0.0/0
+Port 6045 - Open to 0.0.0.0/0
 
-tei_xeon_service
+tei_reranking_service
 ================
-Port 8808 - Open to 0.0.0.0/0
+Port 6041 - Open to 0.0.0.0/0
 
 reranking
 =========
-Port 8000 - Open to 0.0.0.0/0
+Port 6046 - Open to 0.0.0.0/0
 
 tgi-service
 ===========
-Port 9009 - Open to 0.0.0.0/0
+Port 6042 - Open to 0.0.0.0/0
 
 llm
 ===
-Port 9000 - Open to 0.0.0.0/0
+Port 6047 - Open to 0.0.0.0/0
 
 chaqna-xeon-backend-server
 ==========================
-Port 8888 - Open to 0.0.0.0/0
+Port 8912 - Open to 0.0.0.0/0
 
 chaqna-xeon-ui-server
 =====================
@@ -126,10 +130,9 @@ Build frontend Docker image that enables Conversational experience with ChatQnA
 
 ```bash
 cd GenAIExamples/ChatQnA/docker/ui/
-export BACKEND_SERVICE_ENDPOINT="http://${host_ip}:8888/v1/chatqna"
-export DATAPREP_SERVICE_ENDPOINT="http://${host_ip}:6007/v1/dataprep"
-export DATAPREP_GET_FILE_ENDPOINT="http://${host_ip}:6008/v1/dataprep/get_file"
-docker build --no-cache -t opea/chatqna-conversation-ui:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy --build-arg BACKEND_SERVICE_ENDPOINT=$BACKEND_SERVICE_ENDPOINT --build-arg DATAPREP_SERVICE_ENDPOINT=$DATAPREP_SERVICE_ENDPOINT --build-arg DATAPREP_GET_FILE_ENDPOINT=$DATAPREP_GET_FILE_ENDPOINT -f ./docker/Dockerfile.react .
+export BACKEND_SERVICE_ENDPOINT="http://${host_ip}:8912/v1/chatqna"
+export DATAPREP_SERVICE_ENDPOINT="http://${host_ip}:6043/v1/dataprep"
+docker build --no-cache -t opea/chatqna-conversation-ui:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy --build-arg BACKEND_SERVICE_ENDPOINT=$BACKEND_SERVICE_ENDPOINT --build-arg DATAPREP_SERVICE_ENDPOINT=$DATAPREP_SERVICE_ENDPOINT -f ./docker/Dockerfile.react .
 cd ../../../..
 ```
 
@@ -178,9 +181,9 @@ export https_proxy=${your_http_proxy}
 export EMBEDDING_MODEL_ID="BAAI/bge-base-en-v1.5"
 export RERANK_MODEL_ID="BAAI/bge-reranker-base"
 export LLM_MODEL_ID="Intel/neural-chat-7b-v3-3"
-export TEI_EMBEDDING_ENDPOINT="http://${host_ip}:6006"
-export TEI_RERANKING_ENDPOINT="http://${host_ip}:8808"
-export TGI_LLM_ENDPOINT="http://${host_ip}:9009"
+export TEI_EMBEDDING_ENDPOINT="http://${host_ip}:6040"
+export TEI_RERANKING_ENDPOINT="http://${host_ip}:6041"
+export TGI_LLM_ENDPOINT="http://${host_ip}:6042"
 export QDRANT_HOST=${host_ip}
 export QDRANT_PORT=6333
 export INDEX_NAME="rag-qdrant"
@@ -190,10 +193,8 @@ export EMBEDDING_SERVICE_HOST_IP=${host_ip}
 export RETRIEVER_SERVICE_HOST_IP=${host_ip}
 export RERANK_SERVICE_HOST_IP=${host_ip}
 export LLM_SERVICE_HOST_IP=${host_ip}
-export BACKEND_SERVICE_ENDPOINT="http://${host_ip}:8888/v1/chatqna"
-export DATAPREP_SERVICE_ENDPOINT="http://${host_ip}:6007/v1/dataprep"
-export DATAPREP_GET_FILE_ENDPOINT="http://${host_ip}:6008/v1/dataprep/get_file"
-export DATAPREP_DELETE_FILE_ENDPOINT="http://${host_ip}:6009/v1/dataprep/delete_file"
+export BACKEND_SERVICE_ENDPOINT="http://${host_ip}:8912/v1/chatqna"
+export DATAPREP_SERVICE_ENDPOINT="http://${host_ip}:6043/v1/dataprep"
 ```
 
 Note: Please replace with `host_ip` with you external IP address, do not use localhost.
@@ -204,7 +205,7 @@ Note: Please replace with `host_ip` with you external IP address, do not use loc
 
 ```bash
 cd GenAIExamples/ChatQnA/docker/xeon/
-docker compose up -d
+docker compose -f compose_qdrant.yaml up -d
 ```
 
 ### Validate Microservices
@@ -212,7 +213,7 @@ docker compose up -d
 1. TEI Embedding Service
 
 ```bash
-curl ${host_ip}:6006/embed \
+curl ${host_ip}:6040/embed \
     -X POST \
     -d '{"inputs":"What is Deep Learning?"}' \
     -H 'Content-Type: application/json'
@@ -221,25 +222,23 @@ curl ${host_ip}:6006/embed \
 2. Embedding Microservice
 
 ```bash
-curl http://${host_ip}:6000/v1/embeddings\
+curl http://${host_ip}:6044/v1/embeddings\
   -X POST \
   -d '{"text":"hello"}' \
   -H 'Content-Type: application/json'
 ```
 
-3. Retriever Microservice  
-   To validate the retriever microservice, you need to generate a mock embedding vector of length 768 in Python script:
+3. Retriever Microservice
 
-```Python
-import random
-embedding = [random.uniform(-1, 1) for _ in range(768)]
-print(embedding)
-```
+To consume the retriever microservice, you need to generate a mock embedding vector by Python script. The length of embedding vector
+is determined by the embedding model.
+Here we use the model `EMBEDDING_MODEL_ID="BAAI/bge-base-en-v1.5"`, which vector size is 768.
 
-Then substitute your mock embedding vector for the `${your_embedding}` in the following cURL command:
+Check the vecotor dimension of your embedding model, set `your_embedding` dimension equals to it.
 
 ```bash
-curl http://${host_ip}:7000/v1/retrieval \
+export your_embedding=$(python3 -c "import random; embedding = [random.uniform(-1, 1) for _ in range(768)]; print(embedding)")
+curl http://${host_ip}:6045/v1/retrieval \
   -X POST \
   -d '{"text":"What is the revenue of Nike in 2023?","embedding":"'"${your_embedding}"'"}' \
   -H 'Content-Type: application/json'
@@ -248,7 +247,7 @@ curl http://${host_ip}:7000/v1/retrieval \
 4. TEI Reranking Service
 
 ```bash
-curl http://${host_ip}:8808/rerank \
+curl http://${host_ip}:6041/rerank \
     -X POST \
     -d '{"query":"What is Deep Learning?", "texts": ["Deep Learning is not...", "Deep learning is..."]}' \
     -H 'Content-Type: application/json'
@@ -257,7 +256,7 @@ curl http://${host_ip}:8808/rerank \
 5. Reranking Microservice
 
 ```bash
-curl http://${host_ip}:8000/v1/reranking\
+curl http://${host_ip}:6046/v1/reranking\
   -X POST \
   -d '{"initial_query":"What is Deep Learning?", "retrieved_docs": [{"text":"Deep Learning is not..."}, {"text":"Deep learning is..."}]}' \
   -H 'Content-Type: application/json'
@@ -266,7 +265,7 @@ curl http://${host_ip}:8000/v1/reranking\
 6. TGI Service
 
 ```bash
-curl http://${host_ip}:9009/generate \
+curl http://${host_ip}:6042/generate \
   -X POST \
   -d '{"inputs":"What is Deep Learning?","parameters":{"max_new_tokens":17, "do_sample": true}}' \
   -H 'Content-Type: application/json'
@@ -275,7 +274,7 @@ curl http://${host_ip}:9009/generate \
 7. LLM Microservice
 
 ```bash
-curl http://${host_ip}:9000/v1/chat/completions\
+curl http://${host_ip}:6047/v1/chat/completions\
   -X POST \
   -d '{"query":"What is Deep Learning?","max_new_tokens":17,"top_k":10,"top_p":0.95,"typical_p":0.95,"temperature":0.01,"repetition_penalty":1.03,"streaming":true}' \
   -H 'Content-Type: application/json'
@@ -284,7 +283,7 @@ curl http://${host_ip}:9000/v1/chat/completions\
 8. MegaService
 
 ```bash
-curl http://${host_ip}:8888/v1/chatqna -H "Content-Type: application/json" -d '{
+curl http://${host_ip}:8912/v1/chatqna -H "Content-Type: application/json" -d '{
      "messages": "What is the revenue of Nike in 2023?"
      }'
 ```
@@ -296,9 +295,9 @@ If you want to update the default knowledge base, you can use the following comm
 Update Knowledge Base via Local File Upload:
 
 ```bash
-curl -X POST "http://${host_ip}:6007/v1/dataprep" \
+curl -X POST "http://${host_ip}:6043/v1/dataprep" \
      -H "Content-Type: multipart/form-data" \
-     -F "files=@./nke-10k-2023.pdf"
+     -F "files=@./your_file.pdf"
 ```
 
 This command updates a knowledge base by uploading a local file for processing. Update the file path according to your environment.
@@ -306,39 +305,11 @@ This command updates a knowledge base by uploading a local file for processing.
 Add Knowledge Base via HTTP Links:
 
 ```bash
-curl -X POST "http://${host_ip}:6007/v1/dataprep" \
+curl -X POST "http://${host_ip}:6043/v1/dataprep" \
      -H "Content-Type: multipart/form-data" \
      -F 'link_list=["https://opea.dev"]'
 ```
 
-This command updates a knowledge base by submitting a list of HTTP links for processing.
-
-Also, you are able to get the file list that you uploaded:
-
-```bash
-curl -X POST "http://${host_ip}:6008/v1/dataprep/get_file" \
-     -H "Content-Type: application/json"
-```
-
-To delete the file/link you uploaded:
-
-```bash
-# delete link
-curl -X POST "http://${host_ip}:6009/v1/dataprep/delete_file" \
-     -d '{"file_path": "https://opea.dev"}' \
-     -H "Content-Type: application/json"
-
-# delete file
-curl -X POST "http://${host_ip}:6009/v1/dataprep/delete_file" \
-     -d '{"file_path": "nke-10k-2023.pdf"}' \
-     -H "Content-Type: application/json"
-
-# delete all uploaded files and links
-curl -X POST "http://${host_ip}:6009/v1/dataprep/delete_file" \
-     -d '{"file_path": "all"}' \
-     -H "Content-Type: application/json"
-```
-
 ## 🚀 Launch the UI
 
 To access the frontend, open the following URL in your browser: http://{host_ip}:5173. By default, the UI runs on port 5173 internally. If you prefer to use a different host port to access the frontend, you can modify the port mapping in the `compose.yaml` file as shown below:
diff --git a/ChatQnA/docker/xeon/compose_qdrant.yaml b/ChatQnA/docker/xeon/compose_qdrant.yaml
index d3573d248b..b64dced553 100644
--- a/ChatQnA/docker/xeon/compose_qdrant.yaml
+++ b/ChatQnA/docker/xeon/compose_qdrant.yaml
@@ -18,21 +18,21 @@ services:
       - qdrant-vector-db
       - tei-embedding-service
     ports:
-      - "6000:6000"
+      - "6043:6007"
     environment:
       no_proxy: ${no_proxy}
       http_proxy: ${http_proxy}
       https_proxy: ${https_proxy}
-      QDRANT: ${host_ip}
+      QDRANT_HOST: ${QDRANT_HOST}
       QDRANT_PORT: 6333
       COLLECTION_NAME: ${INDEX_NAME}
       TEI_ENDPOINT: ${TEI_EMBEDDING_ENDPOINT}
       HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
   tei-embedding-service:
-    image: ghcr.io/huggingface/text-embeddings-inference:cpu-1.2
+    image: ghcr.io/huggingface/text-embeddings-inference:cpu-1.5
     container_name: tei-embedding-server
     ports:
-      - "6006:80"
+      - "6040:80"
     volumes:
       - "./data:/data"
     shm_size: 1g
@@ -47,16 +47,13 @@ services:
     depends_on:
       - tei-embedding-service
     ports:
-      - "6000:6000"
+      - "6044:6000"
     ipc: host
     environment:
       no_proxy: ${no_proxy}
       http_proxy: ${http_proxy}
       https_proxy: ${https_proxy}
       TEI_EMBEDDING_ENDPOINT: ${TEI_EMBEDDING_ENDPOINT}
-      LANGCHAIN_API_KEY: ${LANGCHAIN_API_KEY}
-      LANGCHAIN_TRACING_V2: ${LANGCHAIN_TRACING_V2}
-      LANGCHAIN_PROJECT: "opea-embedding-service"
     restart: unless-stopped
   retriever:
     image: opea/retriever-qdrant:latest
@@ -64,22 +61,21 @@ services:
     depends_on:
       - qdrant-vector-db
     ports:
-      - "7000:7000"
+      - "6045:7000"
     ipc: host
     environment:
       no_proxy: ${no_proxy}
       http_proxy: ${http_proxy}
       https_proxy: ${https_proxy}
-      QDRANT_HOST: ${host_ip}
+      QDRANT_HOST: ${QDRANT_HOST}
       QDRANT_PORT: 6333
       INDEX_NAME: ${INDEX_NAME}
-      TEI_EMBEDDING_ENDPOINT: ${TEI_EMBEDDING_ENDPOINT}
     restart: unless-stopped
   tei-reranking-service:
     image: ghcr.io/huggingface/text-embeddings-inference:cpu-1.2
     container_name: tei-reranking-server
     ports:
-      - "8808:80"
+      - "6041:80"
     volumes:
       - "./data:/data"
     shm_size: 1g
@@ -97,7 +93,7 @@ services:
     depends_on:
       - tei-reranking-service
     ports:
-      - "8000:8000"
+      - "6046:8000"
     ipc: host
     environment:
       no_proxy: ${no_proxy}
@@ -107,15 +103,12 @@ services:
       HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
       HF_HUB_DISABLE_PROGRESS_BARS: 1
       HF_HUB_ENABLE_HF_TRANSFER: 0
-      LANGCHAIN_API_KEY: ${LANGCHAIN_API_KEY}
-      LANGCHAIN_TRACING_V2: ${LANGCHAIN_TRACING_V2}
-      LANGCHAIN_PROJECT: "opea-reranking-service"
     restart: unless-stopped
   tgi-service:
     image: ghcr.io/huggingface/text-generation-inference:2.1.0
     container_name: tgi-service
     ports:
-      - "9009:80"
+      - "6042:80"
     volumes:
       - "./data:/data"
     shm_size: 1g
@@ -133,7 +126,7 @@ services:
     depends_on:
       - tgi-service
     ports:
-      - "9000:9000"
+      - "6047:9000"
     ipc: host
     environment:
       no_proxy: ${no_proxy}
@@ -143,9 +136,6 @@ services:
       HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
       HF_HUB_DISABLE_PROGRESS_BARS: 1
       HF_HUB_ENABLE_HF_TRANSFER: 0
-      LANGCHAIN_API_KEY: ${LANGCHAIN_API_KEY}
-      LANGCHAIN_TRACING_V2: ${LANGCHAIN_TRACING_V2}
-      LANGCHAIN_PROJECT: "opea-llm-service"
     restart: unless-stopped
   chaqna-xeon-backend-server:
     image: opea/chatqna:latest
@@ -160,16 +150,20 @@ services:
       - tgi-service
       - llm
     ports:
-      - "8888:8888"
+      - "8912:8888"
     environment:
       - no_proxy=${no_proxy}
       - https_proxy=${https_proxy}
       - http_proxy=${http_proxy}
       - MEGA_SERVICE_HOST_IP=${MEGA_SERVICE_HOST_IP}
       - EMBEDDING_SERVICE_HOST_IP=${EMBEDDING_SERVICE_HOST_IP}
+      - EMBEDDING_SERVICE_PORT=${EMBEDDING_SERVICE_PORT}
       - RETRIEVER_SERVICE_HOST_IP=${RETRIEVER_SERVICE_HOST_IP}
+      - RETRIEVER_SERVICE_PORT=${RETRIEVER_SERVICE_PORT}
       - RERANK_SERVICE_HOST_IP=${RERANK_SERVICE_HOST_IP}
+      - RERANK_SERVICE_PORT=${RERANK_SERVICE_PORT}
       - LLM_SERVICE_HOST_IP=${LLM_SERVICE_HOST_IP}
+      - LLM_SERVICE_PORT=${LLM_SERVICE_PORT}
     ipc: host
     restart: always
   chaqna-xeon-ui-server:
diff --git a/ChatQnA/tests/_test_chatqna_qdrant_on_xeon.sh b/ChatQnA/tests/test_chatqna_qdrant_on_xeon.sh
similarity index 66%
rename from ChatQnA/tests/_test_chatqna_qdrant_on_xeon.sh
rename to ChatQnA/tests/test_chatqna_qdrant_on_xeon.sh
index f2d0f0e37d..774a6bfb6c 100644
--- a/ChatQnA/tests/_test_chatqna_qdrant_on_xeon.sh
+++ b/ChatQnA/tests/test_chatqna_qdrant_on_xeon.sh
@@ -35,9 +35,9 @@ function start_services() {
     export EMBEDDING_MODEL_ID="BAAI/bge-base-en-v1.5"
     export RERANK_MODEL_ID="BAAI/bge-reranker-base"
     export LLM_MODEL_ID="Intel/neural-chat-7b-v3-3"
-    export TEI_EMBEDDING_ENDPOINT="http://${ip_address}:6006"
-    export TEI_RERANKING_ENDPOINT="http://${ip_address}:8808"
-    export TGI_LLM_ENDPOINT="http://${ip_address}:9009"
+    export TEI_EMBEDDING_ENDPOINT="http://${ip_address}:6040"
+    export TEI_RERANKING_ENDPOINT="http://${ip_address}:6041"
+    export TGI_LLM_ENDPOINT="http://${ip_address}:6042"
     export QDRANT_HOST=${ip_address}
     export QDRANT_PORT=6333
     export INDEX_NAME="rag-qdrant"
@@ -47,8 +47,12 @@ function start_services() {
     export RETRIEVER_SERVICE_HOST_IP=${ip_address}
     export RERANK_SERVICE_HOST_IP=${ip_address}
     export LLM_SERVICE_HOST_IP=${ip_address}
-    export BACKEND_SERVICE_ENDPOINT="http://${ip_address}:8888/v1/chatqna"
-    export DATAPREP_SERVICE_ENDPOINT="http://${ip_address}:6007/v1/dataprep"
+    export EMBEDDING_SERVICE_PORT=6044
+    export RETRIEVER_SERVICE_PORT=6045
+    export RERANK_SERVICE_PORT=6046
+    export LLM_SERVICE_PORT=6047
+    export BACKEND_SERVICE_ENDPOINT="http://${ip_address}:8912/v1/chatqna"
+    export DATAPREP_SERVICE_ENDPOINT="http://${ip_address}:6043/v1/dataprep"
 
     sed -i "s/backend_address/$ip_address/g" $WORKPATH/docker/ui/svelte/.env
 
@@ -82,24 +86,34 @@ function validate_services() {
     local DOCKER_NAME="$4"
     local INPUT_DATA="$5"
 
-    local HTTP_STATUS=$(curl -s -o /dev/null -w "%{http_code}" -X POST -d "$INPUT_DATA" -H 'Content-Type: application/json' "$URL")
-    if [ "$HTTP_STATUS" -eq 200 ]; then
-        echo "[ $SERVICE_NAME ] HTTP status is 200. Checking content..."
+    if [[ $SERVICE_NAME == *"dataprep_upload_file"* ]]; then
+        cd $LOG_PATH
+        HTTP_RESPONSE=$(curl --silent --write-out "HTTPSTATUS:%{http_code}" -X POST -F 'files=@./dataprep_file.txt' -H 'Content-Type: multipart/form-data' "$URL")
+    elif [[ $SERVICE_NAME == *"dataprep_upload_link"* ]]; then
+        HTTP_RESPONSE=$(curl --silent --write-out "HTTPSTATUS:%{http_code}" -X POST -F 'link_list=["https://www.ces.tech/"]' "$URL")
+    else
+        HTTP_RESPONSE=$(curl --silent --write-out "HTTPSTATUS:%{http_code}" -X POST -d "$INPUT_DATA" -H 'Content-Type: application/json' "$URL")
+    fi
+    HTTP_STATUS=$(echo $HTTP_RESPONSE | tr -d '\n' | sed -e 's/.*HTTPSTATUS://')
+    RESPONSE_BODY=$(echo $HTTP_RESPONSE | sed -e 's/HTTPSTATUS\:.*//g')
 
-        local CONTENT=$(curl -s -X POST -d "$INPUT_DATA" -H 'Content-Type: application/json' "$URL" | tee ${LOG_PATH}/${SERVICE_NAME}.log)
+    docker logs ${DOCKER_NAME} >> ${LOG_PATH}/${SERVICE_NAME}.log
 
-        if echo "$CONTENT" | grep -q "$EXPECTED_RESULT"; then
-            echo "[ $SERVICE_NAME ] Content is as expected."
-        else
-            echo "[ $SERVICE_NAME ] Content does not match the expected result: $CONTENT"
-            docker logs ${DOCKER_NAME} >> ${LOG_PATH}/${SERVICE_NAME}.log
-            exit 1
-        fi
-    else
+    # check response status
+    if [ "$HTTP_STATUS" -ne "200" ]; then
         echo "[ $SERVICE_NAME ] HTTP status is not 200. Received status was $HTTP_STATUS"
-        docker logs ${DOCKER_NAME} >> ${LOG_PATH}/${SERVICE_NAME}.log
         exit 1
+    else
+        echo "[ $SERVICE_NAME ] HTTP status is 200. Checking content..."
     fi
+    # check response body
+    if [[ "$RESPONSE_BODY" != *"$EXPECTED_RESULT"* ]]; then
+        echo "[ $SERVICE_NAME ] Content does not match the expected result: $RESPONSE_BODY"
+        exit 1
+    else
+        echo "[ $SERVICE_NAME ] Content is as expected."
+    fi
+
     sleep 1s
 }
 
@@ -108,34 +122,47 @@ function validate_microservices() {
 
     # tei for embedding service
     validate_services \
-        "${ip_address}:6006/embed" \
-        "\[\[" \
+        "${ip_address}:6040/embed" \
+        "[[" \
         "tei-embedding" \
         "tei-embedding-server" \
         '{"inputs":"What is Deep Learning?"}'
 
     # embedding microservice
     validate_services \
-        "${ip_address}:6000/v1/embeddings" \
-        '"text":"What is Deep Learning?","embedding":\[' \
+        "${ip_address}:6044/v1/embeddings" \
+        '"text":"What is Deep Learning?","embedding":[' \
         "embedding" \
         "embedding-tei-server" \
         '{"text":"What is Deep Learning?"}'
 
-    sleep 1m # retrieval can't curl as expected, try to wait for more time
+    # test /v1/dataprep upload file
+    echo "Deep learning is a subset of machine learning that utilizes neural networks with multiple layers to analyze various levels of abstract data representations. It enables computers to identify patterns and make decisions with minimal human intervention by learning from large amounts of data." > $LOG_PATH/dataprep_file.txt
+    validate_services \
+        "${ip_address}:6043/v1/dataprep" \
+        "Data preparation succeeded" \
+        "dataprep_upload_file" \
+        "dataprep-qdrant-server"
+
+    # test upload link
+    validate_services \
+        "${ip_address}:6043/v1/dataprep" \
+        "Data preparation succeeded" \
+        "dataprep_upload_link" \
+        "dataprep-qdrant-server"
 
     # retrieval microservice
     test_embedding=$(python3 -c "import random; embedding = [random.uniform(-1, 1) for _ in range(768)]; print(embedding)")
     validate_services \
-        "${ip_address}:7000/v1/retrieval" \
-        " " \
+        "${ip_address}:6045/v1/retrieval" \
+        "retrieved_docs" \
         "retrieval" \
         "retriever-qdrant-server" \
-        "{\"text\":\"What is the revenue of Nike in 2023?\",\"embedding\":${test_embedding}}"
+        "{\"text\":\"What is Deep Learning?\",\"embedding\":${test_embedding}}"
 
     # tei for rerank microservice
     validate_services \
-        "${ip_address}:8808/rerank" \
+        "${ip_address}:6041/rerank" \
         '{"index":1,"score":' \
         "tei-rerank" \
         "tei-reranking-server" \
@@ -143,7 +170,7 @@ function validate_microservices() {
 
     # rerank microservice
     validate_services \
-        "${ip_address}:8000/v1/reranking" \
+        "${ip_address}:6046/v1/reranking" \
         "Deep learning is..." \
         "rerank" \
         "reranking-tei-xeon-server" \
@@ -151,7 +178,7 @@ function validate_microservices() {
 
     # tgi for llm service
     validate_services \
-        "${ip_address}:9009/generate" \
+        "${ip_address}:6042/generate" \
         "generated_text" \
         "tgi-llm" \
         "tgi-service" \
@@ -159,19 +186,19 @@ function validate_microservices() {
 
     # llm microservice
     validate_services \
-        "${ip_address}:9000/v1/chat/completions" \
+        "${ip_address}:6047/v1/chat/completions" \
         "data: " \
         "llm" \
         "llm-tgi-server" \
-        '{"query":"What is Deep Learning?"}'
+        '{"query":"Deep Learning"}'
 
 }
 
 function validate_megaservice() {
     # Curl the Mega Service
     validate_services \
-        "${ip_address}:8888/v1/chatqna" \
-        "billion" \
+        "${ip_address}:8912/v1/chatqna" \
+        "data: " \
         "mega-chatqna" \
         "chatqna-xeon-backend-server" \
         '{"messages": "What is the revenue of Nike in 2023?"}'
@@ -182,13 +209,10 @@ function validate_frontend() {
     cd $WORKPATH/docker/ui/svelte
     local conda_env_name="OPEA_e2e"
     export PATH=${HOME}/miniforge3/bin/:$PATH
-#    conda remove -n ${conda_env_name} --all -y
-#    conda create -n ${conda_env_name} python=3.12 -y
     source activate ${conda_env_name}
 
     sed -i "s/localhost/$ip_address/g" playwright.config.ts
 
-#    conda install -c conda-forge nodejs -y
     npm install && npm ci && npx playwright install --with-deps
     node -v && npm -v && pip list
 
@@ -205,7 +229,7 @@ function validate_frontend() {
 
 function stop_docker() {
     cd $WORKPATH/docker/xeon
-    docker compose stop && docker compose rm -f
+    docker compose -f compose_qdrant.yaml stop && docker compose -f compose_qdrant.yaml rm -f
 }
 
 function main() {

From 4f832748a1a15790b3db1570fed954be76b7ad09 Mon Sep 17 00:00:00 2001
From: dmsuehir <dina.s.jones@intel.com>
Date: Wed, 14 Aug 2024 13:55:25 -0700
Subject: [PATCH 36/57] Fix the CodeGen Kubernetes ConfigMap 'nil' proxy var
 error

Signed-off-by: dmsuehir <dina.s.jones@intel.com>
---
 CodeGen/kubernetes/manifests/README.md         |  5 +++--
 CodeGen/kubernetes/manifests/xeon/codegen.yaml | 12 ++++++------
 2 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/CodeGen/kubernetes/manifests/README.md b/CodeGen/kubernetes/manifests/README.md
index f6a0763726..1fc3db5105 100644
--- a/CodeGen/kubernetes/manifests/README.md
+++ b/CodeGen/kubernetes/manifests/README.md
@@ -6,7 +6,7 @@
 
 > You can also customize the "MODEL_ID" if needed.
 
-> You need to make sure you have created the directory `/mnt/opea-models` to save the cached model on the node where the CodeGEn workload is running. Otherwise, you need to modify the `codegen.yaml` file to change the `model-volume` to a directory that exists on the node.
+> You need to make sure you have created the directory `/mnt/opea-models` to save the cached model on the node where the CodeGen workload is running. Otherwise, you need to modify the `codegen.yaml` file to change the `model-volume` to a directory that exists on the node.
 
 ## Deploy On Xeon
 
@@ -30,7 +30,7 @@ kubectl apply -f codegen.yaml
 
 To verify the installation, run the command `kubectl get pod` to make sure all pods are running.
 
-Then run the command `kubectl port-forward svc/codegen 7778:7778` to expose the CodeGEn service for access.
+Then run the command `kubectl port-forward svc/codegen 7778:7778` to expose the CodeGen service for access.
 
 Open another terminal and run the following command to verify the service if working:
 
@@ -40,3 +40,4 @@ curl http://localhost:7778/v1/codegen -H "Content-Type: application/json" -d '{
      "messages": "Implement a high-level API for a TODO list application. The API takes as input an operation request and updates the TODO list in place. If the request is invalid, raise an exception."
      }'
 ```
+
diff --git a/CodeGen/kubernetes/manifests/xeon/codegen.yaml b/CodeGen/kubernetes/manifests/xeon/codegen.yaml
index 06b8a75445..9edadc88c0 100644
--- a/CodeGen/kubernetes/manifests/xeon/codegen.yaml
+++ b/CodeGen/kubernetes/manifests/xeon/codegen.yaml
@@ -17,9 +17,9 @@ data:
   TGI_LLM_ENDPOINT: "http://codegen-tgi"
   HUGGINGFACEHUB_API_TOKEN: "insert-your-huggingface-token-here"
   HF_HOME: "/tmp/.cache/huggingface"
-  http_proxy:
-  https_proxy:
-  no_proxy:
+  http_proxy: ""
+  https_proxy: ""
+  no_proxy: ""
   LANGCHAIN_TRACING_V2: "false"
   LANGCHAIN_API_KEY: insert-your-langchain-key-here
   LANGCHAIN_PROJECT: "opea-llm-uservice"
@@ -45,9 +45,9 @@ data:
   HF_TOKEN: "insert-your-huggingface-token-here"
   MAX_INPUT_TOKENS: "1024"
   MAX_TOTAL_TOKENS: "4096"
-  http_proxy:
-  https_proxy:
-  no_proxy:
+  http_proxy: ""
+  https_proxy: ""
+  no_proxy: ""
   HABANA_LOGS: "/tmp/habana_logs"
   NUMBA_CACHE_DIR: "/tmp"
   TRANSFORMERS_CACHE: "/tmp/transformers_cache"

From 218c95e249defcbc3026d6b538afb245567ea5d8 Mon Sep 17 00:00:00 2001
From: dmsuehir <dina.s.jones@intel.com>
Date: Wed, 14 Aug 2024 14:48:07 -0700
Subject: [PATCH 37/57] Updates after running on Gaudi to add
 hugepages-2Mi/memory resources

Signed-off-by: dmsuehir <dina.s.jones@intel.com>
---
 CodeGen/kubernetes/manifests/README.md          |  4 ++++
 CodeGen/kubernetes/manifests/gaudi/codegen.yaml | 14 ++++++++------
 2 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/CodeGen/kubernetes/manifests/README.md b/CodeGen/kubernetes/manifests/README.md
index 1fc3db5105..a2cf126397 100644
--- a/CodeGen/kubernetes/manifests/README.md
+++ b/CodeGen/kubernetes/manifests/README.md
@@ -7,6 +7,7 @@
 > You can also customize the "MODEL_ID" if needed.
 
 > You need to make sure you have created the directory `/mnt/opea-models` to save the cached model on the node where the CodeGen workload is running. Otherwise, you need to modify the `codegen.yaml` file to change the `model-volume` to a directory that exists on the node.
+> Alternatively, you can change the `codegen.yaml` to use a different type of volume, such as a persistent volume claim.
 
 ## Deploy On Xeon
 
@@ -34,6 +35,9 @@ Then run the command `kubectl port-forward svc/codegen 7778:7778` to expose the
 
 Open another terminal and run the following command to verify the service if working:
 
+> Note that it may take a couple of minutes for the service to be ready. If the `curl` command below fails, you
+> can check the logs of the codegen-tgi pod to see it's status or check for errors.
+
 ```
 kubectl get pods
 curl http://localhost:7778/v1/codegen -H "Content-Type: application/json" -d '{
diff --git a/CodeGen/kubernetes/manifests/gaudi/codegen.yaml b/CodeGen/kubernetes/manifests/gaudi/codegen.yaml
index 810c90f360..1471faf131 100644
--- a/CodeGen/kubernetes/manifests/gaudi/codegen.yaml
+++ b/CodeGen/kubernetes/manifests/gaudi/codegen.yaml
@@ -17,9 +17,9 @@ data:
   TGI_LLM_ENDPOINT: "http://codegen-tgi"
   HUGGINGFACEHUB_API_TOKEN: "insert-your-huggingface-token-here"
   HF_HOME: "/tmp/.cache/huggingface"
-  http_proxy:
-  https_proxy:
-  no_proxy:
+  http_proxy: ""
+  https_proxy: ""
+  no_proxy: ""
   LANGCHAIN_TRACING_V2: "false"
   LANGCHAIN_API_KEY: insert-your-langchain-key-here
   LANGCHAIN_PROJECT: "opea-llm-uservice"
@@ -45,9 +45,9 @@ data:
   HF_TOKEN: "insert-your-huggingface-token-here"
   MAX_INPUT_TOKENS: "1024"
   MAX_TOTAL_TOKENS: "4096"
-  http_proxy:
-  https_proxy:
-  no_proxy:
+  http_proxy: ""
+  https_proxy: ""
+  no_proxy: ""
   HABANA_LOGS: "/tmp/habana_logs"
   NUMBA_CACHE_DIR: "/tmp"
   TRANSFORMERS_CACHE: "/tmp/transformers_cache"
@@ -243,6 +243,8 @@ spec:
           resources:
             limits:
               habana.ai/gaudi: 1
+              memory: 64Gi
+              hugepages-2Mi: 4400Mi
       volumes:
         - name: model-volume
           hostPath:

From a99f7e6e169c3952fccfa3bd67f831f83d8247ef Mon Sep 17 00:00:00 2001
From: dmsuehir <dina.s.jones@intel.com>
Date: Wed, 14 Aug 2024 14:50:37 -0700
Subject: [PATCH 38/57] Fix typo

Signed-off-by: dmsuehir <dina.s.jones@intel.com>
---
 CodeGen/kubernetes/manifests/README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/CodeGen/kubernetes/manifests/README.md b/CodeGen/kubernetes/manifests/README.md
index a2cf126397..dbda67429b 100644
--- a/CodeGen/kubernetes/manifests/README.md
+++ b/CodeGen/kubernetes/manifests/README.md
@@ -36,7 +36,7 @@ Then run the command `kubectl port-forward svc/codegen 7778:7778` to expose the
 Open another terminal and run the following command to verify the service if working:
 
 > Note that it may take a couple of minutes for the service to be ready. If the `curl` command below fails, you
-> can check the logs of the codegen-tgi pod to see it's status or check for errors.
+> can check the logs of the codegen-tgi pod to see its status or check for errors.
 
 ```
 kubectl get pods

From 4006b7dba3813d9a8e325f63d3c27e702c7aeeca Mon Sep 17 00:00:00 2001
From: dmsuehir <dina.s.jones@intel.com>
Date: Wed, 14 Aug 2024 14:52:30 -0700
Subject: [PATCH 39/57] Removing blank line

Signed-off-by: dmsuehir <dina.s.jones@intel.com>
---
 CodeGen/kubernetes/manifests/README.md | 1 -
 1 file changed, 1 deletion(-)

diff --git a/CodeGen/kubernetes/manifests/README.md b/CodeGen/kubernetes/manifests/README.md
index dbda67429b..4e0a0e0b69 100644
--- a/CodeGen/kubernetes/manifests/README.md
+++ b/CodeGen/kubernetes/manifests/README.md
@@ -44,4 +44,3 @@ curl http://localhost:7778/v1/codegen -H "Content-Type: application/json" -d '{
      "messages": "Implement a high-level API for a TODO list application. The API takes as input an operation request and updates the TODO list in place. If the request is invalid, raise an exception."
      }'
 ```
-

From 9c45ee5ef40021eccf0a7f397c785a1c168388d6 Mon Sep 17 00:00:00 2001
From: "chen, suyue" <suyue.chen@intel.com>
Date: Thu, 15 Aug 2024 22:39:21 +0800
Subject: [PATCH 40/57] Enhance CI/CD infrastructure (#593)

Signed-off-by: chensuyue <suyue.chen@intel.com>
Signed-off-by: Sun, Xuehao <xuehao.sun@intel.com>
Signed-off-by: dmsuehir <dina.s.jones@intel.com>
---
 .github/workflows/_example-workflow.yml       |  77 +++++++------
 .github/workflows/_run-docker-compose.yml     |   3 +-
 .github/workflows/manual-cd-workflow.yml      |  31 +++--
 .github/workflows/pr-docker-compose-e2e.yml   |  21 +---
 AudioQnA/docker/docker_build_compose.yaml     |  54 +++++++++
 AudioQnA/docker/gaudi/compose.yaml            |  15 +--
 AudioQnA/docker/xeon/compose.yaml             |  15 +--
 AudioQnA/tests/test_audioqna_on_gaudi.sh      |  50 ++++----
 AudioQnA/tests/test_audioqna_on_xeon.sh       |  37 ++----
 ChatQnA/docker/aipc/compose.yaml              |  16 ++-
 ChatQnA/docker/docker_build_compose.yaml      | 108 ++++++++++++++++++
 ChatQnA/docker/gaudi/compose.yaml             |  19 ++-
 ChatQnA/docker/gaudi/compose_guardrails.yaml  |  21 ++--
 ChatQnA/docker/gaudi/compose_vllm.yaml        |  21 ++--
 ChatQnA/docker/gaudi/compose_vllm_ray.yaml    |  21 ++--
 ChatQnA/docker/gpu/compose.yaml               |  17 ++-
 ChatQnA/docker/xeon/compose.yaml              |  17 ++-
 ChatQnA/docker/xeon/compose_qdrant.yaml       |  17 ++-
 ChatQnA/docker/xeon/compose_vllm.yaml         |  19 ++-
 ChatQnA/tests/test_chatqna_on_gaudi.sh        |  64 +++--------
 ChatQnA/tests/test_chatqna_on_xeon.sh         |  53 ++++-----
 ChatQnA/tests/test_chatqna_qdrant_on_xeon.sh  |  36 ++----
 ChatQnA/tests/test_chatqna_vllm_on_gaudi.sh   |  61 +++-------
 ChatQnA/tests/test_chatqna_vllm_on_xeon.sh    |  66 ++++-------
 .../tests/test_chatqna_vllm_ray_on_gaudi.sh   |  60 +++-------
 CodeGen/docker/docker_build_compose.yaml      |  30 +++++
 CodeGen/docker/gaudi/README.md                |  22 ++--
 CodeGen/docker/gaudi/compose.yaml             |  19 +--
 CodeGen/docker/xeon/README.md                 |  22 ++--
 CodeGen/docker/xeon/compose.yaml              |  18 +--
 CodeGen/tests/test_codegen_on_gaudi.sh        |  44 +++----
 CodeGen/tests/test_codegen_on_xeon.sh         |  43 +++----
 CodeTrans/docker/docker_build_compose.yaml    |  24 ++++
 CodeTrans/docker/gaudi/compose.yaml           |   9 +-
 CodeTrans/docker/xeon/compose.yaml            |   9 +-
 CodeTrans/tests/test_codetrans_on_gaudi.sh    |  43 +++----
 CodeTrans/tests/test_codetrans_on_xeon.sh     |  41 +++----
 DocSum/docker/docker_build_compose.yaml       |  30 +++++
 DocSum/docker/gaudi/README.md                 |  19 ++-
 DocSum/docker/gaudi/compose.yaml              |  18 +--
 DocSum/docker/xeon/README.md                  |  20 +++-
 DocSum/docker/xeon/compose.yaml               |  18 +--
 DocSum/tests/test_docsum_on_gaudi.sh          |  45 +++-----
 DocSum/tests/test_docsum_on_xeon.sh           |  45 +++-----
 FaqGen/docker/docker_build_compose.yaml       |  30 +++++
 FaqGen/docker/gaudi/compose.yaml              |   8 +-
 FaqGen/docker/xeon/compose.yaml               |   8 +-
 FaqGen/tests/test_faqgen_on_gaudi.sh          |  41 +++----
 FaqGen/tests/test_faqgen_on_xeon.sh           |  40 +++----
 SearchQnA/docker/docker_build_compose.yaml    |  48 ++++++++
 SearchQnA/docker/gaudi/compose.yaml           |  17 ++-
 SearchQnA/docker/xeon/compose.yaml            |  15 +--
 SearchQnA/tests/test_searchqna_on_gaudi.sh    |  57 +++------
 SearchQnA/tests/test_searchqna_on_xeon.sh     |  72 ++++++------
 Translation/docker/docker_build_compose.yaml  |  18 +++
 Translation/docker/gaudi/compose.yaml         |  23 +---
 Translation/docker/xeon/compose.yaml          |  23 +---
 .../tests/test_translation_on_gaudi.sh        |  40 +++----
 Translation/tests/test_translation_on_xeon.sh |  41 +++----
 VisualQnA/docker/gaudi/compose.yaml           |  11 +-
 VisualQnA/docker/xeon/compose.yaml            |  11 +-
 61 files changed, 987 insertions(+), 954 deletions(-)
 create mode 100644 AudioQnA/docker/docker_build_compose.yaml
 create mode 100644 ChatQnA/docker/docker_build_compose.yaml
 create mode 100644 CodeGen/docker/docker_build_compose.yaml
 create mode 100644 CodeTrans/docker/docker_build_compose.yaml
 create mode 100644 DocSum/docker/docker_build_compose.yaml
 create mode 100644 FaqGen/docker/docker_build_compose.yaml
 create mode 100644 SearchQnA/docker/docker_build_compose.yaml
 create mode 100644 Translation/docker/docker_build_compose.yaml

diff --git a/.github/workflows/_example-workflow.yml b/.github/workflows/_example-workflow.yml
index 48edbb65cd..c293a8b1ef 100644
--- a/.github/workflows/_example-workflow.yml
+++ b/.github/workflows/_example-workflow.yml
@@ -6,6 +6,9 @@ permissions: read-all
 on:
   workflow_call:
     inputs:
+      node:
+        required: true
+        type: string
       example:
         required: true
         type: string
@@ -37,30 +40,43 @@ on:
         default: "latest"
         required: false
         type: string
+      GenAIComps_branch:
+        default: "main"
+        required: false
+        type: string
 jobs:
 ####################################################################################################
 # Image Build
 ####################################################################################################
   build-images:
-    if: ${{ fromJSON(inputs.build) }}
-    strategy:
-      matrix:
-        node: ["docker-build-xeon", "docker-build-gaudi"]
-    runs-on: ${{ matrix.node }}
+    runs-on: "docker-build-${{ inputs.node }}"
     continue-on-error: true
     steps:
       - name: Clean Up Working Directory
-        run: |
-          sudo rm -rf ${{github.workspace}}/*
+        run: sudo rm -rf ${{github.workspace}}/*
 
       - name: Checkout out Repo
         uses: actions/checkout@v4
 
+      - name: Clone required Repo
+        run: |
+          cd ${{ github.workspace }}/${{ inputs.example }}/docker
+          build_compose_path=${{ github.workspace }}/${{ inputs.example }}/docker/docker_build_compose.yaml
+          if [[ $(grep -c "tei-gaudi:" ${docker_compose_path}) != 0 ]]; then
+              git clone https://github.com/huggingface/tei-gaudi.git
+          fi
+          if [[ $(grep -c "vllm:" ${docker_compose_path}) != 0 ]]; then
+              git clone https://github.com/huggingface/tei-gaudi.git
+          fi
+          git clone https://github.com/opea-project/GenAIComps.git
+          cd GenAIComps && checkout ${{ inputs.GenAIComps_branch }} && cd ../
+
       - name: Build Image
+        if: ${{ fromJSON(inputs.build) }}
         uses: opea-project/validation/actions/image-build@main
         with:
-          work_dir: ${{ github.workspace }}/${{ inputs.example }}
-          docker_compose_path: ${{ github.workspace }}/.github/workflows/docker/compose/${{ inputs.example }}-compose.yaml
+          work_dir: ${{ github.workspace }}/${{ inputs.example }}/docker
+          docker_compose_path: ${{ github.workspace }}/${{ inputs.example }}/docker/docker_build_compose.yaml
           registry: ${OPEA_IMAGE_REPO}opea
           tag: ${{ inputs.tag }}
 
@@ -68,17 +84,12 @@ jobs:
 # Trivy Scan
 ####################################################################################################
   image-list:
-    needs: [ build-images ]
-    if: ${{ fromJSON(inputs.scan) }}
+    needs: [build-images]
+    if: ${{ fromJSON(inputs.scan) && inputs.node == 'gaudi' }}
     runs-on: ubuntu-latest
     outputs:
       matrix: ${{ steps.scan-matrix.outputs.matrix }}
     steps:
-      - name: Harden Runner
-        uses: step-security/harden-runner@v2.8.1
-        with:
-          egress-policy: audit
-
       - name: Checkout out Repo
         uses: actions/checkout@v4
 
@@ -90,34 +101,32 @@ jobs:
           echo "matrix=$(cat ${compose_path} | yq -r '.[]' | jq 'keys' | jq -c '.')" >> $GITHUB_OUTPUT
 
   scan-images:
-    needs: [image-list]
-    if: ${{ fromJSON(inputs.scan) }}
-    runs-on: "docker-build-gaudi"
+    needs: [image-list, build-images]
+    if: ${{ fromJSON(inputs.scan) && inputs.node == 'gaudi'}}
+    runs-on: "docker-build-${{ inputs.node }}"
     strategy:
       matrix:
         image: ${{ fromJSON(needs.image-list.outputs.matrix) }}
       fail-fast: false
     steps:
-      - name: Harden Runner
-        uses: step-security/harden-runner@v2.8.1
-        with:
-          egress-policy: audit
-
       - name: Pull Image
-        run: docker pull ${OPEA_IMAGE_REPO}opea/${{ matrix.image }}:${{ inputs.tag }}
+        run: |
+          docker pull ${OPEA_IMAGE_REPO}opea/${{ matrix.image }}:${{ inputs.tag }}
+          echo "OPEA_IMAGE_REPO=${OPEA_IMAGE_REPO}" >> $GITHUB_ENV
 
       - name: Scan Container
         uses: opea-project/validation/actions/trivy-scan@main
         with:
-          image-ref: ${OPEA_IMAGE_REPO}opea/${{ matrix.image }}:${{ inputs.tag }}
+          image-ref: ${{ env.OPEA_IMAGE_REPO }}opea/${{ matrix.image }}:${{ inputs.tag }}
           output: ${{ inputs.example }}-${{ matrix.image }}-scan.txt
 
       - name: Cleanup
         if: always()
         run: docker rmi -f ${OPEA_IMAGE_REPO}opea/${{ matrix.image }}:${{ inputs.tag }}
+
       - uses: actions/upload-artifact@v4.3.4
         with:
-          name: ${{ inputs.example }}-scan
+          name: ${{ inputs.example }}-${{ matrix.image }}-scan
           path: ${{ inputs.example }}-${{ matrix.image }}-scan.txt
           overwrite: true
 
@@ -127,15 +136,11 @@ jobs:
   test-example-compose:
     needs: [build-images]
     if: ${{ fromJSON(inputs.test_compose) }}
-    strategy:
-      matrix:
-        hardware: ["xeon", "gaudi"]
-      fail-fast: false
     uses: ./.github/workflows/_run-docker-compose.yml
     with:
       tag: ${{ inputs.tag }}
       example: ${{ inputs.example }}
-      hardware: ${{ matrix.hardware }}
+      hardware: ${{ inputs.node }}
     secrets: inherit
 
 
@@ -145,14 +150,10 @@ jobs:
   test-k8s-manifest:
     needs: [build-images]
     if: ${{ fromJSON(inputs.test_k8s) }}
-    strategy:
-      matrix:
-        hardware: ["xeon", "gaudi"]
-      fail-fast: false
     uses: ./.github/workflows/_manifest-e2e.yml
     with:
       example: ${{ inputs.example }}
-      hardware: ${{ matrix.hardware }}
+      hardware: ${{ inputs.node }}
       tag: ${{ inputs.tag }}
     secrets: inherit
 
@@ -162,7 +163,7 @@ jobs:
 ####################################################################################################
   publish:
     needs: [image-list, build-images, scan-images, test-example-compose]
-    if: ${{ fromJSON(inputs.publish) }}
+    if: ${{ fromJSON(inputs.publish) && inputs.node == 'gaudi' }}
     strategy:
       matrix:
         image: ${{ fromJSON(needs.image-list.outputs.matrix) }}
diff --git a/.github/workflows/_run-docker-compose.yml b/.github/workflows/_run-docker-compose.yml
index 39b2b9d342..d7c778a089 100644
--- a/.github/workflows/_run-docker-compose.yml
+++ b/.github/workflows/_run-docker-compose.yml
@@ -72,6 +72,7 @@ jobs:
           sudo rm -rf ${{github.workspace}}/* || true
           docker system prune -f
           docker rmi $(docker images --filter reference="*/*/*:latest" -q) || true
+          docker rmi $(docker images --filter reference="*/*:ci" -q) || true
 
       - name: Checkout out Repo
         uses: actions/checkout@v4
@@ -93,7 +94,7 @@ jobs:
           test_case: ${{ matrix.test_case }}
         run: |
           cd ${{ github.workspace }}/$example/tests
-          export IMAGE_REPO=${OPEA_IMAGE_REPO}
+          if [[ "$IMAGE_REPO" == "" ]]; then export IMAGE_REPO="${OPEA_IMAGE_REPO}opea"; fi
           if [ -f ${test_case} ]; then timeout 30m bash ${test_case}; else echo "Test script {${test_case}} not found, skip test!"; fi
 
       - name: Clean up container
diff --git a/.github/workflows/manual-cd-workflow.yml b/.github/workflows/manual-cd-workflow.yml
index 52be4230f9..7159ba6321 100644
--- a/.github/workflows/manual-cd-workflow.yml
+++ b/.github/workflows/manual-cd-workflow.yml
@@ -5,9 +5,14 @@ name: Examples CD workflow on manual event
 on:
   workflow_dispatch:
     inputs:
+      nodes:
+        default: "gaudi,xeon"
+        description: "Hardware to run test"
+        required: true
+        type: string
       examples:
-        default: "AudioQnA,ChatQnA,CodeGen,CodeTrans,DocSum,FaqGen,SearchQnA,Translation"
-        description: 'List of examples to test'
+        default: "ChatQnA"
+        description: 'List of examples to test [AudioQnA,ChatQnA,CodeGen,CodeTrans,DocSum,FaqGen,SearchQnA,Translation]'
         required: true
         type: string
       tag:
@@ -41,33 +46,44 @@ on:
         required: false
         type: boolean
       publish_tags:
-        default: "latest,v0.9"
+        default: "latest,v1.0"
         description: 'Tag list apply to publish images'
         required: false
         type: string
+      GenAIComps_branch:
+        default: "main"
+        description: 'GenAIComps branch for image build'
+        required: false
+        type: string
 
 permissions: read-all
 jobs:
   get-test-matrix:
     runs-on: ubuntu-latest
     outputs:
-      matrix: ${{ steps.get-matrix.outputs.matrix }}
+      examples: ${{ steps.get-matrix.outputs.examples }}
+      nodes: ${{ steps.get-matrix.outputs.nodes }}
     steps:
     - name: Create Matrix
       id: get-matrix
       run: |
         examples=($(echo ${{ github.event.inputs.examples }} | tr ',' ' '))
         examples_json=$(printf '%s\n' "${examples[@]}" | sort -u | jq -R '.' | jq -sc '.')
-        echo "matrix=$examples_json" >> $GITHUB_OUTPUT
+        echo "examples=$examples_json" >> $GITHUB_OUTPUT
+        nodes=($(echo ${{ github.event.inputs.nodes }} | tr ',' ' '))
+        nodes_json=$(printf '%s\n' "${nodes[@]}" | sort -u | jq -R '.' | jq -sc '.')
+        echo "nodes=$nodes_json" >> $GITHUB_OUTPUT
 
   run-examples:
     needs: [get-test-matrix]
     strategy:
       matrix:
-        example: ${{ fromJson(needs.get-test-matrix.outputs.matrix) }}
+        example: ${{ fromJson(needs.get-test-matrix.outputs.examples) }}
+        node: ${{ fromJson(needs.get-test-matrix.outputs.nodes) }}
       fail-fast: false
     uses: ./.github/workflows/_example-workflow.yml
     with:
+      node: ${{ matrix.node }}
       example: ${{ matrix.example }}
       tag: ${{ inputs.tag }}
       build: ${{ fromJSON(inputs.build) }}
@@ -75,5 +91,6 @@ jobs:
       test_compose: ${{ fromJSON(inputs.test_compose) }}
       test_k8s: ${{ fromJSON(inputs.test_k8s) }}
       publish: ${{ fromJSON(inputs.publish) }}
-      publish_tags: ${{ fromJSON(inputs.publish_tags) }}
+      publish_tags: ${{ inputs.publish_tags }}
+      GenAIComps_branch: ${{ inputs.GenAIComps_branch }}
     secrets: inherit
diff --git a/.github/workflows/pr-docker-compose-e2e.yml b/.github/workflows/pr-docker-compose-e2e.yml
index 7706f4f111..e02c60fb83 100644
--- a/.github/workflows/pr-docker-compose-e2e.yml
+++ b/.github/workflows/pr-docker-compose-e2e.yml
@@ -4,7 +4,7 @@
 name: E2E test with docker compose
 
 on:
-  pull_request_target:
+  pull_request:
     branches: [main]
     types: [opened, reopened, ready_for_review, synchronize] # added `ready_for_review` since draft is skipped
     paths:
@@ -21,29 +21,20 @@ concurrency:
   cancel-in-progress: true
 
 jobs:
-  job1:
+  get-test-matrix:
     uses: ./.github/workflows/_get-test-matrix.yml
     with:
       diff_excluded_files: '.github|README.md|*.txt|deprecate|kubernetes|manifest|gmc|assets'
 
-  mega-image-build:
-    needs: job1
-    strategy:
-      matrix: ${{ fromJSON(needs.job1.outputs.run_matrix) }}
-    uses: ./.github/workflows/_image-build.yml
-    with:
-      image_tag: ${{ github.event.pull_request.head.sha }}
-      mega_service: "${{ matrix.example }}"
-      runner_label: "docker-build-${{ matrix.hardware }}"
-
   example-test:
-    needs: [job1, mega-image-build]
+    needs: [get-test-matrix]
     strategy:
-      matrix: ${{ fromJSON(needs.job1.outputs.run_matrix) }}
+      matrix: ${{ fromJSON(needs.get-test-matrix.outputs.run_matrix) }}
       fail-fast: false
     uses: ./.github/workflows/_run-docker-compose.yml
     with:
-      tag: ${{ needs.mega-image-build.outputs.image_tag }}
+      registry: "opea"
+      tag: "ci"
       example: ${{ matrix.example }}
       hardware: ${{ matrix.hardware }}
     secrets: inherit
diff --git a/AudioQnA/docker/docker_build_compose.yaml b/AudioQnA/docker/docker_build_compose.yaml
new file mode 100644
index 0000000000..e78d44af72
--- /dev/null
+++ b/AudioQnA/docker/docker_build_compose.yaml
@@ -0,0 +1,54 @@
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
+
+services:
+  audioqna:
+    build:
+      args:
+        http_proxy: ${http_proxy}
+        https_proxy: ${https_proxy}
+        no_proxy: ${no_proxy}
+      dockerfile: ./Dockerfile
+    image: ${REGISTRY:-opea}/audioqna:${TAG:-latest}
+  whisper-gaudi:
+    build:
+      context: GenAIComps
+      dockerfile: comps/asr/whisper/Dockerfile_hpu
+    extends: audioqna
+    image: ${REGISTRY:-opea}/whisper-gaudi:${TAG:-latest}
+  whisper:
+    build:
+      context: GenAIComps
+      dockerfile: comps/asr/whisper/Dockerfile
+    extends: audioqna
+    image: ${REGISTRY:-opea}/whisper:${TAG:-latest}
+  asr:
+    build:
+      context: GenAIComps
+      dockerfile: comps/asr/Dockerfile
+    extends: audioqna
+    image: ${REGISTRY:-opea}/asr:${TAG:-latest}
+  llm-tgi:
+    build:
+      context: GenAIComps
+      dockerfile: comps/llms/text-generation/tgi/Dockerfile
+    extends: audioqna
+    image: ${REGISTRY:-opea}/llm-tgi:${TAG:-latest}
+  speecht5-gaudi:
+    build:
+      context: GenAIComps
+      dockerfile: comps/tts/speecht5/Dockerfile_hpu
+    extends: audioqna
+    image: ${REGISTRY:-opea}/speecht5-gaudi:${TAG:-latest}
+  speecht5:
+    build:
+      context: GenAIComps
+      dockerfile: comps/tts/speecht5/Dockerfile
+    extends: audioqna
+    image: ${REGISTRY:-opea}/speecht5:${TAG:-latest}
+  tts:
+    build:
+      context: GenAIComps
+      dockerfile: comps/tts/Dockerfile
+    extends: audioqna
+    image: ${REGISTRY:-opea}/tts:${TAG:-latest}
diff --git a/AudioQnA/docker/gaudi/compose.yaml b/AudioQnA/docker/gaudi/compose.yaml
index 5d8b34a6bf..c781bcb144 100644
--- a/AudioQnA/docker/gaudi/compose.yaml
+++ b/AudioQnA/docker/gaudi/compose.yaml
@@ -1,12 +1,9 @@
-
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-version: "3.8"
-
 services:
   whisper-service:
-    image: opea/whisper-gaudi:latest
+    image: ${REGISTRY:-opea}/whisper-gaudi:${TAG:-latest}
     container_name: whisper-service
     ports:
       - "7066:7066"
@@ -22,7 +19,7 @@ services:
       - SYS_NICE
     restart: unless-stopped
   asr:
-    image: opea/asr:latest
+    image: ${REGISTRY:-opea}/asr:${TAG:-latest}
     container_name: asr-service
     ports:
       - "3001:9099"
@@ -30,7 +27,7 @@ services:
     environment:
       ASR_ENDPOINT: ${ASR_ENDPOINT}
   speecht5-service:
-    image: opea/speecht5-gaudi:latest
+    image: ${REGISTRY:-opea}/speecht5-gaudi:${TAG:-latest}
     container_name: speecht5-service
     ports:
       - "7055:7055"
@@ -46,7 +43,7 @@ services:
       - SYS_NICE
     restart: unless-stopped
   tts:
-    image: opea/tts:latest
+    image: ${REGISTRY:-opea}/tts:${TAG:-latest}
     container_name: tts-service
     ports:
       - "3002:9088"
@@ -75,7 +72,7 @@ services:
     ipc: host
     command: --model-id ${LLM_MODEL_ID} --max-input-length 1024 --max-total-tokens 2048
   llm:
-    image: opea/llm-tgi:latest
+    image: ${REGISTRY:-opea}/llm-tgi:${TAG:-latest}
     container_name: llm-tgi-gaudi-server
     depends_on:
       - tgi-service
@@ -90,7 +87,7 @@ services:
       HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
     restart: unless-stopped
   audioqna-gaudi-backend-server:
-    image: opea/audioqna:latest
+    image: ${REGISTRY:-opea}/audioqna:${TAG:-latest}
     container_name: audioqna-gaudi-backend-server
     depends_on:
       - asr
diff --git a/AudioQnA/docker/xeon/compose.yaml b/AudioQnA/docker/xeon/compose.yaml
index b8966c7192..7c111176de 100644
--- a/AudioQnA/docker/xeon/compose.yaml
+++ b/AudioQnA/docker/xeon/compose.yaml
@@ -1,12 +1,9 @@
-
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-version: "3.8"
-
 services:
   whisper-service:
-    image: opea/whisper:latest
+    image: ${REGISTRY:-opea}/whisper:${TAG:-latest}
     container_name: whisper-service
     ports:
       - "7066:7066"
@@ -17,7 +14,7 @@ services:
       https_proxy: ${https_proxy}
     restart: unless-stopped
   asr:
-    image: opea/asr:latest
+    image: ${REGISTRY:-opea}/asr:${TAG:-latest}
     container_name: asr-service
     ports:
       - "3001:9099"
@@ -25,7 +22,7 @@ services:
     environment:
       ASR_ENDPOINT: ${ASR_ENDPOINT}
   speecht5-service:
-    image: opea/speecht5:latest
+    image: ${REGISTRY:-opea}/speecht5:${TAG:-latest}
     container_name: speecht5-service
     ports:
       - "7055:7055"
@@ -36,7 +33,7 @@ services:
       https_proxy: ${https_proxy}
     restart: unless-stopped
   tts:
-    image: opea/tts:latest
+    image: ${REGISTRY:-opea}/tts:${TAG:-latest}
     container_name: tts-service
     ports:
       - "3002:9088"
@@ -58,7 +55,7 @@ services:
       HF_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
     command: --model-id ${LLM_MODEL_ID}
   llm:
-    image: opea/llm-tgi:latest
+    image: ${REGISTRY:-opea}/llm-tgi:${TAG:-latest}
     container_name: llm-tgi-server
     depends_on:
       - tgi-service
@@ -73,7 +70,7 @@ services:
       HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
     restart: unless-stopped
   audioqna-xeon-backend-server:
-    image: opea/audioqna:latest
+    image: ${REGISTRY:-opea}/audioqna:${TAG:-latest}
     container_name: audioqna-xeon-backend-server
     depends_on:
       - asr
diff --git a/AudioQnA/tests/test_audioqna_on_gaudi.sh b/AudioQnA/tests/test_audioqna_on_gaudi.sh
index 7493f8f8ae..5feb6eec59 100644
--- a/AudioQnA/tests/test_audioqna_on_gaudi.sh
+++ b/AudioQnA/tests/test_audioqna_on_gaudi.sh
@@ -3,34 +3,26 @@
 # SPDX-License-Identifier: Apache-2.0
 
 set -e
-echo "IMAGE_REPO=${IMAGE_REPO}"
+IMAGE_REPO=${IMAGE_REPO:-"opea"}
+IMAGE_TAG=${IMAGE_TAG:-"latest"}
+echo "REGISTRY=IMAGE_REPO=${IMAGE_REPO}"
+echo "TAG=IMAGE_TAG=${IMAGE_TAG}"
+export REGISTRY=${IMAGE_REPO}
+export TAG=${IMAGE_TAG}
 
 WORKPATH=$(dirname "$PWD")
 LOG_PATH="$WORKPATH/tests"
 ip_address=$(hostname -I | awk '{print $1}')
 
 function build_docker_images() {
-    cd $WORKPATH
+    cd $WORKPATH/docker
     git clone https://github.com/opea-project/GenAIComps.git
-    cd GenAIComps
-
-    docker build -t opea/whisper-gaudi:latest  -f comps/asr/whisper/Dockerfile_hpu .
 
-    docker build -t opea/asr:latest  -f comps/asr/Dockerfile .
-    docker build -t opea/llm-tgi:latest -f comps/llms/text-generation/tgi/Dockerfile .
-    docker build -t opea/speecht5-gaudi:latest  -f comps/tts/speecht5/Dockerfile_hpu .
-    docker build -t opea/tts:latest  -f comps/tts/Dockerfile .
+    echo "Build all the images with --no-cache, check docker_image_build.log for details..."
+    service_list="audioqna whisper-gaudi asr llm-tgi speecht5-gaudi tts"
+    docker compose -f docker_build_compose.yaml build ${service_list} --no-cache > ${LOG_PATH}/docker_image_build.log
 
     docker pull ghcr.io/huggingface/tgi-gaudi:2.0.1
-
-    cd ..
-
-    cd $WORKPATH/docker
-    docker build --no-cache -t opea/audioqna:latest -f Dockerfile .
-
-    # cd $WORKPATH/docker/ui
-    # docker build --no-cache -t opea/audioqna-ui:latest -f docker/Dockerfile .
-
     docker images
 }
 
@@ -55,16 +47,6 @@ function start_services() {
 
     # sed -i "s/backend_address/$ip_address/g" $WORKPATH/docker/ui/svelte/.env
 
-    if [[ "$IMAGE_REPO" != "" ]]; then
-        # Replace the container name with a test-specific name
-        echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
-        sed -i "s#image: opea/audioqna:latest#image: opea/audioqna:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/audioqna-ui:latest#image: opea/audioqna-ui:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose.yaml
-        echo "cat compose.yaml"
-        cat compose.yaml
-    fi
-
     # Start Docker Containers
     docker compose up -d
     n=0
@@ -76,6 +58,16 @@ function start_services() {
        sleep 1s
        n=$((n+1))
     done
+
+    n=0
+    until [[ "$n" -ge 200 ]]; do
+       docker logs whisper-service > $LOG_PATH/whisper_service_start.log
+       if grep -q "Uvicorn server setup on port" $LOG_PATH/whisper_service_start.log; then
+           break
+       fi
+       sleep 1s
+       n=$((n+1))
+    done
 }
 
 
@@ -131,7 +123,7 @@ function stop_docker() {
 function main() {
 
     stop_docker
-    if [[ "$IMAGE_REPO" == "" ]]; then build_docker_images; fi
+    if [[ "$IMAGE_REPO" == "opea" ]]; then build_docker_images; fi
     start_services
 
     # validate_microservices
diff --git a/AudioQnA/tests/test_audioqna_on_xeon.sh b/AudioQnA/tests/test_audioqna_on_xeon.sh
index bb63402103..020a86999e 100644
--- a/AudioQnA/tests/test_audioqna_on_xeon.sh
+++ b/AudioQnA/tests/test_audioqna_on_xeon.sh
@@ -3,31 +3,26 @@
 # SPDX-License-Identifier: Apache-2.0
 
 set -e
-echo "IMAGE_REPO=${IMAGE_REPO}"
+IMAGE_REPO=${IMAGE_REPO:-"opea"}
+IMAGE_TAG=${IMAGE_TAG:-"latest"}
+echo "REGISTRY=IMAGE_REPO=${IMAGE_REPO}"
+echo "TAG=IMAGE_TAG=${IMAGE_TAG}"
+export REGISTRY=${IMAGE_REPO}
+export TAG=${IMAGE_TAG}
 
 WORKPATH=$(dirname "$PWD")
 LOG_PATH="$WORKPATH/tests"
 ip_address=$(hostname -I | awk '{print $1}')
 
 function build_docker_images() {
-    cd $WORKPATH
+    cd $WORKPATH/docker
     git clone https://github.com/opea-project/GenAIComps.git
-    cd GenAIComps
 
-    docker build -t opea/whisper:latest -f comps/asr/whisper/Dockerfile .
-    docker build -t opea/asr:latest -f comps/asr/Dockerfile .
-    docker build -t opea/llm-tgi:latest -f comps/llms/text-generation/tgi/Dockerfile .
-    docker build -t opea/speecht5:latest -f comps/tts/speecht5/Dockerfile .
-    docker build -t opea/tts:latest -f comps/tts/Dockerfile .
+    echo "Build all the images with --no-cache, check docker_image_build.log for details..."
+    service_list="audioqna whisper asr llm-tgi speecht5 tts"
+    docker compose -f docker_build_compose.yaml build ${service_list} --no-cache > ${LOG_PATH}/docker_image_build.log
 
     docker pull ghcr.io/huggingface/tgi-gaudi:2.0.1
-
-    cd $WORKPATH/docker
-    docker build --no-cache -t opea/audioqna:latest -f Dockerfile .
-
-    # cd $WORKPATH/docker/ui
-    # docker build --no-cache -t opea/audioqna-ui:latest -f docker/Dockerfile .
-
     docker images
 }
 
@@ -51,16 +46,6 @@ function start_services() {
 
     # sed -i "s/backend_address/$ip_address/g" $WORKPATH/docker/ui/svelte/.env
 
-    if [[ "$IMAGE_REPO" != "" ]]; then
-        # Replace the container name with a test-specific name
-        echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
-        sed -i "s#image: opea/audioqna:latest#image: opea/audioqna:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/audioqna-ui:latest#image: opea/audioqna-ui:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose.yaml
-        echo "cat compose.yaml"
-        cat compose.yaml
-    fi
-
     # Start Docker Containers
     docker compose up -d
     n=0
@@ -128,7 +113,7 @@ function stop_docker() {
 function main() {
 
     stop_docker
-    if [[ "$IMAGE_REPO" == "" ]]; then build_docker_images; fi
+    if [[ "$IMAGE_REPO" == "opea" ]]; then build_docker_images; fi
     start_services
 
     validate_megaservice
diff --git a/ChatQnA/docker/aipc/compose.yaml b/ChatQnA/docker/aipc/compose.yaml
index ec0970f645..fedbe12a8d 100644
--- a/ChatQnA/docker/aipc/compose.yaml
+++ b/ChatQnA/docker/aipc/compose.yaml
@@ -1,8 +1,6 @@
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-version: "3.8"
-
 services:
   redis-vector-db:
     image: redis/redis-stack:7.2.0-v9
@@ -11,7 +9,7 @@ services:
       - "6379:6379"
       - "8001:8001"
   dataprep-redis-service:
-    image: opea/dataprep-redis:latest
+    image: ${REGISTRY:-opea}/dataprep-redis:${TAG:-latest}
     container_name: dataprep-redis-server
     depends_on:
       - redis-vector-db
@@ -39,7 +37,7 @@ services:
       https_proxy: ${https_proxy}
     command: --model-id ${EMBEDDING_MODEL_ID} --auto-truncate
   embedding:
-    image: opea/embedding-tei:latest
+    image: ${REGISTRY:-opea}/embedding-tei:${TAG:-latest}
     container_name: embedding-tei-server
     depends_on:
       - tei-embedding-service
@@ -53,7 +51,7 @@ services:
       TEI_EMBEDDING_ENDPOINT: ${TEI_EMBEDDING_ENDPOINT}
     restart: unless-stopped
   retriever:
-    image: opea/retriever-redis:latest
+    image: ${REGISTRY:-opea}/retriever-redis:${TAG:-latest}
     container_name: retriever-redis-server
     depends_on:
       - redis-vector-db
@@ -85,7 +83,7 @@ services:
       HF_HUB_ENABLE_HF_TRANSFER: 0
     command: --model-id ${RERANK_MODEL_ID} --auto-truncate
   reranking:
-    image: opea/reranking-tei:latest
+    image: ${REGISTRY:-opea}/reranking-tei:${TAG:-latest}
     container_name: reranking-tei-aipc-server
     depends_on:
       - tei-reranking-service
@@ -102,7 +100,7 @@ services:
       HF_HUB_ENABLE_HF_TRANSFER: 0
     restart: unless-stopped
   llm:
-    image: opea/llm-ollama
+    image: ${REGISTRY:-opea}/llm-ollama
     container_name: llm-ollama
     ports:
       - "9000:9000"
@@ -118,7 +116,7 @@ services:
       OLLAMA_ENDPOINT: ${OLLAMA_ENDPOINT}
       OLLAMA_MODEL: ${OLLAMA_MODEL}
   chaqna-aipc-backend-server:
-    image: opea/chatqna:latest
+    image: ${REGISTRY:-opea}/chatqna:${TAG:-latest}
     container_name: chatqna-aipc-backend-server
     depends_on:
       - redis-vector-db
@@ -142,7 +140,7 @@ services:
     ipc: host
     restart: always
   chaqna-aipc-ui-server:
-    image: opea/chatqna-ui:latest
+    image: ${REGISTRY:-opea}/chatqna-ui:${TAG:-latest}
     container_name: chatqna-aipc-ui-server
     depends_on:
       - chaqna-aipc-backend-server
diff --git a/ChatQnA/docker/docker_build_compose.yaml b/ChatQnA/docker/docker_build_compose.yaml
new file mode 100644
index 0000000000..b55327ac5b
--- /dev/null
+++ b/ChatQnA/docker/docker_build_compose.yaml
@@ -0,0 +1,108 @@
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
+
+services:
+  chatqna:
+    build:
+      args:
+        http_proxy: ${http_proxy}
+        https_proxy: ${https_proxy}
+        no_proxy: ${no_proxy}
+      dockerfile: ./Dockerfile
+    image: ${REGISTRY:-opea}/chatqna:${TAG:-latest}
+  chatqna-ui:
+    build:
+      context: ui
+      dockerfile: ./docker/Dockerfile
+    extends: chatqna
+    image: ${REGISTRY:-opea}/chatqna-ui:${TAG:-latest}
+  chatqna-conversation-ui:
+    build:
+      context: ui
+      dockerfile: ./docker/Dockerfile.react
+    extends: chatqna
+    image: ${REGISTRY:-opea}/chatqna-conversation-ui:${TAG:-latest}
+  embedding-tei:
+    build:
+      context: GenAIComps
+      dockerfile: comps/embeddings/langchain/docker/Dockerfile
+    extends: chatqna
+    image: ${REGISTRY:-opea}/embedding-tei:${TAG:-latest}
+  retriever-redis:
+    build:
+      context: GenAIComps
+      dockerfile: comps/retrievers/langchain/redis/docker/Dockerfile
+    extends: chatqna
+    image: ${REGISTRY:-opea}/retriever-redis:${TAG:-latest}
+  retriever-qdrant:
+    build:
+      context: GenAIComps
+      dockerfile: comps/retrievers/haystack/qdrant/docker/Dockerfile
+    extends: chatqna
+    image: ${REGISTRY:-opea}/retriever-qdrant:${TAG:-latest}
+  reranking-tei:
+    build:
+      context: GenAIComps
+      dockerfile: comps/reranks/tei/docker/Dockerfile
+    extends: chatqna
+    image: ${REGISTRY:-opea}/reranking-tei:${TAG:-latest}
+  llm-tgi:
+    build:
+      context: GenAIComps
+      dockerfile: comps/llms/text-generation/tgi/Dockerfile
+    extends: chatqna
+    image: ${REGISTRY:-opea}/llm-tgi:${TAG:-latest}
+  llm-ollama:
+    build:
+      context: GenAIComps
+      dockerfile: comps/llms/text-generation/ollama/Dockerfile
+    extends: chatqna
+    image: ${REGISTRY:-opea}/llm-ollama:${TAG:-latest}
+  llm-vllm:
+    build:
+      context: GenAIComps
+      dockerfile: comps/llms/text-generation/vllm/docker/Dockerfile.microservice
+    extends: chatqna
+    image: ${REGISTRY:-opea}/llm-vllm:${TAG:-latest}
+  llm-vllm-hpu:
+    build:
+      context: GenAIComps
+      dockerfile: comps/llms/text-generation/vllm/docker/Dockerfile.hpu
+    extends: chatqna
+    image: ${REGISTRY:-opea}/llm-vllm-hpu:${TAG:-latest}
+  llm-vllm-ray:
+    build:
+      context: GenAIComps
+      dockerfile: comps/llms/text-generation/vllm-ray/docker/Dockerfile.microservice
+    extends: chatqna
+    image: ${REGISTRY:-opea}/llm-vllm-ray:${TAG:-latest}
+  llm-vllm-ray-hpu:
+    build:
+      context: GenAIComps
+      dockerfile: comps/llms/text-generation/vllm-ray/docker/Dockerfile.vllmray
+    extends: chatqna
+    image: ${REGISTRY:-opea}/llm-vllm-ray-hpu:${TAG:-latest}
+  dataprep-redis:
+    build:
+      context: GenAIComps
+      dockerfile: comps/dataprep/redis/langchain/docker/Dockerfile
+    extends: chatqna
+    image: ${REGISTRY:-opea}/dataprep-redis:${TAG:-latest}
+  dataprep-qdrant:
+    build:
+      context: GenAIComps
+      dockerfile: comps/dataprep/qdrant/docker/Dockerfile
+    extends: chatqna
+    image: ${REGISTRY:-opea}/dataprep-qdrant:${TAG:-latest}
+  tei-gaudi:
+    build:
+      context: tei-gaudi
+      dockerfile: Dockerfile-hpu
+    extends: chatqna
+    image: ${REGISTRY:-opea}/tei-gaudi:${TAG:-latest}
+  vllm:
+    build:
+      context: vllm
+      dockerfile: Dockerfile.cpu
+    extends: chatqna
+    image: ${REGISTRY:-opea}/vllm:${TAG:-latest}
diff --git a/ChatQnA/docker/gaudi/compose.yaml b/ChatQnA/docker/gaudi/compose.yaml
index 82b8d0b77d..e5327b6234 100644
--- a/ChatQnA/docker/gaudi/compose.yaml
+++ b/ChatQnA/docker/gaudi/compose.yaml
@@ -1,9 +1,6 @@
-
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-version: "3.8"
-
 services:
   redis-vector-db:
     image: redis/redis-stack:7.2.0-v9
@@ -12,7 +9,7 @@ services:
       - "6379:6379"
       - "8001:8001"
   dataprep-redis-service:
-    image: opea/dataprep-redis:latest
+    image: ${REGISTRY:-opea}/dataprep-redis:${TAG:-latest}
     container_name: dataprep-redis-server
     depends_on:
       - redis-vector-db
@@ -28,7 +25,7 @@ services:
       TEI_ENDPOINT: ${TEI_EMBEDDING_ENDPOINT}
       HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
   tei-embedding-service:
-    image: opea/tei-gaudi:latest
+    image: ${REGISTRY:-opea}/tei-gaudi:${TAG:-latest}
     container_name: tei-embedding-gaudi-server
     ports:
       - "8090:80"
@@ -49,7 +46,7 @@ services:
       ENABLE_EXPERIMENTAL_FLAGS: true
     command: --model-id ${EMBEDDING_MODEL_ID} --auto-truncate
   embedding:
-    image: opea/embedding-tei:latest
+    image: ${REGISTRY:-opea}/embedding-tei:${TAG:-latest}
     container_name: embedding-tei-server
     depends_on:
       - tei-embedding-service
@@ -63,7 +60,7 @@ services:
       TEI_EMBEDDING_ENDPOINT: ${TEI_EMBEDDING_ENDPOINT}
     restart: unless-stopped
   retriever:
-    image: opea/retriever-redis:latest
+    image: ${REGISTRY:-opea}/retriever-redis:${TAG:-latest}
     container_name: retriever-redis-server
     depends_on:
       - redis-vector-db
@@ -94,7 +91,7 @@ services:
       HF_HUB_ENABLE_HF_TRANSFER: 0
     command: --model-id ${RERANK_MODEL_ID} --auto-truncate
   reranking:
-    image: opea/reranking-tei:latest
+    image: ${REGISTRY:-opea}/reranking-tei:${TAG:-latest}
     container_name: reranking-tei-gaudi-server
     depends_on:
       - tei-reranking-service
@@ -132,7 +129,7 @@ services:
     ipc: host
     command: --model-id ${LLM_MODEL_ID} --max-input-length 1024 --max-total-tokens 2048
   llm:
-    image: opea/llm-tgi:latest
+    image: ${REGISTRY:-opea}/llm-tgi:${TAG:-latest}
     container_name: llm-tgi-gaudi-server
     depends_on:
       - tgi-service
@@ -149,7 +146,7 @@ services:
       HF_HUB_ENABLE_HF_TRANSFER: 0
     restart: unless-stopped
   chaqna-gaudi-backend-server:
-    image: opea/chatqna:latest
+    image: ${REGISTRY:-opea}/chatqna:${TAG:-latest}
     container_name: chatqna-gaudi-backend-server
     depends_on:
       - redis-vector-db
@@ -174,7 +171,7 @@ services:
     ipc: host
     restart: always
   chaqna-gaudi-ui-server:
-    image: opea/chatqna-ui:latest
+    image: ${REGISTRY:-opea}/chatqna-ui:${TAG:-latest}
     container_name: chatqna-gaudi-ui-server
     depends_on:
       - chaqna-gaudi-backend-server
diff --git a/ChatQnA/docker/gaudi/compose_guardrails.yaml b/ChatQnA/docker/gaudi/compose_guardrails.yaml
index 0454bb161d..5680155bd9 100644
--- a/ChatQnA/docker/gaudi/compose_guardrails.yaml
+++ b/ChatQnA/docker/gaudi/compose_guardrails.yaml
@@ -1,9 +1,6 @@
-
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-version: "3.8"
-
 services:
   redis-vector-db:
     image: redis/redis-stack:7.2.0-v9
@@ -12,7 +9,7 @@ services:
       - "6379:6379"
       - "8001:8001"
   dataprep-redis-service:
-    image: opea/dataprep-redis:latest
+    image: ${REGISTRY:-opea}/dataprep-redis:${TAG:-latest}
     container_name: dataprep-redis-server
     depends_on:
       - redis-vector-db
@@ -49,7 +46,7 @@ services:
     ipc: host
     command: --model-id ${GURADRAILS_MODEL_ID} --max-input-length 1024 --max-total-tokens 2048
   guardrails:
-    image: opea/guardrails-tgi:latest
+    image: ${REGISTRY:-opea}/guardrails-tgi:${TAG:-latest}
     container_name: guardrails-tgi-gaudi-server
     ports:
       - "9090:9090"
@@ -63,7 +60,7 @@ services:
       HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
     restart: unless-stopped
   tei-embedding-service:
-    image: opea/tei-gaudi:latest
+    image: ${REGISTRY:-opea}/tei-gaudi:${TAG:-latest}
     container_name: tei-embedding-gaudi-server
     ports:
       - "8090:80"
@@ -82,7 +79,7 @@ services:
       MAX_WARMUP_SEQUENCE_LENGTH: 512
     command: --model-id ${EMBEDDING_MODEL_ID} --auto-truncate
   embedding:
-    image: opea/embedding-tei:latest
+    image: ${REGISTRY:-opea}/embedding-tei:${TAG:-latest}
     container_name: embedding-tei-server
     depends_on:
       - tei-embedding-service
@@ -96,7 +93,7 @@ services:
       TEI_EMBEDDING_ENDPOINT: ${TEI_EMBEDDING_ENDPOINT}
     restart: unless-stopped
   retriever:
-    image: opea/retriever-redis:latest
+    image: ${REGISTRY:-opea}/retriever-redis:${TAG:-latest}
     container_name: retriever-redis-server
     depends_on:
       - redis-vector-db
@@ -127,7 +124,7 @@ services:
       HF_HUB_ENABLE_HF_TRANSFER: 0
     command: --model-id ${RERANK_MODEL_ID} --auto-truncate
   reranking:
-    image: opea/reranking-tei:latest
+    image: ${REGISTRY:-opea}/reranking-tei:${TAG:-latest}
     container_name: reranking-tei-gaudi-server
     depends_on:
       - tei-reranking-service
@@ -165,7 +162,7 @@ services:
     ipc: host
     command: --model-id ${LLM_MODEL_ID} --max-input-length 1024 --max-total-tokens 2048
   llm:
-    image: opea/llm-tgi:latest
+    image: ${REGISTRY:-opea}/llm-tgi:${TAG:-latest}
     container_name: llm-tgi-gaudi-server
     depends_on:
       - tgi-service
@@ -182,7 +179,7 @@ services:
       HF_HUB_ENABLE_HF_TRANSFER: 0
     restart: unless-stopped
   chaqna-gaudi-backend-server:
-    image: opea/chatqna-guardrails:latest
+    image: ${REGISTRY:-opea}/chatqna-guardrails:${TAG:-latest}
     container_name: chatqna-gaudi-guardrails-server
     depends_on:
       - redis-vector-db
@@ -210,7 +207,7 @@ services:
     ipc: host
     restart: always
   chaqna-gaudi-ui-server:
-    image: opea/chatqna-ui:latest
+    image: ${REGISTRY:-opea}/chatqna-ui:${TAG:-latest}
     container_name: chatqna-gaudi-ui-server
     depends_on:
       - chaqna-gaudi-backend-server
diff --git a/ChatQnA/docker/gaudi/compose_vllm.yaml b/ChatQnA/docker/gaudi/compose_vllm.yaml
index ec82c9f22e..5548b33557 100644
--- a/ChatQnA/docker/gaudi/compose_vllm.yaml
+++ b/ChatQnA/docker/gaudi/compose_vllm.yaml
@@ -1,9 +1,6 @@
-
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-version: "3.8"
-
 services:
   redis-vector-db:
     image: redis/redis-stack:7.2.0-v9
@@ -12,7 +9,7 @@ services:
       - "6379:6379"
       - "8001:8001"
   dataprep-redis-service:
-    image: opea/dataprep-redis:latest
+    image: ${REGISTRY:-opea}/dataprep-redis:${TAG:-latest}
     container_name: dataprep-redis-server
     depends_on:
       - redis-vector-db
@@ -28,7 +25,7 @@ services:
       TEI_ENDPOINT: ${TEI_EMBEDDING_ENDPOINT}
       HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
   tei-embedding-service:
-    image: opea/tei-gaudi:latest
+    image: ${REGISTRY:-opea}/tei-gaudi:${TAG:-latest}
     container_name: tei-embedding-gaudi-server
     ports:
       - "8090:80"
@@ -47,7 +44,7 @@ services:
       MAX_WARMUP_SEQUENCE_LENGTH: 512
     command: --model-id ${EMBEDDING_MODEL_ID}
   embedding:
-    image: opea/embedding-tei:latest
+    image: ${REGISTRY:-opea}/embedding-tei:${TAG:-latest}
     container_name: embedding-tei-server
     depends_on:
       - tei-embedding-service
@@ -61,7 +58,7 @@ services:
       TEI_EMBEDDING_ENDPOINT: ${TEI_EMBEDDING_ENDPOINT}
     restart: unless-stopped
   retriever:
-    image: opea/retriever-redis:latest
+    image: ${REGISTRY:-opea}/retriever-redis:${TAG:-latest}
     container_name: retriever-redis-server
     depends_on:
       - redis-vector-db
@@ -92,7 +89,7 @@ services:
       HF_HUB_ENABLE_HF_TRANSFER: 0
     command: --model-id ${RERANK_MODEL_ID} --auto-truncate
   reranking:
-    image: opea/reranking-tei:latest
+    image: ${REGISTRY:-opea}/reranking-tei:${TAG:-latest}
     container_name: reranking-tei-gaudi-server
     depends_on:
       - tei-reranking-service
@@ -109,7 +106,7 @@ services:
       HF_HUB_ENABLE_HF_TRANSFER: 0
     restart: unless-stopped
   vllm-service:
-    image: opea/llm-vllm-hpu:latest
+    image: ${REGISTRY:-opea}/llm-vllm-hpu:${TAG:-latest}
     container_name: vllm-gaudi-server
     ports:
       - "8007:80"
@@ -129,7 +126,7 @@ services:
     ipc: host
     command: /bin/bash -c "export VLLM_CPU_KVCACHE_SPACE=40 && python3 -m vllm.entrypoints.openai.api_server --enforce-eager --model $LLM_MODEL_ID --tensor-parallel-size 1 --host 0.0.0.0 --port 80 --block-size 128 --max-num-seqs 256 --max-seq_len-to-capture 2048"
   llm:
-    image: opea/llm-vllm:latest
+    image: ${REGISTRY:-opea}/llm-vllm:${TAG:-latest}
     container_name: llm-vllm-gaudi-server
     depends_on:
       - vllm-service
@@ -145,7 +142,7 @@ services:
       LLM_MODEL: ${LLM_MODEL_ID}
     restart: unless-stopped
   chaqna-gaudi-backend-server:
-    image: opea/chatqna:latest
+    image: ${REGISTRY:-opea}/chatqna:${TAG:-latest}
     container_name: chatqna-gaudi-backend-server
     depends_on:
       - redis-vector-db
@@ -171,7 +168,7 @@ services:
     ipc: host
     restart: always
   chaqna-gaudi-ui-server:
-    image: opea/chatqna-ui:latest
+    image: ${REGISTRY:-opea}/chatqna-ui:${TAG:-latest}
     container_name: chatqna-gaudi-ui-server
     depends_on:
       - chaqna-gaudi-backend-server
diff --git a/ChatQnA/docker/gaudi/compose_vllm_ray.yaml b/ChatQnA/docker/gaudi/compose_vllm_ray.yaml
index 5d98a16004..a0a00ea15a 100644
--- a/ChatQnA/docker/gaudi/compose_vllm_ray.yaml
+++ b/ChatQnA/docker/gaudi/compose_vllm_ray.yaml
@@ -1,9 +1,6 @@
-
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-version: "3.8"
-
 services:
   redis-vector-db:
     image: redis/redis-stack:7.2.0-v9
@@ -12,7 +9,7 @@ services:
       - "6379:6379"
       - "8001:8001"
   dataprep-redis-service:
-    image: opea/dataprep-redis:latest
+    image: ${REGISTRY:-opea}/dataprep-redis:${TAG:-latest}
     container_name: dataprep-redis-server
     depends_on:
       - redis-vector-db
@@ -28,7 +25,7 @@ services:
       TEI_ENDPOINT: ${TEI_EMBEDDING_ENDPOINT}
       HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
   tei-embedding-service:
-    image: opea/tei-gaudi:latest
+    image: ${REGISTRY:-opea}/tei-gaudi:${TAG:-latest}
     container_name: tei-embedding-gaudi-server
     ports:
       - "8090:80"
@@ -47,7 +44,7 @@ services:
       MAX_WARMUP_SEQUENCE_LENGTH: 512
     command: --model-id ${EMBEDDING_MODEL_ID}
   embedding:
-    image: opea/embedding-tei:latest
+    image: ${REGISTRY:-opea}/embedding-tei:${TAG:-latest}
     container_name: embedding-tei-server
     depends_on:
       - tei-embedding-service
@@ -61,7 +58,7 @@ services:
       TEI_EMBEDDING_ENDPOINT: ${TEI_EMBEDDING_ENDPOINT}
     restart: unless-stopped
   retriever:
-    image: opea/retriever-redis:latest
+    image: ${REGISTRY:-opea}/retriever-redis:${TAG:-latest}
     container_name: retriever-redis-server
     depends_on:
       - redis-vector-db
@@ -92,7 +89,7 @@ services:
       HF_HUB_ENABLE_HF_TRANSFER: 0
     command: --model-id ${RERANK_MODEL_ID} --auto-truncate
   reranking:
-    image: opea/reranking-tei:latest
+    image: ${REGISTRY:-opea}/reranking-tei:${TAG:-latest}
     container_name: reranking-tei-gaudi-server
     depends_on:
       - tei-reranking-service
@@ -109,7 +106,7 @@ services:
       HF_HUB_ENABLE_HF_TRANSFER: 0
     restart: unless-stopped
   vllm-ray-service:
-    image: opea/llm-vllm-ray-hpu:latest
+    image: ${REGISTRY:-opea}/llm-vllm-ray-hpu:${TAG:-latest}
     container_name: vllm-ray-gaudi-server
     ports:
       - "8006:8000"
@@ -129,7 +126,7 @@ services:
     ipc: host
     command: /bin/bash -c "ray start --head && python vllm_ray_openai.py --port_number 8000 --model_id_or_path $LLM_MODEL_ID --tensor_parallel_size 2 --enforce_eager True"
   llm:
-    image: opea/llm-vllm-ray:latest
+    image: ${REGISTRY:-opea}/llm-vllm-ray:${TAG:-latest}
     container_name: llm-vllm-ray-gaudi-server
     depends_on:
       - vllm-ray-service
@@ -145,7 +142,7 @@ services:
       LLM_MODEL: ${LLM_MODEL_ID}
     restart: unless-stopped
   chaqna-gaudi-backend-server:
-    image: opea/chatqna:latest
+    image: ${REGISTRY:-opea}/chatqna:${TAG:-latest}
     container_name: chatqna-gaudi-backend-server
     depends_on:
       - redis-vector-db
@@ -171,7 +168,7 @@ services:
     ipc: host
     restart: always
   chaqna-gaudi-ui-server:
-    image: opea/chatqna-ui:latest
+    image: ${REGISTRY:-opea}/chatqna-ui:${TAG:-latest}
     container_name: chatqna-gaudi-ui-server
     depends_on:
       - chaqna-gaudi-backend-server
diff --git a/ChatQnA/docker/gpu/compose.yaml b/ChatQnA/docker/gpu/compose.yaml
index 13f0a3fbc3..31bcfac9ac 100644
--- a/ChatQnA/docker/gpu/compose.yaml
+++ b/ChatQnA/docker/gpu/compose.yaml
@@ -1,9 +1,6 @@
-
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-version: "3.8"
-
 services:
   redis-vector-db:
     image: redis/redis-stack:7.2.0-v9
@@ -12,7 +9,7 @@ services:
       - "6379:6379"
       - "8001:8001"
   dataprep-redis-service:
-    image: opea/dataprep-redis:latest
+    image: ${REGISTRY:-opea}/dataprep-redis:${TAG:-latest}
     container_name: dataprep-redis-server
     depends_on:
       - redis-vector-db
@@ -50,7 +47,7 @@ services:
               count: 1
               capabilities: [gpu]
   embedding:
-    image: opea/embedding-tei:latest
+    image: ${REGISTRY:-opea}/embedding-tei:${TAG:-latest}
     container_name: embedding-tei-server
     depends_on:
       - tei-embedding-service
@@ -64,7 +61,7 @@ services:
       TEI_EMBEDDING_ENDPOINT: ${TEI_EMBEDDING_ENDPOINT}
     restart: unless-stopped
   retriever:
-    image: opea/retriever-redis:latest
+    image: ${REGISTRY:-opea}/retriever-redis:${TAG:-latest}
     container_name: retriever-redis-server
     depends_on:
       - redis-vector-db
@@ -102,7 +99,7 @@ services:
               count: 1
               capabilities: [gpu]
   reranking:
-    image: opea/reranking-tei:latest
+    image: ${REGISTRY:-opea}/reranking-tei:${TAG:-latest}
     container_name: reranking-tei-server
     depends_on:
       - tei-reranking-service
@@ -142,7 +139,7 @@ services:
               count: 1
               capabilities: [gpu]
   llm:
-    image: opea/llm-tgi:latest
+    image: ${REGISTRY:-opea}/llm-tgi:${TAG:-latest}
     container_name: llm-tgi-server
     depends_on:
       - tgi-service
@@ -159,7 +156,7 @@ services:
       HF_HUB_ENABLE_HF_TRANSFER: 0
     restart: unless-stopped
   chaqna-backend-server:
-    image: opea/chatqna:latest
+    image: ${REGISTRY:-opea}/chatqna:${TAG:-latest}
     container_name: chatqna-backend-server
     depends_on:
       - redis-vector-db
@@ -184,7 +181,7 @@ services:
     ipc: host
     restart: always
   chaqna-ui-server:
-    image: opea/chatqna-ui:latest
+    image: ${REGISTRY:-opea}/chatqna-ui:${TAG:-latest}
     container_name: chatqna-ui-server
     depends_on:
       - chaqna-backend-server
diff --git a/ChatQnA/docker/xeon/compose.yaml b/ChatQnA/docker/xeon/compose.yaml
index 6c996a7357..3bad42f577 100644
--- a/ChatQnA/docker/xeon/compose.yaml
+++ b/ChatQnA/docker/xeon/compose.yaml
@@ -1,9 +1,6 @@
-
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-version: "3.8"
-
 services:
   redis-vector-db:
     image: redis/redis-stack:7.2.0-v9
@@ -12,7 +9,7 @@ services:
       - "6379:6379"
       - "8001:8001"
   dataprep-redis-service:
-    image: opea/dataprep-redis:latest
+    image: ${REGISTRY:-opea}/dataprep-redis:${TAG:-latest}
     container_name: dataprep-redis-server
     depends_on:
       - redis-vector-db
@@ -42,7 +39,7 @@ services:
       https_proxy: ${https_proxy}
     command: --model-id ${EMBEDDING_MODEL_ID} --auto-truncate
   embedding:
-    image: opea/embedding-tei:latest
+    image: ${REGISTRY:-opea}/embedding-tei:${TAG:-latest}
     container_name: embedding-tei-server
     depends_on:
       - tei-embedding-service
@@ -56,7 +53,7 @@ services:
       TEI_EMBEDDING_ENDPOINT: ${TEI_EMBEDDING_ENDPOINT}
     restart: unless-stopped
   retriever:
-    image: opea/retriever-redis:latest
+    image: ${REGISTRY:-opea}/retriever-redis:${TAG:-latest}
     container_name: retriever-redis-server
     depends_on:
       - redis-vector-db
@@ -88,7 +85,7 @@ services:
       HF_HUB_ENABLE_HF_TRANSFER: 0
     command: --model-id ${RERANK_MODEL_ID} --auto-truncate
   reranking:
-    image: opea/reranking-tei:latest
+    image: ${REGISTRY:-opea}/reranking-tei:${TAG:-latest}
     container_name: reranking-tei-xeon-server
     depends_on:
       - tei-reranking-service
@@ -121,7 +118,7 @@ services:
       HF_HUB_ENABLE_HF_TRANSFER: 0
     command: --model-id ${LLM_MODEL_ID}
   llm:
-    image: opea/llm-tgi:latest
+    image: ${REGISTRY:-opea}/llm-tgi:${TAG:-latest}
     container_name: llm-tgi-server
     depends_on:
       - tgi-service
@@ -138,7 +135,7 @@ services:
       HF_HUB_ENABLE_HF_TRANSFER: 0
     restart: unless-stopped
   chaqna-xeon-backend-server:
-    image: opea/chatqna:latest
+    image: ${REGISTRY:-opea}/chatqna:${TAG:-latest}
     container_name: chatqna-xeon-backend-server
     depends_on:
       - redis-vector-db
@@ -164,7 +161,7 @@ services:
     ipc: host
     restart: always
   chaqna-xeon-ui-server:
-    image: opea/chatqna-ui:latest
+    image: ${REGISTRY:-opea}/chatqna-ui:${TAG:-latest}
     container_name: chatqna-xeon-ui-server
     depends_on:
       - chaqna-xeon-backend-server
diff --git a/ChatQnA/docker/xeon/compose_qdrant.yaml b/ChatQnA/docker/xeon/compose_qdrant.yaml
index b64dced553..9c4bbf023f 100644
--- a/ChatQnA/docker/xeon/compose_qdrant.yaml
+++ b/ChatQnA/docker/xeon/compose_qdrant.yaml
@@ -1,9 +1,6 @@
-
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-version: "3.8"
-
 services:
   qdrant-vector-db:
     image: qdrant/qdrant
@@ -12,7 +9,7 @@ services:
       - "6333:6333"
       - "6334:6334"
   dataprep-qdrant-service:
-    image: opea/dataprep-qdrant:latest
+    image: ${REGISTRY:-opea}/dataprep-qdrant:${TAG:-latest}
     container_name: dataprep-qdrant-server
     depends_on:
       - qdrant-vector-db
@@ -42,7 +39,7 @@ services:
       https_proxy: ${https_proxy}
     command: --model-id ${EMBEDDING_MODEL_ID} --auto-truncate
   embedding:
-    image: opea/embedding-tei:latest
+    image: ${REGISTRY:-opea}/embedding-tei:${TAG:-latest}
     container_name: embedding-tei-server
     depends_on:
       - tei-embedding-service
@@ -56,7 +53,7 @@ services:
       TEI_EMBEDDING_ENDPOINT: ${TEI_EMBEDDING_ENDPOINT}
     restart: unless-stopped
   retriever:
-    image: opea/retriever-qdrant:latest
+    image: ${REGISTRY:-opea}/retriever-qdrant:${TAG:-latest}
     container_name: retriever-qdrant-server
     depends_on:
       - qdrant-vector-db
@@ -88,7 +85,7 @@ services:
       HF_HUB_ENABLE_HF_TRANSFER: 0
     command: --model-id ${RERANK_MODEL_ID} --auto-truncate
   reranking:
-    image: opea/reranking-tei:latest
+    image: ${REGISTRY:-opea}/reranking-tei:${TAG:-latest}
     container_name: reranking-tei-xeon-server
     depends_on:
       - tei-reranking-service
@@ -121,7 +118,7 @@ services:
       HF_HUB_ENABLE_HF_TRANSFER: 0
     command: --model-id ${LLM_MODEL_ID}
   llm:
-    image: opea/llm-tgi:latest
+    image: ${REGISTRY:-opea}/llm-tgi:${TAG:-latest}
     container_name: llm-tgi-server
     depends_on:
       - tgi-service
@@ -138,7 +135,7 @@ services:
       HF_HUB_ENABLE_HF_TRANSFER: 0
     restart: unless-stopped
   chaqna-xeon-backend-server:
-    image: opea/chatqna:latest
+    image: ${REGISTRY:-opea}/chatqna:${TAG:-latest}
     container_name: chatqna-xeon-backend-server
     depends_on:
       - qdrant-vector-db
@@ -167,7 +164,7 @@ services:
     ipc: host
     restart: always
   chaqna-xeon-ui-server:
-    image: opea/chatqna-ui:latest
+    image: ${REGISTRY:-opea}/chatqna-ui:${TAG:-latest}
     container_name: chatqna-xeon-ui-server
     depends_on:
       - chaqna-xeon-backend-server
diff --git a/ChatQnA/docker/xeon/compose_vllm.yaml b/ChatQnA/docker/xeon/compose_vllm.yaml
index b66218c9aa..4cca92c1f9 100644
--- a/ChatQnA/docker/xeon/compose_vllm.yaml
+++ b/ChatQnA/docker/xeon/compose_vllm.yaml
@@ -1,9 +1,6 @@
-
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-version: "3.8"
-
 services:
   redis-vector-db:
     image: redis/redis-stack:7.2.0-v9
@@ -12,7 +9,7 @@ services:
       - "6379:6379"
       - "8001:8001"
   dataprep-redis-service:
-    image: opea/dataprep-redis:latest
+    image: ${REGISTRY:-opea}/dataprep-redis:${TAG:-latest}
     container_name: dataprep-redis-server
     depends_on:
       - redis-vector-db
@@ -41,7 +38,7 @@ services:
       https_proxy: ${https_proxy}
     command: --model-id ${EMBEDDING_MODEL_ID} --auto-truncate
   embedding:
-    image: opea/embedding-tei:latest
+    image: ${REGISTRY:-opea}/embedding-tei:${TAG:-latest}
     container_name: embedding-tei-server
     depends_on:
       - tei-embedding-service
@@ -58,7 +55,7 @@ services:
       LANGCHAIN_PROJECT: "opea-embedding-service"
     restart: unless-stopped
   retriever:
-    image: opea/retriever-redis:latest
+    image: ${REGISTRY:-opea}/retriever-redis:${TAG:-latest}
     container_name: retriever-redis-server
     depends_on:
       - redis-vector-db
@@ -93,7 +90,7 @@ services:
       HF_HUB_ENABLE_HF_TRANSFER: 0
     command: --model-id ${RERANK_MODEL_ID} --auto-truncate
   reranking:
-    image: opea/reranking-tei:latest
+    image: ${REGISTRY:-opea}/reranking-tei:${TAG:-latest}
     container_name: reranking-tei-xeon-server
     depends_on:
       - tei-reranking-service
@@ -113,7 +110,7 @@ services:
       LANGCHAIN_PROJECT: "opea-reranking-service"
     restart: unless-stopped
   vllm_service:
-    image: opea/vllm:latest
+    image: ${REGISTRY:-opea}/vllm:${TAG:-latest}
     container_name: vllm-service
     ports:
       - "9009:80"
@@ -128,7 +125,7 @@ services:
       LLM_MODEL_ID: ${LLM_MODEL_ID}
     command: --model $LLM_MODEL_ID --host 0.0.0.0 --port 80
   llm:
-    image: opea/llm-vllm:latest
+    image: ${REGISTRY:-opea}/llm-vllm:${TAG:-latest}
     container_name: llm-vllm-server
     depends_on:
       - vllm_service
@@ -149,7 +146,7 @@ services:
       LANGCHAIN_PROJECT: "opea-llm-service"
     restart: unless-stopped
   chaqna-xeon-backend-server:
-    image: opea/chatqna:latest
+    image: ${REGISTRY:-opea}/chatqna:${TAG:-latest}
     container_name: chatqna-xeon-backend-server
     depends_on:
       - redis-vector-db
@@ -174,7 +171,7 @@ services:
     ipc: host
     restart: always
   chaqna-xeon-ui-server:
-    image: opea/chatqna-ui:latest
+    image: ${REGISTRY:-opea}/chatqna-ui:${TAG:-latest}
     container_name: chatqna-xeon-ui-server
     depends_on:
       - chaqna-xeon-backend-server
diff --git a/ChatQnA/tests/test_chatqna_on_gaudi.sh b/ChatQnA/tests/test_chatqna_on_gaudi.sh
index 7c25cb0033..a50e256eab 100644
--- a/ChatQnA/tests/test_chatqna_on_gaudi.sh
+++ b/ChatQnA/tests/test_chatqna_on_gaudi.sh
@@ -3,47 +3,33 @@
 # SPDX-License-Identifier: Apache-2.0
 
 set -e
-echo "IMAGE_REPO=${IMAGE_REPO}"
+IMAGE_REPO=${IMAGE_REPO:-"opea"}
+IMAGE_TAG=${IMAGE_TAG:-"latest"}
+echo "REGISTRY=IMAGE_REPO=${IMAGE_REPO}"
+echo "TAG=IMAGE_TAG=${IMAGE_TAG}"
+export REGISTRY=${IMAGE_REPO}
+export TAG=${IMAGE_TAG}
 
 WORKPATH=$(dirname "$PWD")
 LOG_PATH="$WORKPATH/tests"
 ip_address=$(hostname -I | awk '{print $1}')
 
 function build_docker_images() {
-    cd $WORKPATH
+    cd $WORKPATH/docker
     git clone https://github.com/opea-project/GenAIComps.git
-    cd GenAIComps
-
-    docker build -t opea/embedding-tei:latest -f comps/embeddings/langchain/docker/Dockerfile .
-    docker build -t opea/retriever-redis:latest -f comps/retrievers/langchain/redis/docker/Dockerfile .
-    docker build -t opea/reranking-tei:latest -f comps/reranks/tei/docker/Dockerfile .
-    docker build -t opea/llm-tgi:latest -f comps/llms/text-generation/tgi/Dockerfile .
-    docker build -t opea/dataprep-redis:latest -f comps/dataprep/redis/langchain/docker/Dockerfile .
+    git clone https://github.com/huggingface/tei-gaudi
 
-#    cd ..
-#    git clone https://github.com/huggingface/tei-gaudi
-#    cd tei-gaudi/
-#    docker build --no-cache -f Dockerfile-hpu -t opea/tei-gaudi:latest .
+    echo "Build all the images with --no-cache, check docker_image_build.log for details..."
+    service_list="chatqna chatqna-ui dataprep-redis embedding-tei retriever-redis reranking-tei llm-tgi tei-gaudi"
+    docker compose -f docker_build_compose.yaml build ${service_list} --no-cache > ${LOG_PATH}/docker_image_build.log
 
     docker pull ghcr.io/huggingface/tgi-gaudi:2.0.1
     docker pull ghcr.io/huggingface/text-embeddings-inference:cpu-1.5
 
-    cd $WORKPATH/docker
-    docker build --no-cache -t opea/chatqna:latest -f Dockerfile .
-
-    cd $WORKPATH/docker/ui
-    docker build --no-cache -t opea/chatqna-ui:latest -f docker/Dockerfile .
-
     docker images
 }
 
 function start_services() {
-    # build tei-gaudi for each test instead of pull from local registry
-    cd $WORKPATH
-    git clone https://github.com/huggingface/tei-gaudi
-    cd tei-gaudi/
-    docker build --no-cache -q -f Dockerfile-hpu -t opea/tei-gaudi:latest .
-
     cd $WORKPATH/docker/gaudi
     export EMBEDDING_MODEL_ID="BAAI/bge-base-en-v1.5"
     export RERANK_MODEL_ID="BAAI/bge-reranker-base"
@@ -67,24 +53,9 @@ function start_services() {
 
     sed -i "s/backend_address/$ip_address/g" $WORKPATH/docker/ui/svelte/.env
 
-    if [[ "$IMAGE_REPO" != "" ]]; then
-        # Replace the container name with a test-specific name
-        echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
-        if [ "${mode}" == "perf" ]; then
-            sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose.yaml
-        else
-            sed -i "s#image: opea/chatqna:latest#image: opea/chatqna:${IMAGE_TAG}#g" compose.yaml
-            sed -i "s#image: opea/chatqna-ui:latest#image: opea/chatqna-ui:${IMAGE_TAG}#g" compose.yaml
-            sed -i "s#image: opea/chatqna-conversation-ui:latest#image: opea/chatqna-conversation-ui:${IMAGE_TAG}#g" compose.yaml
-            sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose.yaml
-            sed -i "s#image: ${IMAGE_REPO}opea/tei-gaudi:latest#image: opea/tei-gaudi:latest#g" compose.yaml
-        fi
-        echo "cat compose.yaml"
-        cat compose.yaml
-    fi
-
     # Start Docker Containers
     docker compose up -d
+
     n=0
     until [[ "$n" -ge 400 ]]; do
         docker logs tgi-gaudi-server > ${LOG_PATH}/tgi_service_start.log
@@ -246,13 +217,16 @@ function validate_frontend() {
     cd $WORKPATH/docker/ui/svelte
     local conda_env_name="OPEA_e2e"
     export PATH=${HOME}/miniforge3/bin/:$PATH
-#    conda remove -n ${conda_env_name} --all -y
-#    conda create -n ${conda_env_name} python=3.12 -y
+    if conda info --envs | grep -q "$conda_env_name"; then
+        echo "$conda_env_name exist!"
+    else
+        conda create -n ${conda_env_name} python=3.12 -y
+    fi
     source activate ${conda_env_name}
 
     sed -i "s/localhost/$ip_address/g" playwright.config.ts
 
-#    conda install -c conda-forge nodejs -y
+    conda install -c conda-forge nodejs -y
     npm install && npm ci && npx playwright install --with-deps
     node -v && npm -v && pip list
 
@@ -275,7 +249,7 @@ function stop_docker() {
 function main() {
 
     stop_docker
-    if [[ "$IMAGE_REPO" == "" ]]; then build_docker_images; fi
+    if [[ "$IMAGE_REPO" == "opea" ]]; then build_docker_images; fi
     start_time=$(date +%s)
     start_services
     end_time=$(date +%s)
diff --git a/ChatQnA/tests/test_chatqna_on_xeon.sh b/ChatQnA/tests/test_chatqna_on_xeon.sh
index bff1c55277..9d9c9215d2 100644
--- a/ChatQnA/tests/test_chatqna_on_xeon.sh
+++ b/ChatQnA/tests/test_chatqna_on_xeon.sh
@@ -2,29 +2,28 @@
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-set -xe
-echo "IMAGE_REPO=${IMAGE_REPO}"
+set -e
+IMAGE_REPO=${IMAGE_REPO:-"opea"}
+IMAGE_TAG=${IMAGE_TAG:-"latest"}
+echo "REGISTRY=IMAGE_REPO=${IMAGE_REPO}"
+echo "TAG=IMAGE_TAG=${IMAGE_TAG}"
+export REGISTRY=${IMAGE_REPO}
+export TAG=${IMAGE_TAG}
 
 WORKPATH=$(dirname "$PWD")
 LOG_PATH="$WORKPATH/tests"
 ip_address=$(hostname -I | awk '{print $1}')
 
 function build_docker_images() {
-    cd $WORKPATH
+    cd $WORKPATH/docker
     git clone https://github.com/opea-project/GenAIComps.git
-    cd GenAIComps
-
-    docker build -t opea/embedding-tei:latest -f comps/embeddings/langchain/docker/Dockerfile .
-    docker build -t opea/retriever-redis:latest -f comps/retrievers/langchain/redis/docker/Dockerfile .
-    docker build -t opea/reranking-tei:latest -f comps/reranks/tei/docker/Dockerfile .
-    docker build -t opea/llm-tgi:latest -f comps/llms/text-generation/tgi/Dockerfile .
-    docker build -t opea/dataprep-redis:latest -f comps/dataprep/redis/langchain/docker/Dockerfile .
 
-    cd $WORKPATH/docker
-    docker build --no-cache -t opea/chatqna:latest -f Dockerfile .
+    echo "Build all the images with --no-cache, check docker_image_build.log for details..."
+    service_list="chatqna chatqna-ui chatqna-conversation-ui dataprep-redis embedding-tei retriever-redis reranking-tei llm-tgi"
+    docker compose -f docker_build_compose.yaml build ${service_list} --no-cache > ${LOG_PATH}/docker_image_build.log
 
-    cd $WORKPATH/docker/ui
-    docker build --no-cache -t opea/chatqna-ui:latest -f docker/Dockerfile .
+    docker pull ghcr.io/huggingface/tgi-gaudi:2.0.1
+    docker pull ghcr.io/huggingface/text-embeddings-inference:cpu-1.5
 
     docker images
 }
@@ -54,21 +53,6 @@ function start_services() {
 
     sed -i "s/backend_address/$ip_address/g" $WORKPATH/docker/ui/svelte/.env
 
-    if [[ "$IMAGE_REPO" != "" ]]; then
-        # Replace the container name with a test-specific name
-        echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
-        if [ "${mode}" == "perf" ]; then
-            sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose.yaml
-        else
-            sed -i "s#image: opea/chatqna:latest#image: opea/chatqna:${IMAGE_TAG}#g" compose.yaml
-            sed -i "s#image: opea/chatqna-ui:latest#image: opea/chatqna-ui:${IMAGE_TAG}#g" compose.yaml
-            sed -i "s#image: opea/chatqna-conversation-ui:latest#image: opea/chatqna-conversation-ui:${IMAGE_TAG}#g" compose.yaml
-            sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose.yaml
-        fi
-        echo "cat compose.yaml"
-        cat compose.yaml
-    fi
-
     # Start Docker Containers
     docker compose up -d
     n=0
@@ -233,14 +217,17 @@ function validate_frontend() {
     cd $WORKPATH/docker/ui/svelte
     local conda_env_name="OPEA_e2e"
     export PATH=${HOME}/miniforge3/bin/:$PATH
-#    conda remove -n ${conda_env_name} --all -y
-#    conda create -n ${conda_env_name} python=3.12 -y
+    if conda info --envs | grep -q "$conda_env_name"; then
+        echo "$conda_env_name exist!"
+    else
+        conda create -n ${conda_env_name} python=3.12 -y
+    fi
     source activate ${conda_env_name}
     echo "[ TEST INFO ]: --------- conda env activated ---------"
 
     sed -i "s/localhost/$ip_address/g" playwright.config.ts
 
-#    conda install -c conda-forge nodejs -y
+    conda install -c conda-forge nodejs -y
     npm install && npm ci && npx playwright install --with-deps
     node -v && npm -v && pip list
 
@@ -263,7 +250,7 @@ function stop_docker() {
 function main() {
 
     stop_docker
-    if [[ "$IMAGE_REPO" == "" ]]; then build_docker_images; fi
+    if [[ "$IMAGE_REPO" == "opea" ]]; then build_docker_images; fi
     start_time=$(date +%s)
     start_services
     end_time=$(date +%s)
diff --git a/ChatQnA/tests/test_chatqna_qdrant_on_xeon.sh b/ChatQnA/tests/test_chatqna_qdrant_on_xeon.sh
index 774a6bfb6c..18154764bc 100644
--- a/ChatQnA/tests/test_chatqna_qdrant_on_xeon.sh
+++ b/ChatQnA/tests/test_chatqna_qdrant_on_xeon.sh
@@ -3,28 +3,24 @@
 # SPDX-License-Identifier: Apache-2.0
 
 set -e
-echo "IMAGE_REPO=${IMAGE_REPO}"
+IMAGE_REPO=${IMAGE_REPO:-"opea"}
+IMAGE_TAG=${IMAGE_TAG:-"latest"}
+echo "REGISTRY=IMAGE_REPO=${IMAGE_REPO}"
+echo "TAG=IMAGE_TAG=${IMAGE_TAG}"
+export REGISTRY=${IMAGE_REPO}
+export TAG=${IMAGE_TAG}
 
 WORKPATH=$(dirname "$PWD")
 LOG_PATH="$WORKPATH/tests"
 ip_address=$(hostname -I | awk '{print $1}')
 
 function build_docker_images() {
-    cd $WORKPATH
-    git clone https://github.com/opea-project/GenAIComps.git
-    cd GenAIComps
-
-    docker build -t opea/embedding-tei:latest -f comps/embeddings/langchain/docker/Dockerfile .
-    docker build -t opea/retriever-qdrant:latest -f comps/retrievers/haystack/qdrant/docker/Dockerfile .
-    docker build -t opea/reranking-tei:latest -f comps/reranks/tei/docker/Dockerfile .
-    docker build -t opea/llm-tgi:latest -f comps/llms/text-generation/tgi/Dockerfile .
-    docker build -t opea/dataprep-qdrant:latest -f comps/dataprep/qdrant/docker/Dockerfile .
-
     cd $WORKPATH/docker
-    docker build --no-cache -t opea/chatqna:latest -f Dockerfile .
+    git clone https://github.com/opea-project/GenAIComps.git
 
-    cd $WORKPATH/docker/ui
-    docker build --no-cache -t opea/chatqna-ui:latest -f docker/Dockerfile .
+    echo "Build all the images with --no-cache, check docker_image_build.log for details..."
+    service_list="chatqna chatqna-ui dataprep-qdrant embedding-tei retriever-qdrant reranking-tei llm-tgi"
+    docker compose -f docker_build_compose.yaml build ${service_list} --no-cache > ${LOG_PATH}/docker_image_build.log
 
     docker images
 }
@@ -56,16 +52,6 @@ function start_services() {
 
     sed -i "s/backend_address/$ip_address/g" $WORKPATH/docker/ui/svelte/.env
 
-    if [[ "$IMAGE_REPO" != "" ]]; then
-        # Replace the container name with a test-specific name
-        echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
-        sed -i "s#image: opea/chatqna:latest#image: opea/chatqna:${IMAGE_TAG}#g" compose_qdrant.yaml
-        sed -i "s#image: opea/chatqna-ui:latest#image: opea/chatqna-ui:${IMAGE_TAG}#g" compose_qdrant.yaml
-        sed -i "s#image: opea/chatqna-conversation-ui:latest#image: opea/chatqna-conversation-ui:${IMAGE_TAG}#g" compose_qdrant.yaml
-        sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose_qdrant.yaml
-        cat compose_qdrant.yaml
-    fi
-
     # Start Docker Containers
     docker compose -f compose_qdrant.yaml up -d
     n=0
@@ -235,7 +221,7 @@ function stop_docker() {
 function main() {
 
     stop_docker
-    if [[ "$IMAGE_REPO" == "" ]]; then build_docker_images; fi
+    if [[ "$IMAGE_REPO" == "opea" ]]; then build_docker_images; fi
     start_time=$(date +%s)
     start_services
     end_time=$(date +%s)
diff --git a/ChatQnA/tests/test_chatqna_vllm_on_gaudi.sh b/ChatQnA/tests/test_chatqna_vllm_on_gaudi.sh
index 99e63e06ba..cff22f6e05 100644
--- a/ChatQnA/tests/test_chatqna_vllm_on_gaudi.sh
+++ b/ChatQnA/tests/test_chatqna_vllm_on_gaudi.sh
@@ -3,47 +3,31 @@
 # SPDX-License-Identifier: Apache-2.0
 
 set -e
-echo "IMAGE_REPO=${IMAGE_REPO}"
+IMAGE_REPO=${IMAGE_REPO:-"opea"}
+IMAGE_TAG=${IMAGE_TAG:-"latest"}
+echo "REGISTRY=IMAGE_REPO=${IMAGE_REPO}"
+echo "TAG=IMAGE_TAG=${IMAGE_TAG}"
+export REGISTRY=${IMAGE_REPO}
+export TAG=${IMAGE_TAG}
 
 WORKPATH=$(dirname "$PWD")
 LOG_PATH="$WORKPATH/tests"
 ip_address=$(hostname -I | awk '{print $1}')
 
 function build_docker_images() {
-    cd $WORKPATH
+    cd $WORKPATH/docker
     git clone https://github.com/opea-project/GenAIComps.git
-    cd GenAIComps
-
-    docker build -t opea/embedding-tei:latest -f comps/embeddings/langchain/docker/Dockerfile .
-    docker build -t opea/retriever-redis:latest -f comps/retrievers/langchain/redis/docker/Dockerfile .
-    docker build -t opea/reranking-tei:latest -f comps/reranks/tei/docker/Dockerfile .
-    docker build -t opea/llm-vllm-hpu:latest -f comps/llms/text-generation/vllm/docker/Dockerfile.hpu .
-    docker build -t opea/llm-vllm:latest -f comps/llms/text-generation/vllm/docker/Dockerfile.microservice .
-    docker build -t opea/dataprep-redis:latest -f comps/dataprep/redis/langchain/docker/Dockerfile .
+    git clone https://github.com/huggingface/tei-gaudi
 
-#    cd ..
-#    git clone https://github.com/huggingface/tei-gaudi
-#    cd tei-gaudi/
-#    docker build --no-cache -f Dockerfile-hpu -t opea/tei-gaudi:latest .
+    echo "Build all the images with --no-cache, check docker_image_build.log for details..."
+    service_list="chatqna chatqna-ui dataprep-redis embedding-tei retriever-redis reranking-tei tei-gaudi llm-vllm-hpu llm-vllm"
+    docker compose -f docker_build_compose.yaml build ${service_list} --no-cache > ${LOG_PATH}/docker_image_build.log
 
     docker pull ghcr.io/huggingface/text-embeddings-inference:cpu-1.2
-
-    cd $WORKPATH/docker
-    docker build --no-cache -t opea/chatqna:latest -f Dockerfile .
-
-    cd $WORKPATH/docker/ui
-    docker build --no-cache -t opea/chatqna-ui:latest -f docker/Dockerfile .
-
     docker images
 }
 
 function start_services() {
-    # build tei-gaudi for each test instead of pull from local registry
-    cd $WORKPATH
-    git clone https://github.com/huggingface/tei-gaudi
-    cd tei-gaudi/
-    docker build --no-cache -q -f Dockerfile-hpu -t opea/tei-gaudi:latest .
-
     cd $WORKPATH/docker/gaudi
     export EMBEDDING_MODEL_ID="BAAI/bge-base-en-v1.5"
     export RERANK_MODEL_ID="BAAI/bge-reranker-base"
@@ -65,18 +49,6 @@ function start_services() {
 
     sed -i "s/backend_address/$ip_address/g" $WORKPATH/docker/ui/svelte/.env
 
-    if [[ "$IMAGE_REPO" != "" ]]; then
-        # Replace the container name with a test-specific name
-        echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
-        sed -i "s#image: opea/chatqna:latest#image: opea/chatqna:${IMAGE_TAG}#g" compose_vllm.yaml
-        sed -i "s#image: opea/chatqna-ui:latest#image: opea/chatqna-ui:${IMAGE_TAG}#g" compose_vllm.yaml
-        sed -i "s#image: opea/chatqna-conversation-ui:latest#image: opea/chatqna-conversation-ui:${IMAGE_TAG}#g" compose_vllm.yaml
-        sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose_vllm.yaml
-        sed -i "s#image: ${IMAGE_REPO}opea/tei-gaudi:latest#image: opea/tei-gaudi:latest#g" compose_vllm.yaml
-        echo "cat compose_vllm.yaml"
-        cat compose_vllm.yaml
-    fi
-
     # Start Docker Containers
     docker compose -f compose_vllm.yaml up -d
     n=0
@@ -198,13 +170,16 @@ function validate_frontend() {
     cd $WORKPATH/docker/ui/svelte
     local conda_env_name="OPEA_e2e"
     export PATH=${HOME}/miniforge3/bin/:$PATH
-#    conda remove -n ${conda_env_name} --all -y
-#    conda create -n ${conda_env_name} python=3.12 -y
+    if conda info --envs | grep -q "$conda_env_name"; then
+        echo "$conda_env_name exist!"
+    else
+        conda create -n ${conda_env_name} python=3.12 -y
+    fi
     source activate ${conda_env_name}
 
     sed -i "s/localhost/$ip_address/g" playwright.config.ts
 
-#    conda install -c conda-forge nodejs -y
+    conda install -c conda-forge nodejs -y
     npm install && npm ci && npx playwright install --with-deps
     node -v && npm -v && pip list
 
@@ -227,7 +202,7 @@ function stop_docker() {
 function main() {
 
     stop_docker
-    if [[ "$IMAGE_REPO" == "" ]]; then build_docker_images; fi
+    if [[ "$IMAGE_REPO" == "opea" ]]; then build_docker_images; fi
     start_time=$(date +%s)
     start_services
     end_time=$(date +%s)
diff --git a/ChatQnA/tests/test_chatqna_vllm_on_xeon.sh b/ChatQnA/tests/test_chatqna_vllm_on_xeon.sh
index a424187cd8..f27def0213 100644
--- a/ChatQnA/tests/test_chatqna_vllm_on_xeon.sh
+++ b/ChatQnA/tests/test_chatqna_vllm_on_xeon.sh
@@ -3,43 +3,33 @@
 # SPDX-License-Identifier: Apache-2.0
 
 set -e
-echo "IMAGE_REPO=${IMAGE_REPO}"
+IMAGE_REPO=${IMAGE_REPO:-"opea"}
+IMAGE_TAG=${IMAGE_TAG:-"latest"}
+echo "REGISTRY=IMAGE_REPO=${IMAGE_REPO}"
+echo "TAG=IMAGE_TAG=${IMAGE_TAG}"
+export REGISTRY=${IMAGE_REPO}
+export TAG=${IMAGE_TAG}
 
 WORKPATH=$(dirname "$PWD")
 LOG_PATH="$WORKPATH/tests"
 ip_address=$(hostname -I | awk '{print $1}')
 
 function build_docker_images() {
-    cd $WORKPATH
-    git clone https://github.com/opea-project/GenAIComps.git
-    cd GenAIComps
-
-    docker build -t opea/embedding-tei:latest -f comps/embeddings/langchain/docker/Dockerfile .
-    docker build -t opea/retriever-redis:latest -f comps/retrievers/langchain/redis/docker/Dockerfile .
-    docker build -t opea/reranking-tei:latest -f comps/reranks/tei/docker/Dockerfile .
-    docker build -t opea/llm-vllm:latest -f comps/llms/text-generation/vllm/docker/Dockerfile.microservice .
-    docker build -t opea/dataprep-redis:latest -f comps/dataprep/redis/langchain/docker/Dockerfile .
-
     cd $WORKPATH/docker
-    docker build --no-cache -t opea/chatqna:latest -f Dockerfile .
+    git clone https://github.com/opea-project/GenAIComps.git
+    git clone https://github.com/vllm-project/vllm.git
 
-    cd $WORKPATH/docker/ui
-    docker build --no-cache -t opea/chatqna-ui:latest -f docker/Dockerfile .
+    echo "Build all the images with --no-cache, check docker_image_build.log for details..."
+    service_list="chatqna chatqna-ui dataprep-redis embedding-tei retriever-redis reranking-tei llm-vllm vllm"
+    docker compose -f docker_build_compose.yaml build ${service_list} --no-cache > ${LOG_PATH}/docker_image_build.log
 
-    # cd $WORKPATH
-    # git clone https://github.com/vllm-project/vllm.git
-    # cd vllm
-    # docker build --no-cache -t opea/vllm:latest -f Dockerfile.cpu .
+    docker pull ghcr.io/huggingface/tgi-gaudi:2.0.1
+    docker pull ghcr.io/huggingface/text-embeddings-inference:cpu-1.5
 
     docker images
 }
 
 function start_services() {
-    cd $WORKPATH
-    git clone https://github.com/vllm-project/vllm.git
-    cd vllm
-    docker build --no-cache -t opea/vllm:latest -f Dockerfile.cpu .
-
     cd $WORKPATH/docker/xeon
 
     export EMBEDDING_MODEL_ID="BAAI/bge-base-en-v1.5"
@@ -62,29 +52,15 @@ function start_services() {
 
     sed -i "s/backend_address/$ip_address/g" $WORKPATH/docker/ui/svelte/.env
 
-    if [[ "$IMAGE_REPO" != "" ]]; then
-        # Replace the container name with a test-specific name
-        echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
-        if [ "${mode}" == "perf" ]; then
-            sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose_vllm.yaml
-        else
-            sed -i "s#image: opea/chatqna:latest#image: opea/chatqna:${IMAGE_TAG}#g" compose_vllm.yaml
-            sed -i "s#image: opea/chatqna-ui:latest#image: opea/chatqna-ui:${IMAGE_TAG}#g" compose_vllm.yaml
-            sed -i "s#image: opea/chatqna-conversation-ui:latest#image: opea/chatqna-conversation-ui:${IMAGE_TAG}#g" compose_vllm.yaml
-            sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose_vllm.yaml
-            sed -i "s#image: ${IMAGE_REPO}opea/vllm:latest#image: opea/vllm:latest#g" compose_vllm.yaml
-        fi
-    fi
-
     # Start Docker Containers
     docker compose -f compose_vllm.yaml up -d
     n=0
-    until [[ "$n" -ge 10 ]]; do
+    until [[ "$n" -ge 100 ]]; do
         docker logs vllm-service > ${LOG_PATH}/vllm_service_start.log
         if grep -q Connected ${LOG_PATH}/vllm_service_start.log; then
             break
         fi
-        sleep 10s
+        sleep 5s
         n=$((n+1))
     done
 }
@@ -196,13 +172,17 @@ function validate_frontend() {
     cd $WORKPATH/docker/ui/svelte
     local conda_env_name="OPEA_e2e"
     export PATH=${HOME}/miniforge3/bin/:$PATH
-#    conda remove -n ${conda_env_name} --all -y
-#    conda create -n ${conda_env_name} python=3.12 -y
+    if conda info --envs | grep -q "$conda_env_name"; then
+        echo "$conda_env_name exist!"
+    else
+        conda create -n ${conda_env_name} python=3.12 -y
+    fi
+
     source activate ${conda_env_name}
 
     sed -i "s/localhost/$ip_address/g" playwright.config.ts
 
-#    conda install -c conda-forge nodejs -y
+    conda install -c conda-forge nodejs -y
     npm install && npm ci && npx playwright install --with-deps
     node -v && npm -v && pip list
 
@@ -225,7 +205,7 @@ function stop_docker() {
 function main() {
 
     stop_docker
-    if [[ "$IMAGE_REPO" == "" ]]; then build_docker_images; fi
+    if [[ "$IMAGE_REPO" == "opea" ]]; then build_docker_images; fi
     start_time=$(date +%s)
     start_services
     end_time=$(date +%s)
diff --git a/ChatQnA/tests/test_chatqna_vllm_ray_on_gaudi.sh b/ChatQnA/tests/test_chatqna_vllm_ray_on_gaudi.sh
index 9099598bb5..3000479119 100644
--- a/ChatQnA/tests/test_chatqna_vllm_ray_on_gaudi.sh
+++ b/ChatQnA/tests/test_chatqna_vllm_ray_on_gaudi.sh
@@ -3,46 +3,31 @@
 # SPDX-License-Identifier: Apache-2.0
 
 set -e
-echo "IMAGE_REPO=${IMAGE_REPO}"
+IMAGE_REPO=${IMAGE_REPO:-"opea"}
+IMAGE_TAG=${IMAGE_TAG:-"latest"}
+echo "REGISTRY=IMAGE_REPO=${IMAGE_REPO}"
+echo "TAG=IMAGE_TAG=${IMAGE_TAG}"
+export REGISTRY=${IMAGE_REPO}
+export TAG=${IMAGE_TAG}
 
 WORKPATH=$(dirname "$PWD")
 LOG_PATH="$WORKPATH/tests"
 ip_address=$(hostname -I | awk '{print $1}')
 
 function build_docker_images() {
-    cd $WORKPATH
+    cd $WORKPATH/docker
     git clone https://github.com/opea-project/GenAIComps.git
-    cd GenAIComps
-
-    docker build -t opea/embedding-tei:latest -f comps/embeddings/langchain/docker/Dockerfile .
-    docker build -t opea/retriever-redis:latest -f comps/retrievers/langchain/redis/docker/Dockerfile .
-    docker build -t opea/reranking-tei:latest -f comps/reranks/tei/docker/Dockerfile .
-    docker build -t opea/llm-vllm-ray-hpu:latest -f comps/llms/text-generation/vllm-ray/docker/Dockerfile.vllmray .
-    docker build -t opea/llm-vllm-ray:latest -f comps/llms/text-generation/vllm-ray/docker/Dockerfile.microservice .
-    docker build -t opea/dataprep-redis:latest -f comps/dataprep/redis/langchain/docker/Dockerfile .
+    git clone https://github.com/huggingface/tei-gaudi
 
-#    cd ..
-#    git clone https://github.com/huggingface/tei-gaudi
-#    cd tei-gaudi/
-#    docker build --no-cache -f Dockerfile-hpu -t opea/tei-gaudi:latest .
+    echo "Build all the images with --no-cache, check docker_image_build.log for details..."
+    service_list="chatqna chatqna-ui dataprep-redis embedding-tei retriever-redis reranking-tei tei-gaudi llm-vllm-ray-hpu llm-vllm-ray"
+    docker compose -f docker_build_compose.yaml build ${service_list} --no-cache > ${LOG_PATH}/docker_image_build.log
 
     docker pull ghcr.io/huggingface/text-embeddings-inference:cpu-1.2
-
-    cd $WORKPATH/docker
-    docker build --no-cache -t opea/chatqna:latest -f Dockerfile .
-
-    cd $WORKPATH/docker/ui
-    docker build --no-cache -t opea/chatqna-ui:latest -f docker/Dockerfile .
-
     docker images
 }
 
 function start_services() {
-    # build tei-gaudi for each test instead of pull from local registry
-    cd $WORKPATH
-    git clone https://github.com/huggingface/tei-gaudi
-    cd tei-gaudi/
-    docker build --no-cache -q -f Dockerfile-hpu -t opea/tei-gaudi:latest .
 
     cd $WORKPATH/docker/gaudi
     export EMBEDDING_MODEL_ID="BAAI/bge-base-en-v1.5"
@@ -65,18 +50,6 @@ function start_services() {
 
     sed -i "s/backend_address/$ip_address/g" $WORKPATH/docker/ui/svelte/.env
 
-    if [[ "$IMAGE_REPO" != "" ]]; then
-        # Replace the container name with a test-specific name
-        echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
-        sed -i "s#image: opea/chatqna:latest#image: opea/chatqna:${IMAGE_TAG}#g" compose_vllm_ray.yaml
-        sed -i "s#image: opea/chatqna-ui:latest#image: opea/chatqna-ui:${IMAGE_TAG}#g" compose_vllm_ray.yaml
-        sed -i "s#image: opea/chatqna-conversation-ui:latest#image: opea/chatqna-conversation-ui:${IMAGE_TAG}#g" compose_vllm_ray.yaml
-        sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose_vllm_ray.yaml
-        sed -i "s#image: ${IMAGE_REPO}opea/tei-gaudi:latest#image: opea/tei-gaudi:latest#g" compose_vllm_ray.yaml
-        echo "cat compose_vllm_ray.yaml"
-        cat compose_vllm_ray.yaml
-    fi
-
     # Start Docker Containers
     docker compose -f compose_vllm_ray.yaml up -d
     n=0
@@ -198,13 +171,16 @@ function validate_frontend() {
     cd $WORKPATH/docker/ui/svelte
     local conda_env_name="OPEA_e2e"
     export PATH=${HOME}/miniforge3/bin/:$PATH
-#    conda remove -n ${conda_env_name} --all -y
-#    conda create -n ${conda_env_name} python=3.12 -y
+    if conda info --envs | grep -q "$conda_env_name"; then
+        echo "$conda_env_name exist!"
+    else
+        conda create -n ${conda_env_name} python=3.12 -y
+    fi
     source activate ${conda_env_name}
 
     sed -i "s/localhost/$ip_address/g" playwright.config.ts
 
-#    conda install -c conda-forge nodejs -y
+    conda install -c conda-forge nodejs -y
     npm install && npm ci && npx playwright install --with-deps
     node -v && npm -v && pip list
 
@@ -227,7 +203,7 @@ function stop_docker() {
 function main() {
 
     stop_docker
-    if [[ "$IMAGE_REPO" == "" ]]; then build_docker_images; fi
+    if [[ "$IMAGE_REPO" == "opea" ]]; then build_docker_images; fi
     start_time=$(date +%s)
     start_services
     end_time=$(date +%s)
diff --git a/CodeGen/docker/docker_build_compose.yaml b/CodeGen/docker/docker_build_compose.yaml
new file mode 100644
index 0000000000..bc1db1194a
--- /dev/null
+++ b/CodeGen/docker/docker_build_compose.yaml
@@ -0,0 +1,30 @@
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
+
+services:
+  codegen:
+    build:
+      args:
+        http_proxy: ${http_proxy}
+        https_proxy: ${https_proxy}
+        no_proxy: ${no_proxy}
+      dockerfile: ./Dockerfile
+    image: ${REGISTRY:-opea}/codegen:${TAG:-latest}
+  codegen-ui:
+    build:
+      context: ui
+      dockerfile: ./docker/Dockerfile
+    extends: codegen
+    image: ${REGISTRY:-opea}/codegen-ui:${TAG:-latest}
+  codegen-react-ui:
+    build:
+      context: ui
+      dockerfile: ./docker/Dockerfile.react
+    extends: codegen
+    image: ${REGISTRY:-opea}/codegen-conversation-ui:${TAG:-latest}
+  llm-tgi:
+    build:
+      context: GenAIComps
+      dockerfile: comps/llms/text-generation/tgi/Dockerfile
+    extends: codegen
+    image: ${REGISTRY}opea/llm-tgi:${TAG:-latest}
diff --git a/CodeGen/docker/gaudi/README.md b/CodeGen/docker/gaudi/README.md
index a3ffc8a72f..a563f416ba 100644
--- a/CodeGen/docker/gaudi/README.md
+++ b/CodeGen/docker/gaudi/README.md
@@ -148,16 +148,24 @@ To access the frontend, open the following URL in your browser: `http://{host_ip
 
 ![project-screenshot](../../assets/img/codeGen_ui_init.jpg)
 
-## 🚀 Launch the React Based UI
+## 🚀 Launch the React Based UI (Optional)
 
-To access the frontend, open the following URL in your browser: `http://{host_ip}:5174`. By default, the UI runs on port 5174 internally. If you prefer to use a different host port to access the frontend, you can modify the port mapping in the `compose.yaml` file as shown below:
+To access the React-based frontend, modify the UI service in the `compose.yaml` file. Replace `codegen-gaudi-ui-server` service with the `codegen-gaudi-react-ui-server` service as per the config below:
 
 ```yaml
-  codegen-gaudi-react-ui-server:
-    image: opea/codegen-react-ui:latest
-    ...
-    ports:
-      - "80:5174"
+codegen-gaudi-react-ui-server:
+  image: ${REGISTRY:-opea}/codegen-react-ui:${TAG:-latest}
+  container_name: codegen-gaudi-react-ui-server
+  environment:
+    - no_proxy=${no_proxy}
+    - https_proxy=${https_proxy}
+    - http_proxy=${http_proxy}
+  depends_on:
+    - codegen-gaudi-backend-server
+  ports:
+    - "5174:80"
+  ipc: host
+  restart: always
 ```
 
 ![project-screenshot](../../assets/img/codegen_react.png)
diff --git a/CodeGen/docker/gaudi/compose.yaml b/CodeGen/docker/gaudi/compose.yaml
index 074743015f..c1bae7b902 100644
--- a/CodeGen/docker/gaudi/compose.yaml
+++ b/CodeGen/docker/gaudi/compose.yaml
@@ -1,9 +1,6 @@
-
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-version: "3.8"
-
 services:
   tgi-service:
     image: ghcr.io/huggingface/tgi-gaudi:2.0.1
@@ -25,7 +22,7 @@ services:
     ipc: host
     command: --model-id ${LLM_MODEL_ID} --max-input-length 1024 --max-total-tokens 2048
   llm:
-    image: opea/llm-tgi:latest
+    image: ${REGISTRY:-opea}/llm-tgi:${TAG:-latest}
     container_name: llm-tgi-gaudi-server
     depends_on:
       - tgi-service
@@ -40,7 +37,7 @@ services:
       HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
     restart: unless-stopped
   codegen-gaudi-backend-server:
-    image: opea/codegen:latest
+    image: ${REGISTRY:-opea}/codegen:${TAG:-latest}
     container_name: codegen-gaudi-backend-server
     depends_on:
       - llm
@@ -55,7 +52,7 @@ services:
     ipc: host
     restart: always
   codegen-gaudi-ui-server:
-    image: opea/codegen-ui:latest
+    image: ${REGISTRY:-opea}/codegen-ui:${TAG:-latest}
     container_name: codegen-gaudi-ui-server
     depends_on:
       - codegen-gaudi-backend-server
@@ -69,16 +66,6 @@ services:
     ipc: host
     restart: always
 
-  codegen-gaudi-react-ui-server:
-    image: opea/codegen-react-ui:latest
-    container_name: codegen-gaudi-react-ui-server
-    depends_on:
-      - codegen-gaudi-backend-server
-    ports:
-      - "5174:80"
-    ipc: host
-    restart: always
-
 networks:
   default:
     driver: bridge
diff --git a/CodeGen/docker/xeon/README.md b/CodeGen/docker/xeon/README.md
index 29efec031a..74b5a2b7c2 100644
--- a/CodeGen/docker/xeon/README.md
+++ b/CodeGen/docker/xeon/README.md
@@ -155,16 +155,24 @@ Here is an example of running CodeGen in the UI:
 
 ![project-screenshot](../../assets/img/codeGen_ui_response.png)
 
-## 🚀 Launch the React Based UI
+## 🚀 Launch the React Based UI (Optional)
 
-To access the frontend, open the following URL in your browser: `http://{host_ip}:5174`. By default, the UI runs on port 5174 internally. If you prefer to use a different host port to access the frontend, you can modify the port mapping in the `compose.yaml` file as shown below:
+To access the React-based frontend, modify the UI service in the `compose.yaml` file. Replace `codegen-xeon-ui-server` service with the `codegen-xeon-react-ui-server` service as per the config below:
 
 ```yaml
-  codegen-xeon-react-ui-server:
-    image: opea/codegen-react-ui:latest
-    ...
-    ports:
-      - "80:5174"
+codegen-xeon-react-ui-server:
+  image: ${REGISTRY:-opea}/codegen-react-ui:${TAG:-latest}
+  container_name: codegen-xeon-react-ui-server
+  environment:
+    - no_proxy=${no_proxy}
+    - https_proxy=${https_proxy}
+    - http_proxy=${http_proxy}
+  depends_on:
+    - codegen-xeon-backend-server
+  ports:
+    - "5174:80"
+  ipc: host
+  restart: always
 ```
 
 ![project-screenshot](../../assets/img/codegen_react.png)
diff --git a/CodeGen/docker/xeon/compose.yaml b/CodeGen/docker/xeon/compose.yaml
index b002a39840..c33a12ef49 100644
--- a/CodeGen/docker/xeon/compose.yaml
+++ b/CodeGen/docker/xeon/compose.yaml
@@ -1,9 +1,6 @@
-
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-version: "3.8"
-
 services:
   tgi-service:
     image: ghcr.io/huggingface/text-generation-inference:1.4
@@ -20,7 +17,7 @@ services:
       HF_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
     command: --model-id ${LLM_MODEL_ID}
   llm:
-    image: opea/llm-tgi:latest
+    image: ${REGISTRY:-opea}/llm-tgi:${TAG:-latest}
     container_name: llm-tgi-server
     depends_on:
       - tgi-service
@@ -35,7 +32,7 @@ services:
       HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
     restart: unless-stopped
   codegen-xeon-backend-server:
-    image: opea/codegen:latest
+    image: ${REGISTRY:-opea}/codegen:${TAG:-latest}
     container_name: codegen-xeon-backend-server
     depends_on:
       - llm
@@ -50,7 +47,7 @@ services:
     ipc: host
     restart: always
   codegen-xeon-ui-server:
-    image: opea/codegen-ui:latest
+    image: ${REGISTRY:-opea}/codegen-ui:${TAG:-latest}
     container_name: codegen-xeon-ui-server
     depends_on:
       - codegen-xeon-backend-server
@@ -63,15 +60,6 @@ services:
       - BASIC_URL=${BACKEND_SERVICE_ENDPOINT}
     ipc: host
     restart: always
-  codegen-xeon-react-ui-server:
-    image: opea/codegen-react-ui:latest
-    container_name: codegen-xeon-react-ui-server
-    depends_on:
-      - codegen-xeon-backend-server
-    ports:
-      - "5174:80"
-    ipc: host
-    restart: always
 
 networks:
   default:
diff --git a/CodeGen/tests/test_codegen_on_gaudi.sh b/CodeGen/tests/test_codegen_on_gaudi.sh
index dd2005a712..2727ca75df 100644
--- a/CodeGen/tests/test_codegen_on_gaudi.sh
+++ b/CodeGen/tests/test_codegen_on_gaudi.sh
@@ -3,33 +3,31 @@
 # SPDX-License-Identifier: Apache-2.0
 
 set -xe
+IMAGE_REPO=${IMAGE_REPO:-"opea"}
+IMAGE_TAG=${IMAGE_TAG:-"latest"}
+echo "REGISTRY=IMAGE_REPO=${IMAGE_REPO}"
+echo "TAG=IMAGE_TAG=${IMAGE_TAG}"
+export REGISTRY=${IMAGE_REPO}
+export TAG=${IMAGE_TAG}
 
 WORKPATH=$(dirname "$PWD")
 LOG_PATH="$WORKPATH/tests"
 ip_address=$(hostname -I | awk '{print $1}')
 
 function build_docker_images() {
-    cd $WORKPATH
+    cd $WORKPATH/docker
     git clone https://github.com/opea-project/GenAIComps.git
-    cd GenAIComps
 
-    docker build -t opea/llm-tgi:latest -f comps/llms/text-generation/tgi/Dockerfile .
+    echo "Build all the images with --no-cache, check docker_image_build.log for details..."
+    service_list="codegen codegen-ui llm-tgi"
+    docker compose -f docker_build_compose.yaml build ${service_list} --no-cache > ${LOG_PATH}/docker_image_build.log
 
     docker pull ghcr.io/huggingface/tgi-gaudi:2.0.1
-
-    cd $WORKPATH/docker
-    docker build --no-cache -t opea/codegen:latest -f Dockerfile .
-
-    cd $WORKPATH/docker/ui
-    docker build --no-cache -t opea/codegen-ui:latest -f docker/Dockerfile .
-    docker build --no-cache --build-arg BACKEND_SERVICE_ENDPOINT=http://${ip_address}:7778/v1/codegen -t opea/codegen--react-ui:latest -f docker/Dockerfile.react .
-
     docker images
 }
 
 function start_services() {
     cd $WORKPATH/docker/gaudi
-
     export LLM_MODEL_ID="Intel/neural-chat-7b-v3-3"
     export TGI_LLM_ENDPOINT="http://${ip_address}:8028"
     export HUGGINGFACEHUB_API_TOKEN=${HUGGINGFACEHUB_API_TOKEN}
@@ -39,17 +37,6 @@ function start_services() {
 
     sed -i "s/backend_address/$ip_address/g" $WORKPATH/docker/ui/svelte/.env
 
-    if [[ "$IMAGE_REPO" != "" ]]; then
-        # Replace the container name with a test-specific name
-        echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
-        sed -i "s#image: opea/codegen:latest#image: opea/codegen:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/codegen-ui:latest#image: opea/codegen-ui:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/codegen-react-ui:latest#image: opea/codegen-react-ui:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose.yaml
-        echo "cat compose.yaml"
-        cat compose.yaml
-    fi
-
     # Start Docker Containers
     docker compose up -d
 
@@ -126,13 +113,16 @@ function validate_frontend() {
     cd $WORKPATH/docker/ui/svelte
     local conda_env_name="OPEA_e2e"
     export PATH=${HOME}/miniforge3/bin/:$PATH
-#    conda remove -n ${conda_env_name} --all -y
-#    conda create -n ${conda_env_name} python=3.12 -y
+    if conda info --envs | grep -q "$conda_env_name"; then
+        echo "$conda_env_name exist!"
+    else
+        conda create -n ${conda_env_name} python=3.12 -y
+    fi
     source activate ${conda_env_name}
 
     sed -i "s/localhost/$ip_address/g" playwright.config.ts
 
-#    conda install -c conda-forge nodejs -y
+    conda install -c conda-forge nodejs -y
     npm install && npm ci && npx playwright install --with-deps
     node -v && npm -v && pip list
 
@@ -156,7 +146,7 @@ function main() {
 
     stop_docker
 
-    if [[ "$IMAGE_REPO" == "" ]]; then build_docker_images; fi
+    if [[ "$IMAGE_REPO" == "opea" ]]; then build_docker_images; fi
     start_services
 
     validate_microservices
diff --git a/CodeGen/tests/test_codegen_on_xeon.sh b/CodeGen/tests/test_codegen_on_xeon.sh
index 987fb8b813..0a781452a4 100644
--- a/CodeGen/tests/test_codegen_on_xeon.sh
+++ b/CodeGen/tests/test_codegen_on_xeon.sh
@@ -3,27 +3,26 @@
 # SPDX-License-Identifier: Apache-2.0
 
 set -xe
+IMAGE_REPO=${IMAGE_REPO:-"opea"}
+IMAGE_TAG=${IMAGE_TAG:-"latest"}
+echo "REGISTRY=IMAGE_REPO=${IMAGE_REPO}"
+echo "TAG=IMAGE_TAG=${IMAGE_TAG}"
+export REGISTRY=${IMAGE_REPO}
+export TAG=${IMAGE_TAG}
 
 WORKPATH=$(dirname "$PWD")
 LOG_PATH="$WORKPATH/tests"
 ip_address=$(hostname -I | awk '{print $1}')
 
 function build_docker_images() {
-    cd $WORKPATH
+    cd $WORKPATH/docker
     git clone https://github.com/opea-project/GenAIComps.git
-    cd GenAIComps
 
-    docker build -t opea/llm-tgi:latest -f comps/llms/text-generation/tgi/Dockerfile .
+    echo "Build all the images with --no-cache, check docker_image_build.log for details..."
+    service_list="codegen codegen-ui llm-tgi"
+    docker compose -f docker_build_compose.yaml build ${service_list} --no-cache > ${LOG_PATH}/docker_image_build.log
 
     docker pull ghcr.io/huggingface/text-generation-inference:1.4
-
-    cd $WORKPATH/docker
-    docker build --no-cache -t opea/codegen:latest -f Dockerfile .
-
-    cd $WORKPATH/docker/ui
-    docker build --no-cache -t opea/codegen-ui:latest -f docker/Dockerfile .
-    docker build --no-cache --build-arg BACKEND_SERVICE_ENDPOINT=http://${ip_address}:7778/v1/codegen -t opea/codegen-react-ui:latest -f docker/Dockerfile.react .
-
     docker images
 }
 
@@ -39,17 +38,6 @@ function start_services() {
 
     sed -i "s/backend_address/$ip_address/g" $WORKPATH/docker/ui/svelte/.env
 
-    if [[ "$IMAGE_REPO" != "" ]]; then
-        # Replace the container name with a test-specific name
-        echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
-        sed -i "s#image: opea/codegen:latest#image: opea/codegen:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/codegen-ui:latest#image: opea/codegen-ui:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/codegen-react-ui:latest#image: opea/codegen-react-ui:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose.yaml
-        echo "cat compose.yaml"
-        cat compose.yaml
-    fi
-
     # Start Docker Containers
     docker compose up -d
 
@@ -126,13 +114,16 @@ function validate_frontend() {
     cd $WORKPATH/docker/ui/svelte
     local conda_env_name="OPEA_e2e"
     export PATH=${HOME}/miniforge3/bin/:$PATH
-#    conda remove -n ${conda_env_name} --all -y
-#    conda create -n ${conda_env_name} python=3.12 -y
+    if conda info --envs | grep -q "$conda_env_name"; then
+        echo "$conda_env_name exist!"
+    else
+        conda create -n ${conda_env_name} python=3.12 -y
+    fi
     source activate ${conda_env_name}
 
     sed -i "s/localhost/$ip_address/g" playwright.config.ts
 
-#    conda install -c conda-forge nodejs -y
+    conda install -c conda-forge nodejs -y
     npm install && npm ci && npx playwright install --with-deps
     node -v && npm -v && pip list
 
@@ -157,7 +148,7 @@ function main() {
 
     stop_docker
 
-    if [[ "$IMAGE_REPO" == "" ]]; then build_docker_images; fi
+    if [[ "$IMAGE_REPO" == "opea" ]]; then build_docker_images; fi
     start_services
 
     validate_microservices
diff --git a/CodeTrans/docker/docker_build_compose.yaml b/CodeTrans/docker/docker_build_compose.yaml
new file mode 100644
index 0000000000..2f2849619d
--- /dev/null
+++ b/CodeTrans/docker/docker_build_compose.yaml
@@ -0,0 +1,24 @@
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
+
+services:
+  codetrans:
+    build:
+      args:
+        http_proxy: ${http_proxy}
+        https_proxy: ${https_proxy}
+        no_proxy: ${no_proxy}
+      dockerfile: ./Dockerfile
+    image: ${REGISTRY:-opea}/codetrans:${TAG:-latest}
+  codetrans-ui:
+    build:
+      context: ui
+      dockerfile: ./docker/Dockerfile
+    extends: codetrans
+    image: ${REGISTRY:-opea}/codetrans-ui:${TAG:-latest}
+  llm-tgi:
+    build:
+      context: GenAIComps
+      dockerfile: comps/llms/text-generation/tgi/Dockerfile
+    extends: codetrans
+    image: ${REGISTRY:-opea}/llm-tgi:${TAG:-latest}
diff --git a/CodeTrans/docker/gaudi/compose.yaml b/CodeTrans/docker/gaudi/compose.yaml
index 88ba9dc72e..e206d13bef 100644
--- a/CodeTrans/docker/gaudi/compose.yaml
+++ b/CodeTrans/docker/gaudi/compose.yaml
@@ -1,9 +1,6 @@
-
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-version: "3.8"
-
 services:
   tgi-service:
     image: ghcr.io/huggingface/tgi-gaudi:2.0.1
@@ -25,7 +22,7 @@ services:
     ipc: host
     command: --model-id ${LLM_MODEL_ID} --max-input-length 1024 --max-total-tokens 2048
   llm:
-    image: opea/llm-tgi:latest
+    image: ${REGISTRY:-opea}/llm-tgi:${TAG:-latest}
     container_name: llm-tgi-gaudi-server
     ports:
       - "9000:9000"
@@ -38,7 +35,7 @@ services:
       HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
     restart: unless-stopped
   codetrans-gaudi-backend-server:
-    image: opea/codetrans:latest
+    image: ${REGISTRY:-opea}/codetrans:${TAG:-latest}
     container_name: codetrans-gaudi-backend-server
     depends_on:
       - tgi-service
@@ -54,7 +51,7 @@ services:
     ipc: host
     restart: always
   codetrans-gaudi-ui-server:
-    image: opea/codetrans-ui:latest
+    image: ${REGISTRY:-opea}/codetrans-ui:${TAG:-latest}
     container_name: codetrans-gaudi-ui-server
     depends_on:
       - codetrans-gaudi-backend-server
diff --git a/CodeTrans/docker/xeon/compose.yaml b/CodeTrans/docker/xeon/compose.yaml
index a236b88769..f4a5ad68aa 100644
--- a/CodeTrans/docker/xeon/compose.yaml
+++ b/CodeTrans/docker/xeon/compose.yaml
@@ -1,9 +1,6 @@
-
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-version: "3.8"
-
 services:
   tgi-service:
     image: ghcr.io/huggingface/text-generation-inference:1.4
@@ -20,7 +17,7 @@ services:
       HF_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
     command: --model-id ${LLM_MODEL_ID}
   llm:
-    image: opea/llm-tgi:latest
+    image: ${REGISTRY:-opea}/llm-tgi:${TAG:-latest}
     container_name: llm-tgi-server
     ports:
       - "9000:9000"
@@ -33,7 +30,7 @@ services:
       HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
     restart: unless-stopped
   codetrans-xeon-backend-server:
-    image: opea/codetrans:latest
+    image: ${REGISTRY:-opea}/codetrans:${TAG:-latest}
     container_name: codetrans-xeon-backend-server
     depends_on:
       - tgi-service
@@ -49,7 +46,7 @@ services:
     ipc: host
     restart: always
   codetrans-xeon-ui-server:
-    image: opea/codetrans-ui:latest
+    image: ${REGISTRY:-opea}/codetrans-ui:${TAG:-latest}
     container_name: codetrans-xeon-ui-server
     depends_on:
       - codetrans-xeon-backend-server
diff --git a/CodeTrans/tests/test_codetrans_on_gaudi.sh b/CodeTrans/tests/test_codetrans_on_gaudi.sh
index c3b22f5237..fc48a5139c 100644
--- a/CodeTrans/tests/test_codetrans_on_gaudi.sh
+++ b/CodeTrans/tests/test_codetrans_on_gaudi.sh
@@ -2,27 +2,27 @@
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-set -x
+set -xe
+IMAGE_REPO=${IMAGE_REPO:-"opea"}
+IMAGE_TAG=${IMAGE_TAG:-"latest"}
+echo "REGISTRY=IMAGE_REPO=${IMAGE_REPO}"
+echo "TAG=IMAGE_TAG=${IMAGE_TAG}"
+export REGISTRY=${IMAGE_REPO}
+export TAG=${IMAGE_TAG}
 
 WORKPATH=$(dirname "$PWD")
 LOG_PATH="$WORKPATH/tests"
 ip_address=$(hostname -I | awk '{print $1}')
 
 function build_docker_images() {
-    cd $WORKPATH
+    cd $WORKPATH/docker
     git clone https://github.com/opea-project/GenAIComps.git
-    cd GenAIComps
 
-    docker build -t opea/llm-tgi:latest -f comps/llms/text-generation/tgi/Dockerfile .
+    echo "Build all the images with --no-cache, check docker_image_build.log for details..."
+    service_list="codetrans codetrans-ui llm-tgi"
+    docker compose -f docker_build_compose.yaml build ${service_list} --no-cache > ${LOG_PATH}/docker_image_build.log
 
     docker pull ghcr.io/huggingface/tgi-gaudi:2.0.1
-
-    cd $WORKPATH/docker
-    docker build --no-cache -t opea/codetrans:latest -f Dockerfile .
-
-    cd $WORKPATH/docker/ui
-    docker build --no-cache -t opea/codetrans-ui:latest -f docker/Dockerfile .
-
     docker images
 }
 
@@ -40,16 +40,6 @@ function start_services() {
 
     sed -i "s/backend_address/$ip_address/g" $WORKPATH/docker/ui/svelte/.env
 
-    if [[ "$IMAGE_REPO" != "" ]]; then
-        # Replace the container name with a test-specific name
-        echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
-        sed -i "s#image: opea/codetrans:latest#image: opea/codetrans:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/codetrans-ui:latest#image: opea/codetrans-ui:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose.yaml
-        echo "cat compose.yaml"
-        cat compose.yaml
-    fi
-
     # Start Docker Containers
     docker compose up -d
 
@@ -124,13 +114,16 @@ function validate_frontend() {
     cd $WORKPATH/docker/ui/svelte
     local conda_env_name="OPEA_e2e"
     export PATH=${HOME}/miniforge3/bin/:$PATH
-#    conda remove -n ${conda_env_name} --all -y
-#    conda create -n ${conda_env_name} python=3.12 -y
+    if conda info --envs | grep -q "$conda_env_name"; then
+        echo "$conda_env_name exist!"
+    else
+        conda create -n ${conda_env_name} python=3.12 -y
+    fi
     source activate ${conda_env_name}
 
     sed -i "s/localhost/$ip_address/g" playwright.config.ts
 
-#    conda install -c conda-forge nodejs -y
+    conda install -c conda-forge nodejs -y
     npm install && npm ci && npx playwright install --with-deps
     node -v && npm -v && pip list
 
@@ -155,7 +148,7 @@ function main() {
 
     stop_docker
 
-    if [[ "$IMAGE_REPO" == "" ]]; then build_docker_images; fi
+    if [[ "$IMAGE_REPO" == "opea" ]]; then build_docker_images; fi
     start_services
 
     validate_microservices
diff --git a/CodeTrans/tests/test_codetrans_on_xeon.sh b/CodeTrans/tests/test_codetrans_on_xeon.sh
index fdb134edfe..4ae4d8024e 100644
--- a/CodeTrans/tests/test_codetrans_on_xeon.sh
+++ b/CodeTrans/tests/test_codetrans_on_xeon.sh
@@ -3,24 +3,26 @@
 # SPDX-License-Identifier: Apache-2.0
 
 set -xe
+IMAGE_REPO=${IMAGE_REPO:-"opea"}
+IMAGE_TAG=${IMAGE_TAG:-"latest"}
+echo "REGISTRY=IMAGE_REPO=${IMAGE_REPO}"
+echo "TAG=IMAGE_TAG=${IMAGE_TAG}"
+export REGISTRY=${IMAGE_REPO}
+export TAG=${IMAGE_TAG}
 
 WORKPATH=$(dirname "$PWD")
 LOG_PATH="$WORKPATH/tests"
 ip_address=$(hostname -I | awk '{print $1}')
 
 function build_docker_images() {
-    cd $WORKPATH
-    git clone https://github.com/opea-project/GenAIComps.git
-    cd GenAIComps
-
-    docker build -t opea/llm-tgi:latest -f comps/llms/text-generation/tgi/Dockerfile .
-
     cd $WORKPATH/docker
-    docker build --no-cache -t opea/codetrans:latest -f Dockerfile .
+    git clone https://github.com/opea-project/GenAIComps.git
 
-    cd $WORKPATH/docker/ui
-    docker build --no-cache -t opea/codetrans-ui:latest -f docker/Dockerfile .
+    echo "Build all the images with --no-cache, check docker_image_build.log for details..."
+    service_list="codetrans codetrans-ui llm-tgi"
+    docker compose -f docker_build_compose.yaml build ${service_list} --no-cache > ${LOG_PATH}/docker_image_build.log
 
+    docker pull ghcr.io/huggingface/text-generation-inference:1.4
     docker images
 }
 
@@ -37,16 +39,6 @@ function start_services() {
 
     sed -i "s/backend_address/$ip_address/g" $WORKPATH/docker/ui/svelte/.env
 
-    if [[ "$IMAGE_REPO" != "" ]]; then
-        # Replace the container name with a test-specific name
-        echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
-        sed -i "s#image: opea/codetrans:latest#image: opea/codetrans:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/codetrans-ui:latest#image: opea/codetrans-ui:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose.yaml
-        echo "cat compose.yaml"
-        cat compose.yaml
-    fi
-
     # Start Docker Containers
     docker compose up -d
 
@@ -123,13 +115,16 @@ function validate_frontend() {
     cd $WORKPATH/docker/ui/svelte
     local conda_env_name="OPEA_e2e"
     export PATH=${HOME}/miniforge3/bin/:$PATH
-#    conda remove -n ${conda_env_name} --all -y
-#    conda create -n ${conda_env_name} python=3.12 -y
+    if conda info --envs | grep -q "$conda_env_name"; then
+        echo "$conda_env_name exist!"
+    else
+        conda create -n ${conda_env_name} python=3.12 -y
+    fi
     source activate ${conda_env_name}
 
     sed -i "s/localhost/$ip_address/g" playwright.config.ts
 
-#    conda install -c conda-forge nodejs -y
+    conda install -c conda-forge nodejs -y
     npm install && npm ci && npx playwright install --with-deps
     node -v && npm -v && pip list
 
@@ -153,7 +148,7 @@ function main() {
 
     stop_docker
 
-    if [[ "$IMAGE_REPO" == "" ]]; then build_docker_images; fi
+    if [[ "$IMAGE_REPO" == "opea" ]]; then build_docker_images; fi
     start_services
 
     validate_microservices
diff --git a/DocSum/docker/docker_build_compose.yaml b/DocSum/docker/docker_build_compose.yaml
new file mode 100644
index 0000000000..a7e4a565dd
--- /dev/null
+++ b/DocSum/docker/docker_build_compose.yaml
@@ -0,0 +1,30 @@
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
+
+services:
+  docsum:
+    build:
+      args:
+        http_proxy: ${http_proxy}
+        https_proxy: ${https_proxy}
+        no_proxy: ${no_proxy}
+      dockerfile: ./Dockerfile
+    image: ${REGISTRY:-opea}/docsum:${TAG:-latest}
+  docsum-ui:
+    build:
+      context: ui
+      dockerfile: ./docker/Dockerfile
+    extends: docsum
+    image: ${REGISTRY:-opea}/docsum-ui:${TAG:-latest}
+  docsum-react-ui:
+    build:
+      context: ui
+      dockerfile: ./docker/Dockerfile.react
+    extends: docsum
+    image: ${REGISTRY:-opea}/docsum-react-ui:${TAG:-latest}
+  llm-docsum-tgi:
+    build:
+      context: GenAIComps
+      dockerfile: comps/llms/summarization/tgi/Dockerfile
+    extends: docsum
+    image: ${REGISTRY:-opea}/llm-docsum-tgi:${TAG:-latest}
diff --git a/DocSum/docker/gaudi/README.md b/DocSum/docker/gaudi/README.md
index d7a3202e54..742e7202fa 100644
--- a/DocSum/docker/gaudi/README.md
+++ b/DocSum/docker/gaudi/README.md
@@ -127,7 +127,24 @@ Here is an example for summarizing a article.
 
 ![image](https://github.com/intel-ai-tce/GenAIExamples/assets/21761437/67ecb2ec-408d-4e81-b124-6ded6b833f55)
 
-## 🚀 Launch the React UI
+## 🚀 Launch the React UI (Optional)
+
+To access the React-based frontend, modify the UI service in the `compose.yaml` file. Replace `docsum-xeon-ui-server` service with the `docsum-xeon-react-ui-server` service as per the config below:
+
+```yaml
+docsum-gaudi-react-ui-server:
+  image: ${REGISTRY:-opea}/docsum-react-ui:${TAG:-latest}
+  container_name: docsum-gaudi-react-ui-server
+  depends_on:
+    - docsum-gaudi-backend-server
+  ports:
+    - "5174:80"
+  environment:
+    - no_proxy=${no_proxy}
+    - https_proxy=${https_proxy}
+    - http_proxy=${http_proxy}
+    - DOC_BASE_URL=${BACKEND_SERVICE_ENDPOINT}
+```
 
 Open this URL `http://{host_ip}:5175` in your browser to access the frontend.
 
diff --git a/DocSum/docker/gaudi/compose.yaml b/DocSum/docker/gaudi/compose.yaml
index 2a2a8dbaaf..78cb90ae1c 100644
--- a/DocSum/docker/gaudi/compose.yaml
+++ b/DocSum/docker/gaudi/compose.yaml
@@ -1,9 +1,6 @@
-
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-version: "3.8"
-
 services:
   tgi-service:
     image: ghcr.io/huggingface/tgi-gaudi:2.0.1
@@ -24,7 +21,7 @@ services:
     ipc: host
     command: --model-id ${LLM_MODEL_ID} --max-input-length 1024 --max-total-tokens 2048
   llm:
-    image: opea/llm-docsum-tgi:latest
+    image: ${REGISTRY:-opea}/llm-docsum-tgi:${TAG:-latest}
     container_name: llm-docsum-gaudi-server
     depends_on:
       - tgi-service
@@ -39,7 +36,7 @@ services:
       HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
     restart: unless-stopped
   docsum-gaudi-backend-server:
-    image: opea/docsum:latest
+    image: ${REGISTRY:-opea}/docsum:${TAG:-latest}
     container_name: docsum-gaudi-backend-server
     depends_on:
       - tgi-service
@@ -55,7 +52,7 @@ services:
     ipc: host
     restart: always
   docsum-gaudi-ui-server:
-    image: opea/docsum-ui:latest
+    image: ${REGISTRY:-opea}/docsum-ui:${TAG:-latest}
     container_name: docsum-gaudi-ui-server
     depends_on:
       - docsum-gaudi-backend-server
@@ -68,15 +65,6 @@ services:
       - DOC_BASE_URL=${BACKEND_SERVICE_ENDPOINT}
     ipc: host
     restart: always
-  docsum-xeon-react-ui-server:
-    image: opea/docsum-react-ui:latest
-    container_name: docsum-gaudi-react-ui-server
-    depends_on:
-      - docsum-gaudi-backend-server
-    ports:
-      - "5174:80"
-    environment:
-      - DOC_BASE_URL=${BACKEND_SERVICE_ENDPOINT}
 
 networks:
   default:
diff --git a/DocSum/docker/xeon/README.md b/DocSum/docker/xeon/README.md
index c272d1619b..7d310c98b2 100644
--- a/DocSum/docker/xeon/README.md
+++ b/DocSum/docker/xeon/README.md
@@ -135,6 +135,24 @@ Open this URL `http://{host_ip}:5174` in your browser to access the React based
 
 ![project-screenshot](../../assets/img/docSum_ui_text.png)
 
-### React UI
+### React UI (Optional)
+
+To access the React-based frontend, modify the UI service in the `compose.yaml` file. Replace `docsum-xeon-ui-server` service with the `docsum-xeon-react-ui-server` service as per the config below:
+
+```yaml
+docsum-xeon-react-ui-server:
+  image: ${REGISTRY:-opea}/docsum-react-ui:${TAG:-latest}
+  container_name: docsum-xeon-react-ui-server
+  depends_on:
+    - docsum-xeon-backend-server
+  ports:
+    - "5174:80"
+  environment:
+    - no_proxy=${no_proxy}
+    - https_proxy=${https_proxy}
+    - http_proxy=${http_proxy}
+  ipc: host
+  restart: always
+```
 
 ![preject-react-screenshot](../../assets/img/docsum-ui-react.png)
diff --git a/DocSum/docker/xeon/compose.yaml b/DocSum/docker/xeon/compose.yaml
index facd70463f..33c92ce52d 100644
--- a/DocSum/docker/xeon/compose.yaml
+++ b/DocSum/docker/xeon/compose.yaml
@@ -1,9 +1,6 @@
-
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-version: "3.8"
-
 services:
   tgi-service:
     image: ghcr.io/huggingface/text-generation-inference:1.4
@@ -21,7 +18,7 @@ services:
     shm_size: 1g
     command: --model-id ${LLM_MODEL_ID}
   llm:
-    image: opea/llm-docsum-tgi:latest
+    image: ${REGISTRY:-opea}/llm-docsum-tgi:${TAG:-latest}
     container_name: llm-docsum-server
     depends_on:
       - tgi-service
@@ -36,7 +33,7 @@ services:
       HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
     restart: unless-stopped
   docsum-xeon-backend-server:
-    image: opea/docsum:latest
+    image: ${REGISTRY:-opea}/docsum:${TAG:-latest}
     container_name: docsum-xeon-backend-server
     depends_on:
       - tgi-service
@@ -52,7 +49,7 @@ services:
     ipc: host
     restart: always
   docsum-xeon-ui-server:
-    image: opea/docsum-ui:latest
+    image: ${REGISTRY:-opea}/docsum-ui:${TAG:-latest}
     container_name: docsum-xeon-ui-server
     depends_on:
       - docsum-xeon-backend-server
@@ -65,15 +62,6 @@ services:
       - DOC_BASE_URL=${BACKEND_SERVICE_ENDPOINT}
     ipc: host
     restart: always
-  docsum-xeon-react-ui-server:
-    image: opea/docsum-react-ui:latest
-    container_name: docsum-xeon-react-ui-server
-    depends_on:
-      - docsum-xeon-backend-server
-    ports:
-      - "5174:80"
-    ipc: host
-    restart: always
 
 networks:
   default:
diff --git a/DocSum/tests/test_docsum_on_gaudi.sh b/DocSum/tests/test_docsum_on_gaudi.sh
index 983f02870c..0906bd906c 100644
--- a/DocSum/tests/test_docsum_on_gaudi.sh
+++ b/DocSum/tests/test_docsum_on_gaudi.sh
@@ -2,28 +2,27 @@
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-set -x
+set -e
+IMAGE_REPO=${IMAGE_REPO:-"opea"}
+IMAGE_TAG=${IMAGE_TAG:-"latest"}
+echo "REGISTRY=IMAGE_REPO=${IMAGE_REPO}"
+echo "TAG=IMAGE_TAG=${IMAGE_TAG}"
+export REGISTRY=${IMAGE_REPO}
+export TAG=${IMAGE_TAG}
 
 WORKPATH=$(dirname "$PWD")
 LOG_PATH="$WORKPATH/tests"
 ip_address=$(hostname -I | awk '{print $1}')
 
 function build_docker_images() {
-    cd $WORKPATH
+    cd $WORKPATH/docker
     git clone https://github.com/opea-project/GenAIComps.git
-    cd GenAIComps
 
-    docker build --no-cache -t opea/llm-docsum-tgi:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/llms/summarization/tgi/Dockerfile .
+    echo "Build all the images with --no-cache, check docker_image_build.log for details..."
+    service_list="docsum docsum-ui llm-docsum-tgi"
+    docker compose -f docker_build_compose.yaml build ${service_list} --no-cache > ${LOG_PATH}/docker_image_build.log
 
     docker pull ghcr.io/huggingface/tgi-gaudi:2.0.1
-
-    cd $WORKPATH/docker
-    docker build --no-cache -t opea/docsum:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f Dockerfile .
-
-    cd $WORKPATH/docker/ui
-    docker build --no-cache -t opea/docsum-ui:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f docker/Dockerfile .
-    docker build --no-cache -t opea/docsum-react-ui:latest --build-arg BACKEND_SERVICE_ENDPOINT=http://${ip_address}:8888/v1/docsum -f docker/Dockerfile.react .
-
     docker images
 }
 
@@ -39,17 +38,6 @@ function start_services() {
 
     sed -i "s/backend_address/$ip_address/g" $WORKPATH/docker/ui/svelte/.env
 
-    if [[ "$IMAGE_REPO" != "" ]]; then
-        # Replace the container name with a test-specific name
-        echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
-        sed -i "s#image: opea/docsum:latest#image: opea/docsum:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/docsum-ui:latest#image: opea/docsum-ui:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/docsum-react-ui:latest#image: opea/docsum-react-ui:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose.yaml
-        echo "cat compose.yaml"
-        cat compose.yaml
-    fi
-
     # Start Docker Containers
     docker compose up -d
 
@@ -126,13 +114,16 @@ function validate_frontend() {
     cd $WORKPATH/docker/ui/svelte
     local conda_env_name="OPEA_e2e"
     export PATH=${HOME}/miniforge3/bin/:$PATH
-#    conda remove -n ${conda_env_name} --all -y
-#    conda create -n ${conda_env_name} python=3.12 -y
+    if conda info --envs | grep -q "$conda_env_name"; then
+        echo "$conda_env_name exist!"
+    else
+        conda create -n ${conda_env_name} python=3.12 -y
+    fi
     source activate ${conda_env_name}
 
     sed -i "s/localhost/$ip_address/g" playwright.config.ts
 
-#    conda install -c conda-forge nodejs -y
+    conda install -c conda-forge nodejs -y
     npm install && npm ci && npx playwright install --with-deps
     node -v && npm -v && pip list
 
@@ -156,7 +147,7 @@ function main() {
 
     stop_docker
 
-    if [[ "$IMAGE_REPO" == "" ]]; then build_docker_images; fi
+    if [[ "$IMAGE_REPO" == "opea" ]]; then build_docker_images; fi
     start_services
 
     validate_microservices
diff --git a/DocSum/tests/test_docsum_on_xeon.sh b/DocSum/tests/test_docsum_on_xeon.sh
index 991a3751b0..e9bc7a8c00 100644
--- a/DocSum/tests/test_docsum_on_xeon.sh
+++ b/DocSum/tests/test_docsum_on_xeon.sh
@@ -2,26 +2,27 @@
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-set -x
+set -xe
+IMAGE_REPO=${IMAGE_REPO:-"opea"}
+IMAGE_TAG=${IMAGE_TAG:-"latest"}
+echo "REGISTRY=IMAGE_REPO=${IMAGE_REPO}"
+echo "TAG=IMAGE_TAG=${IMAGE_TAG}"
+export REGISTRY=${IMAGE_REPO}
+export TAG=${IMAGE_TAG}
 
 WORKPATH=$(dirname "$PWD")
 LOG_PATH="$WORKPATH/tests"
 ip_address=$(hostname -I | awk '{print $1}')
 
 function build_docker_images() {
-    cd $WORKPATH
-    git clone https://github.com/opea-project/GenAIComps.git
-    cd GenAIComps
-
-    docker build --no-cache -t opea/llm-docsum-tgi:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/llms/summarization/tgi/Dockerfile .
-
     cd $WORKPATH/docker
-    docker build --no-cache -t opea/docsum:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f Dockerfile .
+    git clone https://github.com/opea-project/GenAIComps.git
 
-    cd $WORKPATH/docker/ui
-    docker build --no-cache -t opea/docsum-ui:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f docker/Dockerfile .
-    docker build --no-cache -t opea/docsum-react-ui:latest --build-arg BACKEND_SERVICE_ENDPOINT=http://${ip_address}:8888/v1/docsum -f docker/Dockerfile.react .
+    echo "Build all the images with --no-cache, check docker_image_build.log for details..."
+    service_list="docsum docsum-ui llm-docsum-tgi"
+    docker compose -f docker_build_compose.yaml build ${service_list} --no-cache > ${LOG_PATH}/docker_image_build.log
 
+    docker pull ghcr.io/huggingface/text-generation-inference:1.4
     docker images
 }
 
@@ -37,17 +38,6 @@ function start_services() {
 
     sed -i "s/backend_address/$ip_address/g" $WORKPATH/docker/ui/svelte/.env
 
-    if [[ "$IMAGE_REPO" != "" ]]; then
-        # Replace the container name with a test-specific name
-        echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
-        sed -i "s#image: opea/docsum:latest#image: opea/docsum:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/docsum-ui:latest#image: opea/docsum-ui:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/docsum-react-ui:latest#image: opea/docsum-react-ui:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose.yaml
-        echo "cat compose.yaml"
-        cat compose.yaml
-    fi
-
     # Start Docker Containers
     docker compose up -d
 
@@ -123,13 +113,16 @@ function validate_frontend() {
     cd $WORKPATH/docker/ui/svelte
     local conda_env_name="OPEA_e2e"
     export PATH=${HOME}/miniforge3/bin/:$PATH
-#    conda remove -n ${conda_env_name} --all -y
-#    conda create -n ${conda_env_name} python=3.12 -y
+    if conda info --envs | grep -q "$conda_env_name"; then
+        echo "$conda_env_name exist!"
+    else
+        conda create -n ${conda_env_name} python=3.12 -y
+    fi
     source activate ${conda_env_name}
 
     sed -i "s/localhost/$ip_address/g" playwright.config.ts
 
-#    conda install -c conda-forge nodejs -y
+    conda install -c conda-forge nodejs -y
     npm install && npm ci && npx playwright install --with-deps
     node -v && npm -v && pip list
 
@@ -153,7 +146,7 @@ function main() {
 
     stop_docker
 
-    if [[ "$IMAGE_REPO" == "" ]]; then build_docker_images; fi
+    if [[ "$IMAGE_REPO" == "opea" ]]; then build_docker_images; fi
     start_services
 
     validate_microservices
diff --git a/FaqGen/docker/docker_build_compose.yaml b/FaqGen/docker/docker_build_compose.yaml
new file mode 100644
index 0000000000..a80257fc44
--- /dev/null
+++ b/FaqGen/docker/docker_build_compose.yaml
@@ -0,0 +1,30 @@
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
+
+services:
+  faqgen:
+    build:
+      args:
+        http_proxy: ${http_proxy}
+        https_proxy: ${https_proxy}
+        no_proxy: ${no_proxy}
+      dockerfile: ./Dockerfile
+    image: ${REGISTRY:-opea}/faqgen:${TAG:-latest}
+  faqgen-ui:
+    build:
+      context: ui
+      dockerfile: ./docker/Dockerfile
+    extends: faqgen
+    image: ${REGISTRY:-opea}/faqgen-ui:${TAG:-latest}
+  faqgen-react-ui:
+    build:
+      context: ui
+      dockerfile: ./docker/Dockerfile.react
+    extends: faqgen
+    image: ${REGISTRY:-opea}/faqgen-react-ui:${TAG:-latest}
+  llm-faqgen-tgi:
+    build:
+      context: GenAIComps
+      dockerfile: comps/llms/faq-generation/tgi/Dockerfile
+    extends: faqgen
+    image: ${REGISTRY:-opea}/llm-faqgen-tgi:${TAG:-latest}
diff --git a/FaqGen/docker/gaudi/compose.yaml b/FaqGen/docker/gaudi/compose.yaml
index 602105ec23..238e271f6e 100644
--- a/FaqGen/docker/gaudi/compose.yaml
+++ b/FaqGen/docker/gaudi/compose.yaml
@@ -1,8 +1,6 @@
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-version: "3.8"
-
 services:
   tgi-service:
     image: ghcr.io/huggingface/tgi-gaudi:2.0.1
@@ -26,7 +24,7 @@ services:
     ipc: host
     command: --model-id ${LLM_MODEL_ID} --max-input-length 2048 --max-total-tokens 4096 --max-batch-total-tokens 65536 --max-batch-prefill-tokens 4096
   llm_faqgen:
-    image: opea/llm-faqgen-tgi:latest
+    image: ${REGISTRY:-opea}/llm-faqgen-tgi:${TAG:-latest}
     container_name: llm-faqgen-server
     depends_on:
       - tgi-service
@@ -41,7 +39,7 @@ services:
       HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
     restart: unless-stopped
   faqgen-gaudi-backend-server:
-    image: opea/faqgen:latest
+    image: ${REGISTRY:-opea}/faqgen:${TAG:-latest}
     container_name: faqgen-gaudi-backend-server
     depends_on:
       - tgi-service
@@ -57,7 +55,7 @@ services:
     ipc: host
     restart: always
   faqgen-gaudi-ui-server:
-    image: opea/faqgen-ui:latest
+    image: ${REGISTRY:-opea}/faqgen-ui:${TAG:-latest}
     container_name: faqgen-gaudi-ui-server
     depends_on:
       - faqgen-gaudi-backend-server
diff --git a/FaqGen/docker/xeon/compose.yaml b/FaqGen/docker/xeon/compose.yaml
index 00f2d0ed08..406f4ca434 100644
--- a/FaqGen/docker/xeon/compose.yaml
+++ b/FaqGen/docker/xeon/compose.yaml
@@ -1,8 +1,6 @@
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-version: "3.8"
-
 services:
   tgi-service:
     image: ghcr.io/huggingface/text-generation-inference:1.4
@@ -20,7 +18,7 @@ services:
     shm_size: 1g
     command: --model-id ${LLM_MODEL_ID}
   llm_faqgen:
-    image: opea/llm-faqgen-tgi:latest
+    image: ${REGISTRY:-opea}/llm-faqgen-tgi:${TAG:-latest}
     container_name: llm-faqgen-server
     depends_on:
       - tgi-service
@@ -35,7 +33,7 @@ services:
       HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
     restart: unless-stopped
   faqgen-xeon-backend-server:
-    image: opea/faqgen:latest
+    image: ${REGISTRY:-opea}/faqgen:${TAG:-latest}
     container_name: faqgen-xeon-backend-server
     depends_on:
       - tgi-service
@@ -51,7 +49,7 @@ services:
     ipc: host
     restart: always
   faqgen-xeon-ui-server:
-    image: opea/faqgen-ui:latest
+    image: ${REGISTRY:-opea}/faqgen-ui:${TAG:-latest}
     container_name: faqgen-xeon-ui-server
     depends_on:
       - faqgen-xeon-backend-server
diff --git a/FaqGen/tests/test_faqgen_on_gaudi.sh b/FaqGen/tests/test_faqgen_on_gaudi.sh
index c41940d614..17242c1682 100644
--- a/FaqGen/tests/test_faqgen_on_gaudi.sh
+++ b/FaqGen/tests/test_faqgen_on_gaudi.sh
@@ -3,26 +3,26 @@
 # SPDX-License-Identifier: Apache-2.0
 
 set -x
+IMAGE_REPO=${IMAGE_REPO:-"opea"}
+IMAGE_TAG=${IMAGE_TAG:-"latest"}
+echo "REGISTRY=IMAGE_REPO=${IMAGE_REPO}"
+echo "TAG=IMAGE_TAG=${IMAGE_TAG}"
+export REGISTRY=${IMAGE_REPO}
+export TAG=${IMAGE_TAG}
 
 WORKPATH=$(dirname "$PWD")
 LOG_PATH="$WORKPATH/tests"
 ip_address=$(hostname -I | awk '{print $1}')
 
 function build_docker_images() {
-    cd $WORKPATH
-
-    git clone https://github.com/opea-project/GenAIComps.git
-    cd GenAIComps
-    docker build --no-cache -t opea/llm-faqgen-tgi:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/llms/faq-generation/tgi/Dockerfile .
-
-    docker pull ghcr.io/huggingface/tgi-gaudi:1.2.1
-
     cd $WORKPATH/docker
-    docker build --no-cache -t opea/faqgen:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f Dockerfile .
+    git clone https://github.com/opea-project/GenAIComps.git
 
-    cd $WORKPATH/docker/ui
-    docker build --no-cache -t opea/faqgen-ui:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f docker/Dockerfile .
+    echo "Build all the images with --no-cache, check docker_image_build.log for details..."
+    service_list="faqgen faqgen-ui llm-faqgen-tgi"
+    docker compose -f docker_build_compose.yaml build ${service_list} --no-cache > ${LOG_PATH}/docker_image_build.log
 
+    docker pull ghcr.io/huggingface/tgi-gaudi:1.2.1
     docker images
 }
 
@@ -38,14 +38,6 @@ function start_services() {
 
     sed -i "s/backend_address/$ip_address/g" $WORKPATH/docker/ui/svelte/.env
 
-    # if [[ "$IMAGE_REPO" != "" ]]; then
-    #     # Replace the container name with a test-specific name
-    #     echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
-    #     sed -i "s#image: opea/faqgen:latest#image: opea/faqgen:${IMAGE_TAG}#g" compose.yaml
-    #     sed -i "s#image: opea/faqgen-ui:latest#image: opea/faqgen-ui:${IMAGE_TAG}#g" compose.yaml
-    #     sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose.yaml
-    # fi
-
     # Start Docker Containers
     docker compose up -d
 
@@ -122,13 +114,16 @@ function validate_frontend() {
     cd $WORKPATH/docker/ui/svelte
     local conda_env_name="OPEA_e2e"
     export PATH=${HOME}/miniforge3/bin/:$PATH
-#    conda remove -n ${conda_env_name} --all -y
-#    conda create -n ${conda_env_name} python=3.12 -y
+    if conda info --envs | grep -q "$conda_env_name"; then
+        echo "$conda_env_name exist!"
+    else
+        conda create -n ${conda_env_name} python=3.12 -y
+    fi
     source activate ${conda_env_name}
 
     sed -i "s/localhost/$ip_address/g" playwright.config.ts
 
-#    conda install -c conda-forge nodejs -y
+    conda install -c conda-forge nodejs -y
     npm install && npm ci && npx playwright install --with-deps
     node -v && npm -v && pip list
 
@@ -152,7 +147,7 @@ function main() {
 
     stop_docker
 
-    build_docker_images
+    if [[ "$IMAGE_REPO" == "opea" ]]; then build_docker_images; fi
     start_services
 
     validate_microservices
diff --git a/FaqGen/tests/test_faqgen_on_xeon.sh b/FaqGen/tests/test_faqgen_on_xeon.sh
index b0b694f211..8e2e0a1e3c 100755
--- a/FaqGen/tests/test_faqgen_on_xeon.sh
+++ b/FaqGen/tests/test_faqgen_on_xeon.sh
@@ -3,25 +3,26 @@
 # SPDX-License-Identifier: Apache-2.0
 
 set -x
+IMAGE_REPO=${IMAGE_REPO:-"opea"}
+IMAGE_TAG=${IMAGE_TAG:-"latest"}
+echo "REGISTRY=IMAGE_REPO=${IMAGE_REPO}"
+echo "TAG=IMAGE_TAG=${IMAGE_TAG}"
+export REGISTRY=${IMAGE_REPO}
+export TAG=${IMAGE_TAG}
 
 WORKPATH=$(dirname "$PWD")
 LOG_PATH="$WORKPATH/tests"
 ip_address=$(hostname -I | awk '{print $1}')
 
 function build_docker_images() {
-    cd $WORKPATH
-
-    git clone https://github.com/opea-project/GenAIComps.git
-    cd GenAIComps
-
-    docker build --no-cache -t opea/llm-faqgen-tgi:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/llms/faq-generation/tgi/Dockerfile .
-
     cd $WORKPATH/docker
-    docker build --no-cache -t opea/faqgen:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f Dockerfile .
+    git clone https://github.com/opea-project/GenAIComps.git
 
-    cd $WORKPATH/docker/ui
-    docker build --no-cache -t opea/faqgen-ui:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f docker/Dockerfile .
+    echo "Build all the images with --no-cache, check docker_image_build.log for details..."
+    service_list="faqgen faqgen-ui llm-faqgen-tgi"
+    docker compose -f docker_build_compose.yaml build ${service_list} --no-cache > ${LOG_PATH}/docker_image_build.log
 
+    docker pull ghcr.io/huggingface/text-generation-inference:1.4
     docker images
 }
 
@@ -37,14 +38,6 @@ function start_services() {
 
     sed -i "s/backend_address/$ip_address/g" $WORKPATH/docker/ui/svelte/.env
 
-    # if [[ "$IMAGE_REPO" != "" ]]; then
-    #     # Replace the container name with a test-specific name
-    #     echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
-    #     sed -i "s#image: opea/faqgen:latest#image: opea/faqgen:${IMAGE_TAG}#g" compose.yaml
-    #     sed -i "s#image: opea/faqgen-ui:latest#image: opea/faqgen-ui:${IMAGE_TAG}#g" compose.yaml
-    #     sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose.yaml
-    # fi
-
     # Start Docker Containers
     docker compose up -d
 
@@ -121,13 +114,16 @@ function validate_frontend() {
     cd $WORKPATH/docker/ui/svelte
     local conda_env_name="OPEA_e2e"
     export PATH=${HOME}/miniforge3/bin/:$PATH
-#    conda remove -n ${conda_env_name} --all -y
-#    conda create -n ${conda_env_name} python=3.12 -y
+    if conda info --envs | grep -q "$conda_env_name"; then
+        echo "$conda_env_name exist!"
+    else
+        conda create -n ${conda_env_name} python=3.12 -y
+    fi
     source activate ${conda_env_name}
 
     sed -i "s/localhost/$ip_address/g" playwright.config.ts
 
-#    conda install -c conda-forge nodejs -y
+    conda install -c conda-forge nodejs -y
     npm install && npm ci && npx playwright install --with-deps
     node -v && npm -v && pip list
 
@@ -151,7 +147,7 @@ function main() {
 
     stop_docker
 
-    build_docker_images
+    if [[ "$IMAGE_REPO" == "opea" ]]; then build_docker_images; fi
     start_services
 
     validate_microservices
diff --git a/SearchQnA/docker/docker_build_compose.yaml b/SearchQnA/docker/docker_build_compose.yaml
new file mode 100644
index 0000000000..a31edd3431
--- /dev/null
+++ b/SearchQnA/docker/docker_build_compose.yaml
@@ -0,0 +1,48 @@
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
+
+services:
+  searchqna:
+    build:
+      args:
+        http_proxy: ${http_proxy}
+        https_proxy: ${https_proxy}
+        no_proxy: ${no_proxy}
+      dockerfile: ./Dockerfile
+    image: ${REGISTRY:-opea}/searchqna:${TAG:-latest}
+  searchqna-ui:
+    build:
+      context: ui
+      dockerfile: ./docker/Dockerfile
+    extends: searchqna
+    image: ${REGISTRY:-opea}/searchqna-ui:${TAG:-latest}
+  embedding-tei:
+    build:
+      context: GenAIComps
+      dockerfile: comps/embeddings/langchain/docker/Dockerfile
+    extends: searchqna
+    image: ${REGISTRY:-opea}/embedding-tei:${TAG:-latest}
+  web-retriever-chroma:
+    build:
+      context: GenAIComps
+      dockerfile: comps/web_retrievers/langchain/chroma/docker/Dockerfile
+    extends: searchqna
+    image: ${REGISTRY:-opea}/web-retriever-chroma:${TAG:-latest}
+  reranking-tei:
+    build:
+      context: GenAIComps
+      dockerfile: comps/reranks/tei/docker/Dockerfile
+    extends: searchqna
+    image: ${REGISTRY:-opea}/reranking-tei:${TAG:-latest}
+  llm-tgi:
+    build:
+      context: GenAIComps
+      dockerfile: comps/llms/text-generation/tgi/Dockerfile
+    extends: searchqna
+    image: ${REGISTRY:-opea}/llm-tgi:${TAG:-latest}
+  tei-gaudi:
+    build:
+      context: tei-gaudi
+      dockerfile: Dockerfile-hpu
+    extends: searchqna
+    image: ${REGISTRY:-opea}/tei-gaudi:${TAG:-latest}
diff --git a/SearchQnA/docker/gaudi/compose.yaml b/SearchQnA/docker/gaudi/compose.yaml
index dc191f5b8f..ee3b32b6f0 100644
--- a/SearchQnA/docker/gaudi/compose.yaml
+++ b/SearchQnA/docker/gaudi/compose.yaml
@@ -1,12 +1,9 @@
-
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-version: "3.8"
-
 services:
   tei-embedding-service:
-    image: opea/tei-gaudi:latest
+    image: ${REGISTRY:-opea}/tei-gaudi:${TAG:-latest}
     container_name: tei-embedding-gaudi-server
     ports:
       - "3001:80"
@@ -27,7 +24,7 @@ services:
       ENABLE_EXPERIMENTAL_FLAGS: true
     command: --model-id ${EMBEDDING_MODEL_ID} --auto-truncate
   embedding:
-    image: opea/embedding-tei:latest
+    image: ${REGISTRY:-opea}/embedding-tei:${TAG:-latest}
     container_name: embedding-tei-server
     depends_on:
       - tei-embedding-service
@@ -41,7 +38,7 @@ services:
       TEI_EMBEDDING_ENDPOINT: ${TEI_EMBEDDING_ENDPOINT}
     restart: unless-stopped
   web-retriever:
-    image: opea/web-retriever-chroma:latest
+    image: ${REGISTRY:-opea}/web-retriever-chroma:${TAG:-latest}
     container_name: web-retriever-chroma-server
     ports:
       - "3003:7077"
@@ -68,7 +65,7 @@ services:
       https_proxy: ${https_proxy}
     command: --model-id ${RERANK_MODEL_ID} --auto-truncate
   reranking:
-    image: opea/reranking-tei:latest
+    image: ${REGISTRY:-opea}/reranking-tei:${TAG:-latest}
     container_name: reranking-tei-xeon-server
     depends_on:
       - tei-reranking-service
@@ -104,7 +101,7 @@ services:
     ipc: host
     command: --model-id ${LLM_MODEL_ID} --max-input-length 1024 --max-total-tokens 2048
   llm:
-    image: opea/llm-tgi:latest
+    image: ${REGISTRY:-opea}/llm-tgi:${TAG:-latest}
     container_name: llm-tgi-gaudi-server
     depends_on:
       - tgi-service
@@ -121,7 +118,7 @@ services:
       HF_HUB_ENABLE_HF_TRANSFER: 0
     restart: unless-stopped
   searchqna-gaudi-backend-server:
-    image: opea/searchqna:latest
+    image: ${REGISTRY:-opea}/searchqna:${TAG:-latest}
     container_name: searchqna-gaudi-backend-server
     depends_on:
       - tei-embedding-service
@@ -149,7 +146,7 @@ services:
     ipc: host
     restart: always
   searchqna-gaudi-ui-server:
-    image: opea/searchqna-ui:latest
+    image: ${REGISTRY:-opea}/searchqna-ui:${TAG:-latest}
     container_name: searchqna-gaudi-ui-server
     depends_on:
       - searchqna-gaudi-backend-server
diff --git a/SearchQnA/docker/xeon/compose.yaml b/SearchQnA/docker/xeon/compose.yaml
index 37c4232c3a..cdbf87e0e3 100644
--- a/SearchQnA/docker/xeon/compose.yaml
+++ b/SearchQnA/docker/xeon/compose.yaml
@@ -1,9 +1,6 @@
-
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-version: "3.8"
-
 services:
   tei-embedding-service:
     image: ghcr.io/huggingface/text-embeddings-inference:cpu-1.5
@@ -19,7 +16,7 @@ services:
       https_proxy: ${https_proxy}
     command: --model-id ${EMBEDDING_MODEL_ID} --auto-truncate
   embedding:
-    image: opea/embedding-tei:latest
+    image: ${REGISTRY:-opea}/embedding-tei:${TAG:-latest}
     container_name: embedding-tei-server
     depends_on:
       - tei-embedding-service
@@ -34,7 +31,7 @@ services:
       HF_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
     restart: unless-stopped
   web-retriever:
-    image: opea/web-retriever-chroma:latest
+    image: ${REGISTRY:-opea}/web-retriever-chroma:${TAG:-latest}
     container_name: web-retriever-chroma-server
     ports:
       - "3003:7077"
@@ -61,7 +58,7 @@ services:
       https_proxy: ${https_proxy}
     command: --model-id ${RERANK_MODEL_ID} --auto-truncate
   reranking:
-    image: opea/reranking-tei:latest
+    image: ${REGISTRY:-opea}/reranking-tei:${TAG:-latest}
     container_name: reranking-tei-xeon-server
     depends_on:
       - tei-reranking-service
@@ -90,7 +87,7 @@ services:
       HF_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
     command: --model-id ${LLM_MODEL_ID}
   llm:
-    image: opea/llm-tgi:latest
+    image: ${REGISTRY:-opea}/llm-tgi:${TAG:-latest}
     container_name: llm-tgi-server
     depends_on:
       - tgi-service
@@ -105,7 +102,7 @@ services:
       HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
     restart: unless-stopped
   searchqna-xeon-backend-server:
-    image: opea/searchqna:latest
+    image: ${REGISTRY:-opea}/searchqna:${TAG:-latest}
     container_name: searchqna-xeon-backend-server
     depends_on:
       - tei-embedding-service
@@ -133,7 +130,7 @@ services:
     ipc: host
     restart: always
   searchqna-gaudi-ui-server:
-    image: opea/searchqna-ui:latest
+    image: ${REGISTRY:-opea}/searchqna-ui:${TAG:-latest}
     container_name: searchqna-xeon-ui-server
     depends_on:
       - searchqna-xeon-backend-server
diff --git a/SearchQnA/tests/test_searchqna_on_gaudi.sh b/SearchQnA/tests/test_searchqna_on_gaudi.sh
index 60e57ccb93..072ba688b9 100644
--- a/SearchQnA/tests/test_searchqna_on_gaudi.sh
+++ b/SearchQnA/tests/test_searchqna_on_gaudi.sh
@@ -2,46 +2,33 @@
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-# for test
-
 set -xe
+IMAGE_REPO=${IMAGE_REPO:-"opea"}
+IMAGE_TAG=${IMAGE_TAG:-"latest"}
+echo "REGISTRY=IMAGE_REPO=${IMAGE_REPO}"
+echo "TAG=IMAGE_TAG=${IMAGE_TAG}"
+export REGISTRY=${IMAGE_REPO}
+export TAG=${IMAGE_TAG}
 
 WORKPATH=$(dirname "$PWD")
 LOG_PATH="$WORKPATH/tests"
 ip_address=$(hostname -I | awk '{print $1}')
 
 function build_docker_images() {
-    cd $WORKPATH
+    cd $WORKPATH/docker
     git clone https://github.com/opea-project/GenAIComps.git
-    cd GenAIComps
-
-    docker build --no-cache -t opea/embedding-tei:latest  -f comps/embeddings/langchain/docker/Dockerfile .
-    docker build --no-cache -t opea/web-retriever-chroma:latest  -f comps/web_retrievers/langchain/chroma/docker/Dockerfile .
-    docker build --no-cache -t opea/reranking-tei:latest  -f comps/reranks/tei/docker/Dockerfile .
-    docker build --no-cache -t opea/llm-tgi:latest  -f comps/llms/text-generation/tgi/Dockerfile .
+    git clone https://github.com/huggingface/tei-gaudi
 
-#    cd ..
-#    git clone https://github.com/huggingface/tei-gaudi
-#    cd tei-gaudi/
-#    docker build --no-cache -f Dockerfile-hpu -t opea/tei-gaudi:latest .
+    echo "Build all the images with --no-cache, check docker_image_build.log for details..."
+    service_list="searchqna searchqna-ui embedding-tei web-retriever-chroma reranking-tei llm-tgi tei-gaudi"
+    docker compose -f docker_build_compose.yaml build ${service_list} --no-cache > ${LOG_PATH}/docker_image_build.log
 
     docker pull ghcr.io/huggingface/text-embeddings-inference:cpu-1.5
     docker pull ghcr.io/huggingface/tgi-gaudi:2.0.1
-    cd $WORKPATH/docker
-    docker build --no-cache -t opea/searchqna:latest -f Dockerfile .
-
-    cd $WORKPATH/docker/ui
-    docker build --no-cache -t opea/searchqna-ui:latest -f docker/Dockerfile .
-
     docker images
 }
 
 function start_services() {
-    # build tei-gaudi for each test instead of pull from local registry
-    cd $WORKPATH
-    git clone https://github.com/huggingface/tei-gaudi
-    cd tei-gaudi/
-    docker build --no-cache -f Dockerfile-hpu -t opea/tei-gaudi:latest .
 
     cd $WORKPATH/docker/gaudi
     export GOOGLE_CSE_ID=$GOOGLE_CSE_ID
@@ -71,17 +58,6 @@ function start_services() {
 
     sed -i "s/backend_address/$ip_address/g" $WORKPATH/docker/ui/svelte/.env
 
-    if [[ "$IMAGE_REPO" != "" ]]; then
-        # Replace the container name with a test-specific name
-        echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
-        sed -i "s#image: opea/searchqna:latest#image: opea/searchqna:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/searchqna-ui:latest#image: opea/searchqna-ui:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose.yaml
-        sed -i "s#image: ${IMAGE_REPO}opea/tei-gaudi:latest#image: opea/tei-gaudi:latest#g" compose.yaml
-        echo "cat compose.yaml"
-        cat compose.yaml
-    fi
-
     # Start Docker Containers
     docker compose up -d
     n=0
@@ -118,13 +94,16 @@ function validate_frontend() {
     local conda_env_name="OPEA_e2e"
 
     export PATH=${HOME}/miniforge3/bin/:$PATH
-    #    conda remove -n ${conda_env_name} --all -y
-    #    conda create -n ${conda_env_name} python=3.12 -y
+    if conda info --envs | grep -q "$conda_env_name"; then
+        echo "$conda_env_name exist!"
+    else
+        conda create -n ${conda_env_name} python=3.12 -y
+    fi
     source activate ${conda_env_name}
 
     sed -i "s/localhost/$ip_address/g" playwright.config.ts
 
-    #    conda install -c conda-forge nodejs -y
+    conda install -c conda-forge nodejs -y
     npm install && npm ci && npx playwright install --with-deps
     node -v && npm -v && pip list
 
@@ -147,7 +126,7 @@ function stop_docker() {
 function main() {
 
     stop_docker
-    if [[ "$IMAGE_REPO" == "" ]]; then build_docker_images; fi
+    if [[ "$IMAGE_REPO" == "opea" ]]; then build_docker_images; fi
     start_services
 
     validate_megaservice
diff --git a/SearchQnA/tests/test_searchqna_on_xeon.sh b/SearchQnA/tests/test_searchqna_on_xeon.sh
index 31f8c0b0be..583723a090 100644
--- a/SearchQnA/tests/test_searchqna_on_xeon.sh
+++ b/SearchQnA/tests/test_searchqna_on_xeon.sh
@@ -3,28 +3,27 @@
 # SPDX-License-Identifier: Apache-2.0
 
 set -xe
+IMAGE_REPO=${IMAGE_REPO:-"opea"}
+IMAGE_TAG=${IMAGE_TAG:-"latest"}
+echo "REGISTRY=IMAGE_REPO=${IMAGE_REPO}"
+echo "TAG=IMAGE_TAG=${IMAGE_TAG}"
+export REGISTRY=${IMAGE_REPO}
+export TAG=${IMAGE_TAG}
 
 WORKPATH=$(dirname "$PWD")
 LOG_PATH="$WORKPATH/tests"
 ip_address=$(hostname -I | awk '{print $1}')
 
 function build_docker_images() {
-    cd $WORKPATH
+    cd $WORKPATH/docker
     git clone https://github.com/opea-project/GenAIComps.git
-    cd GenAIComps
 
-    docker build -t opea/embedding-tei:latest  -f comps/embeddings/langchain/docker/Dockerfile .
-    docker build -t opea/web-retriever-chroma:latest  -f comps/web_retrievers/langchain/chroma/docker/Dockerfile .
-    docker build -t opea/reranking-tei:latest  -f comps/reranks/tei/docker/Dockerfile .
-    docker build -t opea/llm-tgi:latest  -f comps/llms/text-generation/tgi/Dockerfile .
+    echo "Build all the images with --no-cache, check docker_image_build.log for details..."
+    service_list="searchqna searchqna-ui embedding-tei web-retriever-chroma reranking-tei llm-tgi"
+    docker compose -f docker_build_compose.yaml build ${service_list} --no-cache > ${LOG_PATH}/docker_image_build.log
+
     docker pull ghcr.io/huggingface/text-embeddings-inference:cpu-1.5
     docker pull ghcr.io/huggingface/text-generation-inference:1.4
-    cd $WORKPATH/docker
-    docker build -t opea/searchqna:latest -f Dockerfile .
-
-    cd $WORKPATH/docker/ui
-    docker build --no-cache -t opea/searchqna-ui:latest -f docker/Dockerfile .
-
     docker images
 }
 
@@ -57,25 +56,15 @@ function start_services() {
 
     sed -i "s/backend_address/$ip_address/g" $WORKPATH/docker/ui/svelte/.env
 
-    if [[ "$IMAGE_REPO" != "" ]]; then
-        # Replace the container name with a test-specific name
-        echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
-        sed -i "s#image: opea/searchqna:latest#image: opea/searchqna:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/searchqna-ui:latest#image: opea/searchqna-ui:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose.yaml
-        echo "cat compose.yaml"
-        cat compose.yaml
-    fi
-
     # Start Docker Containers
     docker compose up -d
     n=0
-    until [[ "$n" -ge 200 ]]; do
+    until [[ "$n" -ge 100 ]]; do
         docker logs tgi-service > $LOG_PATH/tgi_service_start.log
         if grep -q Connected $LOG_PATH/tgi_service_start.log; then
             break
         fi
-        sleep 1s
+        sleep 5s
         n=$((n+1))
     done
 }
@@ -97,28 +86,31 @@ function validate_megaservice() {
 }
 
 function validate_frontend() {
-   cd $WORKPATH/docker/ui/svelte
-   local conda_env_name="OPEA_e2e"
-   export PATH=${HOME}/miniforge3/bin/:$PATH
-#    conda remove -n ${conda_env_name} --all -y
-#    conda create -n ${conda_env_name} python=3.12 -y
-   source activate ${conda_env_name}
+    cd $WORKPATH/docker/ui/svelte
+    local conda_env_name="OPEA_e2e"
+    export PATH=${HOME}/miniforge3/bin/:$PATH
+    if conda info --envs | grep -q "$conda_env_name"; then
+        echo "$conda_env_name exist!"
+    else
+        conda create -n ${conda_env_name} python=3.12 -y
+    fi
+    source activate ${conda_env_name}
 
-   sed -i "s/localhost/$ip_address/g" playwright.config.ts
+    sed -i "s/localhost/$ip_address/g" playwright.config.ts
 
-#    conda install -c conda-forge nodejs -y
-   npm install && npm ci && npx playwright install --with-deps
-   node -v && npm -v && pip list
+    conda install -c conda-forge nodejs -y
+    npm install && npm ci && npx playwright install --with-deps
+    node -v && npm -v && pip list
 
-   exit_status=0
-   npx playwright test || exit_status=$?
+    exit_status=0
+    npx playwright test || exit_status=$?
 
-   if [ $exit_status -ne 0 ]; then
+    if [ $exit_status -ne 0 ]; then
        echo "[TEST INFO]: ---------frontend test failed---------"
        exit $exit_status
-   else
+    else
        echo "[TEST INFO]: ---------frontend test passed---------"
-   fi
+    fi
 }
 
 function stop_docker() {
@@ -129,7 +121,7 @@ function stop_docker() {
 function main() {
 
     stop_docker
-    if [[ "$IMAGE_REPO" == "" ]]; then build_docker_images; fi
+    if [[ "$IMAGE_REPO" == "opea" ]]; then build_docker_images; fi
     start_services
 
     validate_megaservice
diff --git a/Translation/docker/docker_build_compose.yaml b/Translation/docker/docker_build_compose.yaml
new file mode 100644
index 0000000000..5b2dea9ac3
--- /dev/null
+++ b/Translation/docker/docker_build_compose.yaml
@@ -0,0 +1,18 @@
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
+
+services:
+  translation:
+    build:
+      args:
+        http_proxy: ${http_proxy}
+        https_proxy: ${https_proxy}
+        no_proxy: ${no_proxy}
+      dockerfile: ./Dockerfile
+    image: ${REGISTRY:-opea}/translation:${TAG:-latest}
+  translation-ui:
+    build:
+      context: ui
+      dockerfile: ./docker/Dockerfile
+    extends: translation
+    image: ${REGISTRY:-opea}/translation-ui:${TAG:-latest}
diff --git a/Translation/docker/gaudi/compose.yaml b/Translation/docker/gaudi/compose.yaml
index 1d77edcbb0..2388f85214 100644
--- a/Translation/docker/gaudi/compose.yaml
+++ b/Translation/docker/gaudi/compose.yaml
@@ -1,18 +1,5 @@
-# Copyright (c) 2024 Intel Corporation
-#
-# 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.
-
-version: "3.8"
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
 
 services:
   tgi-service:
@@ -29,7 +16,7 @@ services:
       - "./data:/data"
     command: --model-id ${LLM_MODEL_ID} --max-input-length 1024 --max-total-tokens 2048
   llm:
-    image: opea/llm-tgi:latest
+    image: ${REGISTRY:-opea}/llm-tgi:${TAG:-latest}
     container_name: llm-tgi-gaudi-server
     depends_on:
       - tgi-service
@@ -43,7 +30,7 @@ services:
       HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
     restart: unless-stopped
   translation-gaudi-backend-server:
-    image: opea/translation:latest
+    image: ${REGISTRY:-opea}/translation:${TAG:-latest}
     container_name: translation-gaudi-backend-server
     depends_on:
       - tgi-service
@@ -58,7 +45,7 @@ services:
     ipc: host
     restart: always
   translation-gaudi-ui-server:
-    image: opea/translation-ui:latest
+    image: ${REGISTRY:-opea}/translation-ui:${TAG:-latest}
     container_name: translation-gaudi-ui-server
     depends_on:
       - translation-gaudi-backend-server
diff --git a/Translation/docker/xeon/compose.yaml b/Translation/docker/xeon/compose.yaml
index 697c90a800..da7a43763f 100644
--- a/Translation/docker/xeon/compose.yaml
+++ b/Translation/docker/xeon/compose.yaml
@@ -1,18 +1,5 @@
-# Copyright (c) 2024 Intel Corporation
-#
-# 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.
-
-version: "3.8"
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
 
 services:
   tgi-service:
@@ -30,7 +17,7 @@ services:
     shm_size: 1g
     command: --model-id ${LLM_MODEL_ID}
   llm:
-    image: opea/llm-tgi:latest
+    image: ${REGISTRY:-opea}/llm-tgi:${TAG:-latest}
     container_name: llm-tgi-server
     depends_on:
       - tgi-service
@@ -44,7 +31,7 @@ services:
       HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
     restart: unless-stopped
   translation-xeon-backend-server:
-    image: opea/translation:latest
+    image: ${REGISTRY:-opea}/translation:${TAG:-latest}
     container_name: translation-xeon-backend-server
     depends_on:
       - tgi-service
@@ -59,7 +46,7 @@ services:
     ipc: host
     restart: always
   translation-xeon-ui-server:
-    image: opea/translation-ui:latest
+    image: ${REGISTRY:-opea}/translation-ui:${TAG:-latest}
     container_name: translation-xeon-ui-server
     depends_on:
       - translation-xeon-backend-server
diff --git a/Translation/tests/test_translation_on_gaudi.sh b/Translation/tests/test_translation_on_gaudi.sh
index c5060a165a..47aa96a259 100644
--- a/Translation/tests/test_translation_on_gaudi.sh
+++ b/Translation/tests/test_translation_on_gaudi.sh
@@ -3,25 +3,26 @@
 # SPDX-License-Identifier: Apache-2.0
 
 set -x
+IMAGE_REPO=${IMAGE_REPO:-"opea"}
+IMAGE_TAG=${IMAGE_TAG:-"latest"}
+echo "REGISTRY=IMAGE_REPO=${IMAGE_REPO}"
+echo "TAG=IMAGE_TAG=${IMAGE_TAG}"
+export REGISTRY=${IMAGE_REPO}
+export TAG=${IMAGE_TAG}
 
 WORKPATH=$(dirname "$PWD")
 LOG_PATH="$WORKPATH/tests"
 ip_address=$(hostname -I | awk '{print $1}')
 
 function build_docker_images() {
-    cd $WORKPATH
+    cd $WORKPATH/docker
     git clone https://github.com/opea-project/GenAIComps.git
-    cd GenAIComps
-    docker build --no-cache -t opea/llm-tgi:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/llms/text-generation/tgi/Dockerfile .
 
-    cd $WORKPATH/docker
-    docker build --no-cache -t opea/translation:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f Dockerfile .
+    echo "Build all the images with --no-cache, check docker_image_build.log for details..."
+    service_list="translation translation-ui llm-tgi"
+    docker compose -f docker_build_compose.yaml build ${service_list} --no-cache > ${LOG_PATH}/docker_image_build.log
 
     docker pull ghcr.io/huggingface/tgi-gaudi:2.0.1
-
-    cd $WORKPATH/docker/ui
-    docker build --no-cache -t opea/translation-ui:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f docker/Dockerfile .
-
     docker images
 }
 
@@ -37,16 +38,6 @@ function start_services() {
 
     sed -i "s/backend_address/$ip_address/g" $WORKPATH/docker/ui/svelte/.env
 
-    if [[ "$IMAGE_REPO" != "" ]]; then
-        # Replace the container name with a test-specific name
-        echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
-        sed -i "s#image: opea/translation:latest#image: opea/translation:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/translation-ui:latest#image: opea/translation-ui:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose.yaml
-        echo "cat compose.yaml"
-        cat compose.yaml
-    fi
-
     # Start Docker Containers
     docker compose up -d
 
@@ -126,13 +117,16 @@ function validate_frontend() {
     cd $WORKPATH/docker/ui/svelte
     local conda_env_name="OPEA_e2e"
     export PATH=${HOME}/miniforge3/bin/:$PATH
-#    conda remove -n ${conda_env_name} --all -y
-#    conda create -n ${conda_env_name} python=3.12 -y
+    if conda info --envs | grep -q "$conda_env_name"; then
+        echo "$conda_env_name exist!"
+    else
+        conda create -n ${conda_env_name} python=3.12 -y
+    fi
     source activate ${conda_env_name}
 
     sed -i "s/localhost/$ip_address/g" playwright.config.ts
 
-#    conda install -c conda-forge nodejs -y
+    conda install -c conda-forge nodejs -y
     npm install && npm ci && npx playwright install --with-deps
     node -v && npm -v && pip list
 
@@ -156,7 +150,7 @@ function main() {
 
     stop_docker
 
-    if [[ "$IMAGE_REPO" == "" ]]; then build_docker_images; fi
+    if [[ "$IMAGE_REPO" == "opea" ]]; then build_docker_images; fi
     start_services
 
     validate_microservices
diff --git a/Translation/tests/test_translation_on_xeon.sh b/Translation/tests/test_translation_on_xeon.sh
index 3f460a23bc..2b67833d66 100644
--- a/Translation/tests/test_translation_on_xeon.sh
+++ b/Translation/tests/test_translation_on_xeon.sh
@@ -3,24 +3,26 @@
 # SPDX-License-Identifier: Apache-2.0
 
 set -x
+IMAGE_REPO=${IMAGE_REPO:-"opea"}
+IMAGE_TAG=${IMAGE_TAG:-"latest"}
+echo "REGISTRY=IMAGE_REPO=${IMAGE_REPO}"
+echo "TAG=IMAGE_TAG=${IMAGE_TAG}"
+export REGISTRY=${IMAGE_REPO}
+export TAG=${IMAGE_TAG}
 
 WORKPATH=$(dirname "$PWD")
 LOG_PATH="$WORKPATH/tests"
 ip_address=$(hostname -I | awk '{print $1}')
 
 function build_docker_images() {
-    cd $WORKPATH
-    git clone https://github.com/opea-project/GenAIComps.git
-    cd GenAIComps
-
-    docker build --no-cache -t opea/llm-tgi:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/llms/text-generation/tgi/Dockerfile .
-
     cd $WORKPATH/docker
-    docker build --no-cache -t opea/translation:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f Dockerfile .
+    git clone https://github.com/opea-project/GenAIComps.git
 
-    cd $WORKPATH/docker/ui
-    docker build --no-cache -t opea/translation-ui:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f docker/Dockerfile .
+    echo "Build all the images with --no-cache, check docker_image_build.log for details..."
+    service_list="translation translation-ui llm-tgi"
+    docker compose -f docker_build_compose.yaml build ${service_list} --no-cache > ${LOG_PATH}/docker_image_build.log
 
+    docker pull ghcr.io/huggingface/text-generation-inference:1.4
     docker images
 }
 
@@ -36,16 +38,6 @@ function start_services() {
 
     sed -i "s/backend_address/$ip_address/g" $WORKPATH/docker/ui/svelte/.env
 
-    if [[ "$IMAGE_REPO" != "" ]]; then
-        # Replace the container name with a test-specific name
-        echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
-        sed -i "s#image: opea/translation:latest#image: opea/translation:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/translation-ui:latest#image: opea/translation-ui:${IMAGE_TAG}#g" compose.yaml
-        sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose.yaml
-        echo "cat compose.yaml"
-        cat compose.yaml
-    fi
-
     # Start Docker Containers
     docker compose up -d
 
@@ -123,13 +115,16 @@ function validate_frontend() {
     cd $WORKPATH/docker/ui/svelte
     local conda_env_name="OPEA_e2e"
     export PATH=${HOME}/miniforge3/bin/:$PATH
-#    conda remove -n ${conda_env_name} --all -y
-#    conda create -n ${conda_env_name} python=3.12 -y
+    if conda info --envs | grep -q "$conda_env_name"; then
+        echo "$conda_env_name exist!"
+    else
+        conda create -n ${conda_env_name} python=3.12 -y
+    fi
     source activate ${conda_env_name}
 
     sed -i "s/localhost/$ip_address/g" playwright.config.ts
 
-#    conda install -c conda-forge nodejs -y
+    conda install -c conda-forge nodejs -y
     npm install && npm ci && npx playwright install --with-deps
     node -v && npm -v && pip list
 
@@ -153,7 +148,7 @@ function main() {
 
     stop_docker
 
-    if [[ "$IMAGE_REPO" == "" ]]; then build_docker_images; fi
+    if [[ "$IMAGE_REPO" == "opea" ]]; then build_docker_images; fi
     start_services
 
     validate_microservices
diff --git a/VisualQnA/docker/gaudi/compose.yaml b/VisualQnA/docker/gaudi/compose.yaml
index 98445056e3..2162329993 100644
--- a/VisualQnA/docker/gaudi/compose.yaml
+++ b/VisualQnA/docker/gaudi/compose.yaml
@@ -1,12 +1,9 @@
-
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-version: "3.8"
-
 services:
   llava-tgi-service:
-    image: opea/llava-tgi:latest
+    image: ${REGISTRY:-opea}/llava-tgi:${TAG:-latest}
     container_name: tgi-llava-gaudi-server
     ports:
       - "8399:80"
@@ -26,7 +23,7 @@ services:
     ipc: host
     command: --model-id ${LVM_MODEL_ID} --max-input-length 4096 --max-total-tokens 8192
   lvm-tgi:
-    image: opea/lvm-tgi:latest
+    image: ${REGISTRY:-opea}/lvm-tgi:${TAG:-latest}
     container_name: lvm-tgi-gaudi-server
     depends_on:
       - llava-tgi-service
@@ -42,7 +39,7 @@ services:
       HF_HUB_ENABLE_HF_TRANSFER: 0
     restart: unless-stopped
   visualqna-gaudi-backend-server:
-    image: opea/visualqna:latest
+    image: ${REGISTRY:-opea}/visualqna:${TAG:-latest}
     container_name: visualqna-gaudi-backend-server
     depends_on:
       - llava-tgi-service
@@ -58,7 +55,7 @@ services:
     ipc: host
     restart: always
   visualqna-gaudi-ui-server:
-    image: opea/visualqna-ui:latest
+    image: ${REGISTRY:-opea}/visualqna-ui:${TAG:-latest}
     container_name: visualqna-gaudi-ui-server
     depends_on:
       - visualqna-gaudi-backend-server
diff --git a/VisualQnA/docker/xeon/compose.yaml b/VisualQnA/docker/xeon/compose.yaml
index b43e30f31b..e38f64cf9c 100644
--- a/VisualQnA/docker/xeon/compose.yaml
+++ b/VisualQnA/docker/xeon/compose.yaml
@@ -1,12 +1,9 @@
-
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-version: "3.8"
-
 services:
   llava-tgi-service:
-    image: opea/llava-tgi-xeon:latest
+    image: ${REGISTRY:-opea}/llava-tgi-xeon:${TAG:-latest}
     container_name: tgi-llava-xeon-server
     ports:
       - "9399:80"
@@ -21,7 +18,7 @@ services:
       HF_HUB_ENABLE_HF_TRANSFER: 0
     command: --model-id ${LVM_MODEL_ID} --max-input-length 4096 --max-total-tokens 8192 --cuda-graphs 0
   lvm-tgi:
-    image: opea/lvm-tgi:latest
+    image: ${REGISTRY:-opea}/lvm-tgi:${TAG:-latest}
     container_name: lvm-tgi-server
     depends_on:
       - llava-tgi-service
@@ -37,7 +34,7 @@ services:
       HF_HUB_ENABLE_HF_TRANSFER: 0
     restart: unless-stopped
   visualqna-xeon-backend-server:
-    image: opea/visualqna:latest
+    image: ${REGISTRY:-opea}/visualqna:${TAG:-latest}
     container_name: visualqna-xeon-backend-server
     depends_on:
       - llava-tgi-service
@@ -53,7 +50,7 @@ services:
     ipc: host
     restart: always
   visualqna-xeon-ui-server:
-    image: opea/visualqna-ui:latest
+    image: ${REGISTRY:-opea}/visualqna-ui:${TAG:-latest}
     container_name: visualqna-xeon-ui-server
     depends_on:
       - visualqna-xeon-backend-server

From cfe98e8f0df4c788f102f55005f5be29ef8208cb Mon Sep 17 00:00:00 2001
From: "chen, suyue" <suyue.chen@intel.com>
Date: Fri, 16 Aug 2024 00:22:24 +0800
Subject: [PATCH 41/57] Fix left issues in CI/CD structure refactor (#599)

Signed-off-by: chensuyue <suyue.chen@intel.com>
Signed-off-by: dmsuehir <dina.s.jones@intel.com>
---
 CodeGen/docker/docker_build_compose.yaml       | 2 +-
 DocSum/tests/test_docsum_on_gaudi.sh           | 2 +-
 DocSum/tests/test_docsum_on_xeon.sh            | 2 +-
 Translation/docker/docker_build_compose.yaml   | 6 ++++++
 Translation/tests/test_translation_on_gaudi.sh | 6 +++---
 Translation/tests/test_translation_on_xeon.sh  | 2 +-
 6 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/CodeGen/docker/docker_build_compose.yaml b/CodeGen/docker/docker_build_compose.yaml
index bc1db1194a..f68dfa8a53 100644
--- a/CodeGen/docker/docker_build_compose.yaml
+++ b/CodeGen/docker/docker_build_compose.yaml
@@ -27,4 +27,4 @@ services:
       context: GenAIComps
       dockerfile: comps/llms/text-generation/tgi/Dockerfile
     extends: codegen
-    image: ${REGISTRY}opea/llm-tgi:${TAG:-latest}
+    image: ${REGISTRY:-opea}/llm-tgi:${TAG:-latest}
diff --git a/DocSum/tests/test_docsum_on_gaudi.sh b/DocSum/tests/test_docsum_on_gaudi.sh
index 0906bd906c..8cd1da774c 100644
--- a/DocSum/tests/test_docsum_on_gaudi.sh
+++ b/DocSum/tests/test_docsum_on_gaudi.sh
@@ -104,7 +104,7 @@ function validate_megaservice() {
     # Curl the Mega Service
     validate_services \
     "${ip_address}:8888/v1/docsum" \
-    "versatile toolkit" \
+    "toolkit" \
     "mega-docsum" \
     "docsum-gaudi-backend-server" \
     '{"messages": "Text Embeddings Inference (TEI) is a toolkit for deploying and serving open source text embeddings and sequence classification models. TEI enables high-performance extraction for the most popular models, including FlagEmbedding, Ember, GTE and E5."}'
diff --git a/DocSum/tests/test_docsum_on_xeon.sh b/DocSum/tests/test_docsum_on_xeon.sh
index e9bc7a8c00..22415f34f2 100644
--- a/DocSum/tests/test_docsum_on_xeon.sh
+++ b/DocSum/tests/test_docsum_on_xeon.sh
@@ -103,7 +103,7 @@ function validate_megaservice() {
     # Curl the Mega Service
     validate_services \
     "${ip_address}:8888/v1/docsum" \
-    "versatile toolkit" \
+    "toolkit" \
     "mega-docsum" \
     "docsum-xeon-backend-server" \
     '{"messages": "Text Embeddings Inference (TEI) is a toolkit for deploying and serving open source text embeddings and sequence classification models. TEI enables high-performance extraction for the most popular models, including FlagEmbedding, Ember, GTE and E5."}'
diff --git a/Translation/docker/docker_build_compose.yaml b/Translation/docker/docker_build_compose.yaml
index 5b2dea9ac3..05da618777 100644
--- a/Translation/docker/docker_build_compose.yaml
+++ b/Translation/docker/docker_build_compose.yaml
@@ -16,3 +16,9 @@ services:
       dockerfile: ./docker/Dockerfile
     extends: translation
     image: ${REGISTRY:-opea}/translation-ui:${TAG:-latest}
+  llm-tgi:
+    build:
+      context: GenAIComps
+      dockerfile: comps/llms/text-generation/tgi/Dockerfile
+    extends: translation
+    image: ${REGISTRY:-opea}/llm-tgi:${TAG:-latest}
diff --git a/Translation/tests/test_translation_on_gaudi.sh b/Translation/tests/test_translation_on_gaudi.sh
index 47aa96a259..8262c54f08 100644
--- a/Translation/tests/test_translation_on_gaudi.sh
+++ b/Translation/tests/test_translation_on_gaudi.sh
@@ -2,7 +2,7 @@
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-set -x
+set -xe
 IMAGE_REPO=${IMAGE_REPO:-"opea"}
 IMAGE_TAG=${IMAGE_TAG:-"latest"}
 echo "REGISTRY=IMAGE_REPO=${IMAGE_REPO}"
@@ -42,12 +42,12 @@ function start_services() {
     docker compose up -d
 
     n=0
-    until [[ "$n" -ge 500 ]]; do
+    until [[ "$n" -ge 100 ]]; do
         docker logs tgi-gaudi-server > ${LOG_PATH}/tgi_service_start.log
         if grep -q Connected ${LOG_PATH}/tgi_service_start.log; then
             break
         fi
-        sleep 1s
+        sleep 5s
         n=$((n+1))
     done
 }
diff --git a/Translation/tests/test_translation_on_xeon.sh b/Translation/tests/test_translation_on_xeon.sh
index 2b67833d66..e0e61523cf 100644
--- a/Translation/tests/test_translation_on_xeon.sh
+++ b/Translation/tests/test_translation_on_xeon.sh
@@ -2,7 +2,7 @@
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-set -x
+set -xe
 IMAGE_REPO=${IMAGE_REPO:-"opea"}
 IMAGE_TAG=${IMAGE_TAG:-"latest"}
 echo "REGISTRY=IMAGE_REPO=${IMAGE_REPO}"

From 220b0cfd7b2019daa3a44a0c5e6347e1e6000c68 Mon Sep 17 00:00:00 2001
From: "chen, suyue" <suyue.chen@intel.com>
Date: Fri, 16 Aug 2024 00:22:40 +0800
Subject: [PATCH 42/57] Add BoM collect workflow and image publish workflow
 (#600)

Signed-off-by: chensuyue <suyue.chen@intel.com>
Signed-off-by: dmsuehir <dina.s.jones@intel.com>
---
 .github/workflows/_example-workflow.yml       | 41 ++--------
 .github/workflows/manual-bom-scan.yml         | 74 +++++++++++++++++++
 .github/workflows/manual-docker-publish.yml   | 68 +++++++++++++++++
 ...rkflow.yml => manual-example-workflow.yml} | 16 +---
 4 files changed, 151 insertions(+), 48 deletions(-)
 create mode 100644 .github/workflows/manual-bom-scan.yml
 create mode 100644 .github/workflows/manual-docker-publish.yml
 rename .github/workflows/{manual-cd-workflow.yml => manual-example-workflow.yml} (82%)

diff --git a/.github/workflows/_example-workflow.yml b/.github/workflows/_example-workflow.yml
index c293a8b1ef..7e86ed288b 100644
--- a/.github/workflows/_example-workflow.yml
+++ b/.github/workflows/_example-workflow.yml
@@ -32,14 +32,6 @@ on:
         default: false
         required: false
         type: boolean
-      publish:
-        default: false
-        required: false
-        type: boolean
-      publish_tags:
-        default: "latest"
-        required: false
-        type: string
       GenAIComps_branch:
         default: "main"
         required: false
@@ -83,7 +75,7 @@ jobs:
 ####################################################################################################
 # Trivy Scan
 ####################################################################################################
-  image-list:
+  get-image-list:
     needs: [build-images]
     if: ${{ fromJSON(inputs.scan) && inputs.node == 'gaudi' }}
     runs-on: ubuntu-latest
@@ -97,16 +89,16 @@ jobs:
         id: scan-matrix
         run: |
           pip install yq
-          compose_path=${{ github.workspace }}/.github/workflows/docker/compose/${{ inputs.example }}-compose.yaml
+          compose_path=${{ github.workspace }}/${{ inputs.example }}/docker/docker_build_compose.yaml
           echo "matrix=$(cat ${compose_path} | yq -r '.[]' | jq 'keys' | jq -c '.')" >> $GITHUB_OUTPUT
 
   scan-images:
-    needs: [image-list, build-images]
+    needs: [get-image-list, build-images]
     if: ${{ fromJSON(inputs.scan) && inputs.node == 'gaudi'}}
     runs-on: "docker-build-${{ inputs.node }}"
     strategy:
       matrix:
-        image: ${{ fromJSON(needs.image-list.outputs.matrix) }}
+        image: ${{ fromJSON(needs.get-image-list.outputs.matrix) }}
       fail-fast: false
     steps:
       - name: Pull Image
@@ -118,7 +110,7 @@ jobs:
         uses: opea-project/validation/actions/trivy-scan@main
         with:
           image-ref: ${{ env.OPEA_IMAGE_REPO }}opea/${{ matrix.image }}:${{ inputs.tag }}
-          output: ${{ inputs.example }}-${{ matrix.image }}-scan.txt
+          output: ${{ matrix.image }}-scan.txt
 
       - name: Cleanup
         if: always()
@@ -126,8 +118,8 @@ jobs:
 
       - uses: actions/upload-artifact@v4.3.4
         with:
-          name: ${{ inputs.example }}-${{ matrix.image }}-scan
-          path: ${{ inputs.example }}-${{ matrix.image }}-scan.txt
+          name: ${{ matrix.image }}-scan
+          path: ${{ matrix.image }}-scan.txt
           overwrite: true
 
 ####################################################################################################
@@ -156,22 +148,3 @@ jobs:
       hardware: ${{ inputs.node }}
       tag: ${{ inputs.tag }}
     secrets: inherit
-
-
-####################################################################################################
-# Publish
-####################################################################################################
-  publish:
-    needs: [image-list, build-images, scan-images, test-example-compose]
-    if: ${{ fromJSON(inputs.publish) && inputs.node == 'gaudi' }}
-    strategy:
-      matrix:
-        image: ${{ fromJSON(needs.image-list.outputs.matrix) }}
-    runs-on: "docker-build-gaudi"
-    steps:
-      - name: Image Publish
-        uses: opea-project/validation/actions/image-publish@main
-        with:
-          local_image_ref: ${OPEA_IMAGE_REPO}opea/${{ matrix.image }}:${{ inputs.tag }}
-          image_name: opea/${{ matrix.image }}
-          publish_tags: ${{ inputs.publish_tags }}
diff --git a/.github/workflows/manual-bom-scan.yml b/.github/workflows/manual-bom-scan.yml
new file mode 100644
index 0000000000..4be4600f48
--- /dev/null
+++ b/.github/workflows/manual-bom-scan.yml
@@ -0,0 +1,74 @@
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
+
+name: Examples docker images BoM scan
+on:
+  workflow_dispatch:
+    inputs:
+      node:
+        default: "gaudi"
+        description: "Hardware to run test"
+        required: true
+        type: string
+      examples:
+        default: "ChatQnA"
+        description: 'List of examples to test [AudioQnA,ChatQnA,CodeGen,CodeTrans,DocSum,FaqGen,SearchQnA,Translation]'
+        required: true
+        type: string
+      tag:
+        default: "latest"
+        description: "Tag to apply to images"
+        required: true
+        type: string
+
+permissions: read-all
+jobs:
+  get-image-list:
+    runs-on: ubuntu-latest
+    outputs:
+      matrix: ${{ steps.scan-matrix.outputs.matrix }}
+    steps:
+      - name: Checkout out Repo
+        uses: actions/checkout@v4
+
+      - name: Set Matrix
+        id: scan-matrix
+        run: |
+          pip install yq
+          examples=($(echo ${{ inputs.examples }} | tr ',' ' '))
+          image_list=[]
+          for example in ${examples[@]}
+          do
+              images=$(cat ${{ github.workspace }}/${example}/docker/docker_build_compose.yaml | yq -r '.[]' | jq 'keys' | jq -c '.')
+              image_list=$(echo ${image_list} | jq -s '.[0] + .[1] | unique' - <(echo ${images}))
+          done
+          echo "matrix=$(echo ${image_list} | jq -c '.')" >> $GITHUB_OUTPUT
+
+  scan-license:
+    needs: get-image-list
+    runs-on: "docker-build-${{ inputs.node }}"
+    strategy:
+      matrix:
+        image: ${{ fromJson(needs.get-image-list.outputs.matrix) }}
+      fail-fast: false
+    steps:
+      - name: Pull Image
+        run: |
+          docker pull ${OPEA_IMAGE_REPO}opea/${{ matrix.image }}:${{ inputs.tag }}
+          echo "OPEA_IMAGE_REPO=${OPEA_IMAGE_REPO}" >> $GITHUB_ENV
+
+      - name: Scan Container
+        uses: opea-project/validation/actions/license-scan@main # TODO
+        with:
+          image-ref: ${{ env.OPEA_IMAGE_REPO }}opea/${{ matrix.image }}:${{ inputs.tag }}
+          output: ${{ matrix.image }}-scan.txt
+
+      - name: Cleanup
+        if: always()
+        run: docker rmi -f ${OPEA_IMAGE_REPO}opea/${{ matrix.image }}:${{ inputs.tag }}
+
+      - uses: actions/upload-artifact@v4.3.4
+        with:
+          name: ${{ matrix.image }}-scan
+          path: ${{ matrix.image }}-scan.txt
+          overwrite: true
diff --git a/.github/workflows/manual-docker-publish.yml b/.github/workflows/manual-docker-publish.yml
new file mode 100644
index 0000000000..44315a6df4
--- /dev/null
+++ b/.github/workflows/manual-docker-publish.yml
@@ -0,0 +1,68 @@
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
+
+name: Examples CD workflow on manual event
+on:
+  workflow_dispatch:
+    inputs:
+      nodes:
+        default: "gaudi"
+        description: "Hardware to run test"
+        required: true
+        type: string
+      examples:
+        default: "ChatQnA"
+        description: 'List of examples to test [AudioQnA,ChatQnA,CodeGen,CodeTrans,DocSum,FaqGen,SearchQnA,Translation]'
+        required: true
+        type: string
+      tag:
+        default: "latest"
+        description: "Tag to apply to images"
+        required: true
+        type: string
+      publish:
+        default: false
+        description: 'Publish images to docker hub'
+        required: false
+        type: boolean
+      publish_tags:
+        default: "latest,v1.0"
+        description: 'Tag list apply to publish images'
+        required: false
+        type: string
+
+permissions: read-all
+jobs:
+  get-image-list:
+    runs-on: ${{ inputs.node }}
+    outputs:
+      matrix: ${{ steps.scan-matrix.outputs.matrix }}
+    steps:
+      - name: Checkout out Repo
+        uses: actions/checkout@v4
+
+      - name: Set Matrix
+        id: scan-matrix
+        run: |
+          examples=($(echo ${{ inputs.examples }} | tr ',' ' '))
+          image_list=[]
+          for example in ${examples[@]}
+          do
+              images=$(cat ${{ github.workspace }}/${example}/docker/docker_build_compose.yaml | yq -r '.[]' | jq 'keys' | jq -c '.')
+              image_list=$(echo ${image_list} | jq -s '.[0] + .[1] | unique' - <(echo ${images}))
+          done
+          echo "matrix=$(echo ${image_list} | jq -c '.')" >> $GITHUB_OUTPUT
+
+  publish:
+    needs: [get-image-list]
+    strategy:
+      matrix:
+        image: ${{ fromJSON(needs.get-image-list.outputs.matrix) }}
+    runs-on: "docker-build-${{ inputs.node }}"
+    steps:
+      - name: Image Publish
+        uses: opea-project/validation/actions/image-publish@main
+        with:
+          local_image_ref: ${OPEA_IMAGE_REPO}opea/${{ matrix.image }}:${{ inputs.tag }}
+          image_name: opea/${{ matrix.image }}
+          publish_tags: ${{ inputs.publish_tags }}
diff --git a/.github/workflows/manual-cd-workflow.yml b/.github/workflows/manual-example-workflow.yml
similarity index 82%
rename from .github/workflows/manual-cd-workflow.yml
rename to .github/workflows/manual-example-workflow.yml
index 7159ba6321..561183685c 100644
--- a/.github/workflows/manual-cd-workflow.yml
+++ b/.github/workflows/manual-example-workflow.yml
@@ -40,16 +40,6 @@ on:
         description: 'Test examples with k8s'
         required: false
         type: boolean
-      publish:
-        default: false
-        description: 'Publish images to docker hub'
-        required: false
-        type: boolean
-      publish_tags:
-        default: "latest,v1.0"
-        description: 'Tag list apply to publish images'
-        required: false
-        type: string
       GenAIComps_branch:
         default: "main"
         description: 'GenAIComps branch for image build'
@@ -67,10 +57,10 @@ jobs:
     - name: Create Matrix
       id: get-matrix
       run: |
-        examples=($(echo ${{ github.event.inputs.examples }} | tr ',' ' '))
+        examples=($(echo ${{ inputs.examples }} | tr ',' ' '))
         examples_json=$(printf '%s\n' "${examples[@]}" | sort -u | jq -R '.' | jq -sc '.')
         echo "examples=$examples_json" >> $GITHUB_OUTPUT
-        nodes=($(echo ${{ github.event.inputs.nodes }} | tr ',' ' '))
+        nodes=($(echo ${{ inputs.nodes }} | tr ',' ' '))
         nodes_json=$(printf '%s\n' "${nodes[@]}" | sort -u | jq -R '.' | jq -sc '.')
         echo "nodes=$nodes_json" >> $GITHUB_OUTPUT
 
@@ -90,7 +80,5 @@ jobs:
       scan: ${{ fromJSON(inputs.scan) }}
       test_compose: ${{ fromJSON(inputs.test_compose) }}
       test_k8s: ${{ fromJSON(inputs.test_k8s) }}
-      publish: ${{ fromJSON(inputs.publish) }}
-      publish_tags: ${{ inputs.publish_tags }}
       GenAIComps_branch: ${{ inputs.GenAIComps_branch }}
     secrets: inherit

From 1b2dfa7d0a493d460fc465421f8c8ede616db079 Mon Sep 17 00:00:00 2001
From: "chen, suyue" <suyue.chen@intel.com>
Date: Fri, 16 Aug 2024 00:31:01 +0800
Subject: [PATCH 43/57] set action back to pull_request_target (#602)

Signed-off-by: chensuyue <suyue.chen@intel.com>
Signed-off-by: dmsuehir <dina.s.jones@intel.com>
---
 .github/workflows/pr-docker-compose-e2e.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/pr-docker-compose-e2e.yml b/.github/workflows/pr-docker-compose-e2e.yml
index e02c60fb83..66d9417e9c 100644
--- a/.github/workflows/pr-docker-compose-e2e.yml
+++ b/.github/workflows/pr-docker-compose-e2e.yml
@@ -4,7 +4,7 @@
 name: E2E test with docker compose
 
 on:
-  pull_request:
+  pull_request_target:
     branches: [main]
     types: [opened, reopened, ready_for_review, synchronize] # added `ready_for_review` since draft is skipped
     paths:

From 1cde81e511b1a469f12e1ffd0d3c81bcf63eb6ba Mon Sep 17 00:00:00 2001
From: "chen, suyue" <suyue.chen@intel.com>
Date: Thu, 15 Aug 2024 22:39:21 +0800
Subject: [PATCH 44/57] Enhance CI/CD infrastructure (#593)

Signed-off-by: chensuyue <suyue.chen@intel.com>
Signed-off-by: Sun, Xuehao <xuehao.sun@intel.com>
Signed-off-by: dmsuehir <dina.s.jones@intel.com>
---
 .github/workflows/_example-workflow.yml       | 4 ++++
 .github/workflows/manual-example-workflow.yml | 5 +++++
 .github/workflows/pr-docker-compose-e2e.yml   | 2 +-
 3 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/_example-workflow.yml b/.github/workflows/_example-workflow.yml
index 7e86ed288b..d5da50c5fc 100644
--- a/.github/workflows/_example-workflow.yml
+++ b/.github/workflows/_example-workflow.yml
@@ -36,6 +36,10 @@ on:
         default: "main"
         required: false
         type: string
+      GenAIComps_branch:
+        default: "main"
+        required: false
+        type: string
 jobs:
 ####################################################################################################
 # Image Build
diff --git a/.github/workflows/manual-example-workflow.yml b/.github/workflows/manual-example-workflow.yml
index 561183685c..606d444d29 100644
--- a/.github/workflows/manual-example-workflow.yml
+++ b/.github/workflows/manual-example-workflow.yml
@@ -45,6 +45,11 @@ on:
         description: 'GenAIComps branch for image build'
         required: false
         type: string
+      GenAIComps_branch:
+        default: "main"
+        description: 'GenAIComps branch for image build'
+        required: false
+        type: string
 
 permissions: read-all
 jobs:
diff --git a/.github/workflows/pr-docker-compose-e2e.yml b/.github/workflows/pr-docker-compose-e2e.yml
index 66d9417e9c..e02c60fb83 100644
--- a/.github/workflows/pr-docker-compose-e2e.yml
+++ b/.github/workflows/pr-docker-compose-e2e.yml
@@ -4,7 +4,7 @@
 name: E2E test with docker compose
 
 on:
-  pull_request_target:
+  pull_request:
     branches: [main]
     types: [opened, reopened, ready_for_review, synchronize] # added `ready_for_review` since draft is skipped
     paths:

From 82e359468d47e9b8e68ac43001ccba1c1f6db7b4 Mon Sep 17 00:00:00 2001
From: "chen, suyue" <suyue.chen@intel.com>
Date: Fri, 16 Aug 2024 00:31:01 +0800
Subject: [PATCH 45/57] set action back to pull_request_target (#602)

Signed-off-by: chensuyue <suyue.chen@intel.com>
Signed-off-by: dmsuehir <dina.s.jones@intel.com>
---
 .github/workflows/pr-docker-compose-e2e.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/pr-docker-compose-e2e.yml b/.github/workflows/pr-docker-compose-e2e.yml
index e02c60fb83..66d9417e9c 100644
--- a/.github/workflows/pr-docker-compose-e2e.yml
+++ b/.github/workflows/pr-docker-compose-e2e.yml
@@ -4,7 +4,7 @@
 name: E2E test with docker compose
 
 on:
-  pull_request:
+  pull_request_target:
     branches: [main]
     types: [opened, reopened, ready_for_review, synchronize] # added `ready_for_review` since draft is skipped
     paths:

From 8383b870d07d59d4c0310a1b57dbc5eaee298628 Mon Sep 17 00:00:00 2001
From: "chen, suyue" <suyue.chen@intel.com>
Date: Fri, 16 Aug 2024 09:26:54 +0800
Subject: [PATCH 46/57] Fix CD workflow typos (#605)

Signed-off-by: chensuyue <suyue.chen@intel.com>
Signed-off-by: dmsuehir <dina.s.jones@intel.com>
---
 .github/workflows/_example-workflow.yml     | 6 +++---
 .github/workflows/manual-bom-scan.yml       | 2 +-
 .github/workflows/manual-docker-publish.yml | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/.github/workflows/_example-workflow.yml b/.github/workflows/_example-workflow.yml
index d5da50c5fc..64fb62f3c3 100644
--- a/.github/workflows/_example-workflow.yml
+++ b/.github/workflows/_example-workflow.yml
@@ -57,15 +57,15 @@ jobs:
       - name: Clone required Repo
         run: |
           cd ${{ github.workspace }}/${{ inputs.example }}/docker
-          build_compose_path=${{ github.workspace }}/${{ inputs.example }}/docker/docker_build_compose.yaml
+          docker_compose_path=${{ github.workspace }}/${{ inputs.example }}/docker/docker_build_compose.yaml
           if [[ $(grep -c "tei-gaudi:" ${docker_compose_path}) != 0 ]]; then
               git clone https://github.com/huggingface/tei-gaudi.git
           fi
           if [[ $(grep -c "vllm:" ${docker_compose_path}) != 0 ]]; then
-              git clone https://github.com/huggingface/tei-gaudi.git
+              git clone https://github.com/vllm-project/vllm.git
           fi
           git clone https://github.com/opea-project/GenAIComps.git
-          cd GenAIComps && checkout ${{ inputs.GenAIComps_branch }} && cd ../
+          cd GenAIComps && git checkout ${{ inputs.GenAIComps_branch }} && cd ../
 
       - name: Build Image
         if: ${{ fromJSON(inputs.build) }}
diff --git a/.github/workflows/manual-bom-scan.yml b/.github/workflows/manual-bom-scan.yml
index 4be4600f48..f65738d1ef 100644
--- a/.github/workflows/manual-bom-scan.yml
+++ b/.github/workflows/manual-bom-scan.yml
@@ -1,7 +1,7 @@
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-name: Examples docker images BoM scan
+name: Examples docker images BoM scan on manual event
 on:
   workflow_dispatch:
     inputs:
diff --git a/.github/workflows/manual-docker-publish.yml b/.github/workflows/manual-docker-publish.yml
index 44315a6df4..19626edaa2 100644
--- a/.github/workflows/manual-docker-publish.yml
+++ b/.github/workflows/manual-docker-publish.yml
@@ -1,7 +1,7 @@
 # Copyright (C) 2024 Intel Corporation
 # SPDX-License-Identifier: Apache-2.0
 
-name: Examples CD workflow on manual event
+name: Examples publish docker image on manual event
 on:
   workflow_dispatch:
     inputs:

From 8323f153c2a80e80dcc04adfac27d47f6c0b003f Mon Sep 17 00:00:00 2001
From: Steve Zhang <huailong.zhang@intel.com>
Date: Fri, 16 Aug 2024 14:25:50 +0800
Subject: [PATCH 47/57] Add AudioQnA example via GMC (#597)

* add AudioQnA example via GMC.
Signed-off-by: zhlsunshine <huailong.zhang@intel.com>

* add more information for e2e test scritpts.
Signed-off-by: zhlsunshine <huailong.zhang@intel.com>

* fix bug in e2e test scripts.
Signed-off-by: zhlsunshine <huailong.zhang@intel.com>
Signed-off-by: dmsuehir <dina.s.jones@intel.com>
---
 AudioQnA/kubernetes/README.md           |  74 ++++++++++++++++
 AudioQnA/kubernetes/audioQnA_gaudi.yaml |  58 +++++++++++++
 AudioQnA/kubernetes/audioQnA_xeon.yaml  |  58 +++++++++++++
 AudioQnA/tests/test_gmc_on_gaudi.sh     | 111 ++++++++++++++++++++++++
 AudioQnA/tests/test_gmc_on_xeon.sh      | 111 ++++++++++++++++++++++++
 5 files changed, 412 insertions(+)
 create mode 100644 AudioQnA/kubernetes/README.md
 create mode 100644 AudioQnA/kubernetes/audioQnA_gaudi.yaml
 create mode 100644 AudioQnA/kubernetes/audioQnA_xeon.yaml
 create mode 100755 AudioQnA/tests/test_gmc_on_gaudi.sh
 create mode 100755 AudioQnA/tests/test_gmc_on_xeon.sh

diff --git a/AudioQnA/kubernetes/README.md b/AudioQnA/kubernetes/README.md
new file mode 100644
index 0000000000..569ea9a7ad
--- /dev/null
+++ b/AudioQnA/kubernetes/README.md
@@ -0,0 +1,74 @@
+# Deploy AudioQnA in Kubernetes Cluster on Xeon and Gaudi
+
+This document outlines the deployment process for a AudioQnA application utilizing the [GenAIComps](https://github.com/opea-project/GenAIComps.git) microservice pipeline components on Intel Xeon server and Gaudi machines.
+
+The AudioQnA Service leverages a Kubernetes operator called genai-microservices-connector(GMC). GMC supports connecting microservices to create pipelines based on the specification in the pipeline yaml file in addition to allowing the user to dynamically control which model is used in a service such as an LLM or embedder. The underlying pipeline language also supports using external services that may be running in public or private cloud elsewhere.
+
+Install GMC  in your Kubernetes cluster, if you have not already done so, by following the steps in Section "Getting Started" at [GMC Install](https://github.com/opea-project/GenAIInfra/tree/main/microservices-connector). Soon as we publish images to Docker Hub, at which point no builds will be required, simplifying install.
+
+
+The AudioQnA application is defined as a Custom Resource (CR) file that the above GMC operator acts  upon. It first checks if the microservices listed in the CR yaml file are running, if not starts them and then proceeds to connect them. When the AudioQnA pipeline is ready, the service endpoint details are returned, letting you use the application. Should you use "kubectl get pods" commands you will see all the component microservices, in particular `asr`, `tts`, and `llm`.
+
+
+## Using prebuilt images
+
+The AudioQnA uses the below prebuilt images if you choose a Xeon deployment
+
+- tgi-service: ghcr.io/huggingface/text-generation-inference:1.4
+- llm: opea/llm-tgi:latest
+- asr: opea/asr:latest
+- whisper: opea/whisper:latest
+- tts: opea/tts:latest
+- speecht5: opea/speecht5:latest
+
+
+Should you desire to use the Gaudi accelerator, two alternate images are used for the embedding and llm services.
+For Gaudi:
+
+- tgi-service: ghcr.io/huggingface/tgi-gaudi:1.2.1
+- whisper-gaudi: opea/whisper-gaudi:latest
+- speecht5-gaudi: opea/speecht5-gaudi:latest
+
+> [NOTE]  
+> Please refer to [Xeon README](https://github.com/opea-project/GenAIExamples/blob/main/AudioQnA/docker/xeon/README.md) or [Gaudi README](https://github.com/opea-project/GenAIExamples/blob/main/AudioQnA/docker/gaudi/README.md) to build the OPEA images. These too will be available on Docker Hub soon to simplify use.
+
+## Deploy AudioQnA pipeline
+This involves deploying the AudioQnA custom resource. You can use audioQnA_xeon.yaml or if you have a Gaudi cluster, you could use audioQnA_gaudi.yaml. 
+
+1. Create namespace and deploy application
+   ```sh
+   kubectl create ns audioqa
+   kubectl apply -f $(pwd)/audioQnA_xeon.yaml
+   ```
+
+2. GMC will reconcile the AudioQnA custom resource and get all related components/services ready. Check if the service up.
+
+   ```sh
+   kubectl get service -n audioqa
+   ```
+
+3. Retrieve the application access URL
+
+   ```sh
+   kubectl get gmconnectors.gmc.opea.io -n audioqa
+   NAME      URL                                                    READY   AGE
+   audioqa   http://router-service.audioqa.svc.cluster.local:8080   6/0/6   5m
+   ```
+
+4. Deploy a client pod to test the application
+
+   ```sh
+   kubectl create deployment client-test -n audioqa --image=python:3.8.13 -- sleep infinity
+   ```
+
+5. Access the application using the above URL from the client pod
+
+   ```sh
+   export CLIENT_POD=$(kubectl get pod -n audioqa -l app=client-test -o jsonpath={.items..metadata.name})
+   export accessUrl=$(kubectl get gmc -n audioqa -o jsonpath="{.items[?(@.metadata.name=='audioqa')].status.accessUrl}")
+   kubectl exec "$CLIENT_POD" -n audioqa -- curl $accessUrl  -X POST  -d '{"byte_str": "UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA", "parameters":{"max_new_tokens":64, "do_sample": true, "streaming":false}}' -H 'Content-Type: application/json'
+   ```
+
+> [NOTE]
+
+You can remove your AudioQnA pipeline by executing standard Kubernetes kubectl commands to remove a custom resource. Verify it was removed by executing kubectl get pods in the audioqa namespace.
diff --git a/AudioQnA/kubernetes/audioQnA_gaudi.yaml b/AudioQnA/kubernetes/audioQnA_gaudi.yaml
new file mode 100644
index 0000000000..0fb6d2f97f
--- /dev/null
+++ b/AudioQnA/kubernetes/audioQnA_gaudi.yaml
@@ -0,0 +1,58 @@
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
+
+apiVersion: gmc.opea.io/v1alpha3
+kind: GMConnector
+metadata:
+  labels:
+    app.kubernetes.io/name: gmconnector
+    app.kubernetes.io/managed-by: kustomize
+    gmc/platform: gaudi
+  name: audioqa
+  namespace: audioqa
+spec:
+  routerConfig:
+    name: router
+    serviceName: router-service
+  nodes:
+    root:
+      routerType: Sequence
+      steps:
+      - name: Asr
+        internalService:
+          serviceName: asr-svc
+          config:
+            endpoint: /v1/audio/transcriptions
+            ASR_ENDPOINT: whisper-gaudi-svc
+      - name: WhisperGaudi
+        internalService:
+          serviceName: whisper-gaudi-svc
+          config:
+            endpoint: /v1/asr
+          isDownstreamService: true
+      - name: Llm
+        data: $response
+        internalService:
+          serviceName: llm-svc
+          config:
+            endpoint: /v1/chat/completions
+            TGI_LLM_ENDPOINT: tgi-gaudi-svc
+      - name: TgiGaudi
+        internalService:
+          serviceName: tgi-gaudi-svc
+          config:
+            endpoint: /generate
+          isDownstreamService: true
+      - name: Tts
+        data: $response
+        internalService:
+          serviceName: tts-svc
+          config:
+            endpoint: /v1/audio/speech
+            TTS_ENDPOINT: speecht5-gaudi-svc
+      - name: SpeechT5Gaudi
+        internalService:
+          serviceName: speecht5-gaudi-svc
+          config:
+            endpoint: /v1/tts
+          isDownstreamService: true
diff --git a/AudioQnA/kubernetes/audioQnA_xeon.yaml b/AudioQnA/kubernetes/audioQnA_xeon.yaml
new file mode 100644
index 0000000000..881d719083
--- /dev/null
+++ b/AudioQnA/kubernetes/audioQnA_xeon.yaml
@@ -0,0 +1,58 @@
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
+
+apiVersion: gmc.opea.io/v1alpha3
+kind: GMConnector
+metadata:
+  labels:
+    app.kubernetes.io/name: gmconnector
+    app.kubernetes.io/managed-by: kustomize
+    gmc/platform: xeon
+  name: audioqa
+  namespace: audioqa
+spec:
+  routerConfig:
+    name: router
+    serviceName: router-service
+  nodes:
+    root:
+      routerType: Sequence
+      steps:
+      - name: Asr
+        internalService:
+          serviceName: asr-svc
+          config:
+            endpoint: /v1/audio/transcriptions
+            ASR_ENDPOINT: whisper-svc
+      - name: Whisper
+        internalService:
+          serviceName: whisper-svc
+          config:
+            endpoint: /v1/asr
+          isDownstreamService: true
+      - name: Llm
+        data: $response
+        internalService:
+          serviceName: llm-svc
+          config:
+            endpoint: /v1/chat/completions
+            TGI_LLM_ENDPOINT: tgi-svc
+      - name: Tgi
+        internalService:
+          serviceName: tgi-svc
+          config:
+            endpoint: /generate
+          isDownstreamService: true
+      - name: Tts
+        data: $response
+        internalService:
+          serviceName: tts-svc
+          config:
+            endpoint: /v1/audio/speech
+            TTS_ENDPOINT: speecht5-svc
+      - name: SpeechT5
+        internalService:
+          serviceName: speecht5-svc
+          config:
+            endpoint: /v1/tts
+          isDownstreamService: true
diff --git a/AudioQnA/tests/test_gmc_on_gaudi.sh b/AudioQnA/tests/test_gmc_on_gaudi.sh
new file mode 100755
index 0000000000..d9f790289a
--- /dev/null
+++ b/AudioQnA/tests/test_gmc_on_gaudi.sh
@@ -0,0 +1,111 @@
+#!/bin/bash
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
+
+set -xe
+USER_ID=$(whoami)
+LOG_PATH=/home/$(whoami)/logs
+MOUNT_DIR=/home/$USER_ID/.cache/huggingface/hub
+IMAGE_REPO=${IMAGE_REPO:-}
+
+function install_audioqa() {
+    kubectl create ns $APP_NAMESPACE
+    sed -i "s|namespace: audioqa|namespace: $APP_NAMESPACE|g"  ./audioQnA_gaudi.yaml
+    kubectl apply -f ./audioQnA_gaudi.yaml
+
+    # Wait until the router service is ready
+    echo "Waiting for the audioqa router service to be ready..."
+    wait_until_pod_ready "audioqa router" $APP_NAMESPACE "router-service"
+    output=$(kubectl get pods -n $APP_NAMESPACE)
+    echo $output
+}
+
+function validate_audioqa() {
+    # deploy client pod for testing
+    kubectl create deployment client-test -n $APP_NAMESPACE --image=python:3.8.13 -- sleep infinity
+
+    # wait for client pod ready
+    wait_until_pod_ready "client-test" $APP_NAMESPACE "client-test"
+    # giving time to populating data
+    sleep 60
+
+    kubectl get pods -n $APP_NAMESPACE
+    # send request to audioqa
+    export CLIENT_POD=$(kubectl get pod -n $APP_NAMESPACE -l app=client-test -o jsonpath={.items..metadata.name})
+    echo "$CLIENT_POD"
+    accessUrl=$(kubectl get gmc -n $APP_NAMESPACE -o jsonpath="{.items[?(@.metadata.name=='audioqa')].status.accessUrl}")
+    byte_str=$(kubectl exec "$CLIENT_POD" -n $APP_NAMESPACE -- curl $accessUrl -s -X POST  -d '{"byte_str": "UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA", "parameters":{"max_new_tokens":64, "do_sample": true, "streaming":false}}' -H 'Content-Type: application/json' | jq .byte_str)
+    echo "$byte_str" > $LOG_PATH/curl_audioqa.log
+    if [ -z "$byte_str" ]; then
+	echo "audioqa failed, please check the logs in ${LOG_PATH}!"
+        exit 1
+    fi
+    echo "Audioqa response check succeed!"
+}
+
+function wait_until_pod_ready() {
+    echo "Waiting for the $1 to be ready..."
+    max_retries=30
+    retry_count=0
+    while ! is_pod_ready $2 $3; do
+        if [ $retry_count -ge $max_retries ]; then
+            echo "$1 is not ready after waiting for a significant amount of time"
+            get_gmc_controller_logs
+            exit 1
+        fi
+        echo "$1 is not ready yet. Retrying in 10 seconds..."
+        sleep 10
+        output=$(kubectl get pods -n $2)
+        echo $output
+        retry_count=$((retry_count + 1))
+    done
+}
+
+function is_pod_ready() {
+    if [ "$2" == "gmc-controller" ]; then
+      pod_status=$(kubectl get pods -n $1 -o jsonpath='{.items[].status.conditions[?(@.type=="Ready")].status}')
+    else
+      pod_status=$(kubectl get pods -n $1 -l app=$2 -o jsonpath='{.items[].status.conditions[?(@.type=="Ready")].status}')
+    fi
+    if [ "$pod_status" == "True" ]; then
+        return 0
+    else
+        return 1
+    fi
+}
+
+function get_gmc_controller_logs() {
+    # Fetch the name of the pod with the app-name gmc-controller in the specified namespace
+    pod_name=$(kubectl get pods -n $SYSTEM_NAMESPACE -l control-plane=gmc-controller -o jsonpath='{.items[0].metadata.name}')
+
+    # Check if the pod name was found
+    if [ -z "$pod_name" ]; then
+        echo "No pod found with app-name gmc-controller in namespace $SYSTEM_NAMESPACE"
+        return 1
+    fi
+
+    # Get the logs of the found pod
+    echo "Fetching logs for pod $pod_name in namespace $SYSTEM_NAMESPACE..."
+    kubectl logs $pod_name -n $SYSTEM_NAMESPACE
+}
+
+if [ $# -eq 0 ]; then
+    echo "Usage: $0 <function_name>"
+    exit 1
+fi
+
+case "$1" in
+    install_AudioQnA)
+        pushd AudioQnA/kubernetes
+        install_audioqa
+        popd
+        ;;
+    validate_AudioQnA)
+        pushd AudioQnA/kubernetes
+        validate_audioqa
+        popd
+        ;;
+    *)
+        echo "Unknown function: $1"
+        ;;
+esac
diff --git a/AudioQnA/tests/test_gmc_on_xeon.sh b/AudioQnA/tests/test_gmc_on_xeon.sh
new file mode 100755
index 0000000000..5ef645075a
--- /dev/null
+++ b/AudioQnA/tests/test_gmc_on_xeon.sh
@@ -0,0 +1,111 @@
+#!/bin/bash
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
+
+set -xe
+USER_ID=$(whoami)
+LOG_PATH=/home/$(whoami)/logs
+MOUNT_DIR=/home/$USER_ID/.cache/huggingface/hub
+IMAGE_REPO=${IMAGE_REPO:-}
+
+function install_audioqa() {
+    kubectl create ns $APP_NAMESPACE
+    sed -i "s|namespace: audioqa|namespace: $APP_NAMESPACE|g"  ./audioQnA_xeon.yaml
+    kubectl apply -f ./audioQnA_xeon.yaml
+
+    # Wait until the router service is ready
+    echo "Waiting for the audioqa router service to be ready..."
+    wait_until_pod_ready "audioqa router" $APP_NAMESPACE "router-service"
+    output=$(kubectl get pods -n $APP_NAMESPACE)
+    echo $output
+}
+
+function validate_audioqa() {
+    # deploy client pod for testing
+    kubectl create deployment client-test -n $APP_NAMESPACE --image=python:3.8.13 -- sleep infinity
+
+    # wait for client pod ready
+    wait_until_pod_ready "client-test" $APP_NAMESPACE "client-test"
+    # giving time to populating data
+    sleep 60
+
+    kubectl get pods -n $APP_NAMESPACE
+    # send request to audioqa
+    export CLIENT_POD=$(kubectl get pod -n $APP_NAMESPACE -l app=client-test -o jsonpath={.items..metadata.name})
+    echo "$CLIENT_POD"
+    accessUrl=$(kubectl get gmc -n $APP_NAMESPACE -o jsonpath="{.items[?(@.metadata.name=='audioqa')].status.accessUrl}")
+    byte_str=$(kubectl exec "$CLIENT_POD" -n $APP_NAMESPACE -- curl $accessUrl -s -X POST  -d '{"byte_str": "UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA", "parameters":{"max_new_tokens":64, "do_sample": true, "streaming":false}}' -H 'Content-Type: application/json' | jq .byte_str)
+    echo "$byte_str" > $LOG_PATH/curl_audioqa.log
+    if [ -z "$byte_str" ]; then
+        echo "audioqa failed, please check the logs in ${LOG_PATH}!"
+        exit 1
+    fi
+    echo "Audioqa response check succeed!"
+}
+
+function wait_until_pod_ready() {
+    echo "Waiting for the $1 to be ready..."
+    max_retries=30
+    retry_count=0
+    while ! is_pod_ready $2 $3; do
+        if [ $retry_count -ge $max_retries ]; then
+            echo "$1 is not ready after waiting for a significant amount of time"
+            get_gmc_controller_logs
+            exit 1
+        fi
+        echo "$1 is not ready yet. Retrying in 10 seconds..."
+        sleep 10
+        output=$(kubectl get pods -n $2)
+        echo $output
+        retry_count=$((retry_count + 1))
+    done
+}
+
+function is_pod_ready() {
+    if [ "$2" == "gmc-controller" ]; then
+      pod_status=$(kubectl get pods -n $1 -o jsonpath='{.items[].status.conditions[?(@.type=="Ready")].status}')
+    else
+      pod_status=$(kubectl get pods -n $1 -l app=$2 -o jsonpath='{.items[].status.conditions[?(@.type=="Ready")].status}')
+    fi
+    if [ "$pod_status" == "True" ]; then
+        return 0
+    else
+        return 1
+    fi
+}
+
+function get_gmc_controller_logs() {
+    # Fetch the name of the pod with the app-name gmc-controller in the specified namespace
+    pod_name=$(kubectl get pods -n $SYSTEM_NAMESPACE -l control-plane=gmc-controller -o jsonpath='{.items[0].metadata.name}')
+
+    # Check if the pod name was found
+    if [ -z "$pod_name" ]; then
+        echo "No pod found with app-name gmc-controller in namespace $SYSTEM_NAMESPACE"
+        return 1
+    fi
+
+    # Get the logs of the found pod
+    echo "Fetching logs for pod $pod_name in namespace $SYSTEM_NAMESPACE..."
+    kubectl logs $pod_name -n $SYSTEM_NAMESPACE
+}
+
+if [ $# -eq 0 ]; then
+    echo "Usage: $0 <function_name>"
+    exit 1
+fi
+
+case "$1" in
+    install_AudioQnA)
+        pushd AudioQnA/kubernetes
+        install_audioqa
+        popd
+        ;;
+    validate_AudioQnA)
+        pushd AudioQnA/kubernetes
+        validate_audioqa
+        popd
+        ;;
+    *)
+        echo "Unknown function: $1"
+        ;;
+esac

From 90e1aba630f90bf9289928a2716e77e85809b980 Mon Sep 17 00:00:00 2001
From: "chen, suyue" <suyue.chen@intel.com>
Date: Fri, 16 Aug 2024 17:29:59 +0800
Subject: [PATCH 48/57] remove continue-on-error: true to stop the test when
 image build failed (#608)

Signed-off-by: chensuyue <suyue.chen@intel.com>
Signed-off-by: dmsuehir <dina.s.jones@intel.com>
---
 .github/workflows/_example-workflow.yml       | 5 ++---
 .github/workflows/manual-example-workflow.yml | 6 +++---
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/.github/workflows/_example-workflow.yml b/.github/workflows/_example-workflow.yml
index 64fb62f3c3..51aff5fcde 100644
--- a/.github/workflows/_example-workflow.yml
+++ b/.github/workflows/_example-workflow.yml
@@ -32,7 +32,7 @@ on:
         default: false
         required: false
         type: boolean
-      GenAIComps_branch:
+      opea_branch:
         default: "main"
         required: false
         type: string
@@ -46,7 +46,6 @@ jobs:
 ####################################################################################################
   build-images:
     runs-on: "docker-build-${{ inputs.node }}"
-    continue-on-error: true
     steps:
       - name: Clean Up Working Directory
         run: sudo rm -rf ${{github.workspace}}/*
@@ -65,7 +64,7 @@ jobs:
               git clone https://github.com/vllm-project/vllm.git
           fi
           git clone https://github.com/opea-project/GenAIComps.git
-          cd GenAIComps && git checkout ${{ inputs.GenAIComps_branch }} && cd ../
+          cd GenAIComps && git checkout ${{ inputs.opea_branch }} && cd ../
 
       - name: Build Image
         if: ${{ fromJSON(inputs.build) }}
diff --git a/.github/workflows/manual-example-workflow.yml b/.github/workflows/manual-example-workflow.yml
index 606d444d29..95230bf90f 100644
--- a/.github/workflows/manual-example-workflow.yml
+++ b/.github/workflows/manual-example-workflow.yml
@@ -40,9 +40,9 @@ on:
         description: 'Test examples with k8s'
         required: false
         type: boolean
-      GenAIComps_branch:
+      opea_branch:
         default: "main"
-        description: 'GenAIComps branch for image build'
+        description: 'OPEA branch for image build'
         required: false
         type: string
       GenAIComps_branch:
@@ -85,5 +85,5 @@ jobs:
       scan: ${{ fromJSON(inputs.scan) }}
       test_compose: ${{ fromJSON(inputs.test_compose) }}
       test_k8s: ${{ fromJSON(inputs.test_k8s) }}
-      GenAIComps_branch: ${{ inputs.GenAIComps_branch }}
+      opea_branch: ${{ inputs.opea_branch }}
     secrets: inherit

From 0cbcc34bbebe63fc60c45502f810e33f9c49258c Mon Sep 17 00:00:00 2001
From: Letong Han <106566639+letonghan@users.noreply.github.com>
Date: Fri, 16 Aug 2024 18:15:33 +0800
Subject: [PATCH 49/57] update port for dataprep in set_env.sh (#606)

Signed-off-by: letonghan <letong.han@intel.com>
Signed-off-by: dmsuehir <dina.s.jones@intel.com>
---
 ChatQnA/docker/gaudi/set_env.sh | 4 ++--
 ChatQnA/docker/xeon/set_env.sh  | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/ChatQnA/docker/gaudi/set_env.sh b/ChatQnA/docker/gaudi/set_env.sh
index e024bd8a64..3b3d433367 100644
--- a/ChatQnA/docker/gaudi/set_env.sh
+++ b/ChatQnA/docker/gaudi/set_env.sh
@@ -19,5 +19,5 @@ export RERANK_SERVICE_HOST_IP=${host_ip}
 export LLM_SERVICE_HOST_IP=${host_ip}
 export BACKEND_SERVICE_ENDPOINT="http://${host_ip}:8888/v1/chatqna"
 export DATAPREP_SERVICE_ENDPOINT="http://${host_ip}:6007/v1/dataprep"
-export DATAPREP_GET_FILE_ENDPOINT="http://${host_ip}:6008/v1/dataprep/get_file"
-export DATAPREP_DELETE_FILE_ENDPOINT="http://${host_ip}:6009/v1/dataprep/delete_file"
+export DATAPREP_GET_FILE_ENDPOINT="http://${host_ip}:6007/v1/dataprep/get_file"
+export DATAPREP_DELETE_FILE_ENDPOINT="http://${host_ip}:6007/v1/dataprep/delete_file"
diff --git a/ChatQnA/docker/xeon/set_env.sh b/ChatQnA/docker/xeon/set_env.sh
index 888b8f3070..be8f4130f2 100644
--- a/ChatQnA/docker/xeon/set_env.sh
+++ b/ChatQnA/docker/xeon/set_env.sh
@@ -19,5 +19,5 @@ export RERANK_SERVICE_HOST_IP=${host_ip}
 export LLM_SERVICE_HOST_IP=${host_ip}
 export BACKEND_SERVICE_ENDPOINT="http://${host_ip}:8888/v1/chatqna"
 export DATAPREP_SERVICE_ENDPOINT="http://${host_ip}:6007/v1/dataprep"
-export DATAPREP_GET_FILE_ENDPOINT="http://${host_ip}:6008/v1/dataprep/get_file"
-export DATAPREP_DELETE_FILE_ENDPOINT="http://${host_ip}:6009/v1/dataprep/delete_file"
+export DATAPREP_GET_FILE_ENDPOINT="http://${host_ip}:6007/v1/dataprep/get_file"
+export DATAPREP_DELETE_FILE_ENDPOINT="http://${host_ip}:6007/v1/dataprep/delete_file"

From 22370fbff3bec6e19b4141867253a4e2c7c94ba4 Mon Sep 17 00:00:00 2001
From: "Sun, Xuehao" <xuehao.sun@intel.com>
Date: Fri, 16 Aug 2024 20:18:44 +0800
Subject: [PATCH 50/57] Freeze base images (#607)

* Update Dockerfile to use LANGCHAIN_VERSION argument

Signed-off-by: Sun, Xuehao <xuehao.sun@intel.com>

* Revert "Update Dockerfile to use LANGCHAIN_VERSION argument"

This reverts commit 1bff239d388e06913bc82d1ee667cac5e17490ff.

* chore: Add manual freeze images workflow

Signed-off-by: Sun, Xuehao <xuehao.sun@intel.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* split jobs

Signed-off-by: Sun, Xuehao <xuehao.sun@intel.com>

---------

Signed-off-by: Sun, Xuehao <xuehao.sun@intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Signed-off-by: dmsuehir <dina.s.jones@intel.com>
---
 .github/workflows/manual-freeze-images.yml | 38 +++++++++++++++++++
 .github/workflows/manual-freeze-tag.yml    | 44 ++++++++++++++++++++++
 .github/workflows/scripts/freeze_images.sh | 41 ++++++++++++++++++++
 3 files changed, 123 insertions(+)
 create mode 100644 .github/workflows/manual-freeze-images.yml
 create mode 100644 .github/workflows/manual-freeze-tag.yml
 create mode 100644 .github/workflows/scripts/freeze_images.sh

diff --git a/.github/workflows/manual-freeze-images.yml b/.github/workflows/manual-freeze-images.yml
new file mode 100644
index 0000000000..3d792b1804
--- /dev/null
+++ b/.github/workflows/manual-freeze-images.yml
@@ -0,0 +1,38 @@
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
+
+name: Freeze-images
+
+on:
+  workflow_dispatch:
+
+jobs:
+  freeze-images:
+    runs-on: ubuntu-latest
+
+    steps:
+      - name: Checkout repository
+        uses: actions/checkout@v4
+        with:
+          fetch-depth: 0
+          ref: ${{ github.ref }}
+
+      - uses: actions/setup-python@v5
+        with:
+          python-version: "3.10"
+
+      - name: Set up Git
+        run: |
+          git config --global user.name "NeuralChatBot"
+          git config --global user.email "grp_neural_chat_bot@intel.com"
+          git remote set-url origin https://NeuralChatBot:"${{ secrets.ACTION_TOKEN }}"@github.com/opea-project/GenAIExamples.git
+
+      - name: Run script
+        run: |
+          bash .github/workflows/scripts/freeze_images.sh
+
+      - name: Commit changes
+        run: |
+          git add .
+          git commit -s -m "Freeze images tag"
+          git push
diff --git a/.github/workflows/manual-freeze-tag.yml b/.github/workflows/manual-freeze-tag.yml
new file mode 100644
index 0000000000..cf9507de8b
--- /dev/null
+++ b/.github/workflows/manual-freeze-tag.yml
@@ -0,0 +1,44 @@
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
+
+name: Freeze-tag
+
+on:
+  workflow_dispatch:
+    inputs:
+      tag:
+        default: "latest"
+        description: "Tag to apply to images"
+        required: true
+        type: string
+
+jobs:
+  freeze-tag:
+    runs-on: ubuntu-latest
+
+    steps:
+      - name: Checkout repository
+        uses: actions/checkout@v4
+        with:
+          fetch-depth: 0
+          ref: ${{ github.ref }}
+
+      - uses: actions/setup-python@v5
+        with:
+          python-version: "3.10"
+
+      - name: Set up Git
+        run: |
+          git config --global user.name "NeuralChatBot"
+          git config --global user.email "grp_neural_chat_bot@intel.com"
+          git remote set-url origin https://NeuralChatBot:"${{ secrets.ACTION_TOKEN }}"@github.com/opea-project/GenAIExamples.git
+
+      - name: Run script
+        run: |
+          find . -name "*.md" | xargs sed -i "s|^docker\ compose|TAG=${{ github.event.inputs.tag }}\ docker\ compose|g"
+
+      - name: Commit changes
+        run: |
+          git add .
+          git commit -s -m "Freeze images tag"
+          git push
diff --git a/.github/workflows/scripts/freeze_images.sh b/.github/workflows/scripts/freeze_images.sh
new file mode 100644
index 0000000000..fcc1425888
--- /dev/null
+++ b/.github/workflows/scripts/freeze_images.sh
@@ -0,0 +1,41 @@
+#!/bin/bash
+
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
+
+function get_latest_version() {
+    repo_image=$1
+    versions=$(curl -s "https://registry.hub.docker.com/v2/repositories/$repo_image/tags/" | jq '."results"[]["name"]' | tr -d '"')
+    echo "version list: $versions"
+    latest_version=$(printf "%s\n" "${versions[@]}" | grep -v "latest" | sort -V | tail -n 1)
+    echo "latest version: $latest_version"
+    replace_image_version $repo_image $latest_version
+}
+
+function replace_image_version() {
+    repo_image=$1
+    version=$2
+    find . -name "Dockerfile" | xargs sed -i "s|$repo_image:latest|$repo_image:$version|g"
+}
+
+function check_branch_name() {
+    if [[ "$GITHUB_REF_NAME" == "main" ]]; then
+        echo "$GITHUB_REF_NAME is protected branch"
+        exit 0
+    else
+        echo "branch name is $GITHUB_REF_NAME"
+    fi
+}
+
+function main() {
+    check_branch_name
+    repo_image_list="langchain/langchain"
+    for repo_image in $repo_image_list; do
+        echo "::group::check $repo_image"
+        get_latest_version $repo_image
+        echo "::endgroup::"
+    done
+    freeze_tag_in_markdown
+}
+
+main

From c5223267d5b159f4db552f8579a046bd9e5a6e54 Mon Sep 17 00:00:00 2001
From: Ying Chun Guo <yingchun.guo@intel.com>
Date: Fri, 16 Aug 2024 20:55:01 +0800
Subject: [PATCH 51/57] Add gmc build, scan and deploy workflow (#611)

Signed-off-by: Yingchun Guo <yingchun.guo@intel.com>
Signed-off-by: dmsuehir <dina.s.jones@intel.com>
---
 .github/workflows/_gmc-workflow.yml           | 147 ++++++++++++++++++
 .github/workflows/manual-example-workflow.yml |  17 ++
 2 files changed, 164 insertions(+)
 create mode 100644 .github/workflows/_gmc-workflow.yml

diff --git a/.github/workflows/_gmc-workflow.yml b/.github/workflows/_gmc-workflow.yml
new file mode 100644
index 0000000000..a275b980c2
--- /dev/null
+++ b/.github/workflows/_gmc-workflow.yml
@@ -0,0 +1,147 @@
+# Copyright (C) 2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
+
+name: Build and deploy GMC system on call and manual
+
+on:
+  workflow_dispatch:
+    inputs:
+      tag:
+        default: "latest"
+        required: true
+        type: string
+        description: "Tag to apply to images"
+      node:
+        default: "xeon"
+        required: true
+        type: string
+        description: "Hardware to run test"
+      deploy:
+        default: true
+        required: true
+        type: boolean
+        description: 'Whether to deploy gmc'
+  workflow_call:
+    inputs:
+      tag:
+        default: "latest"
+        required: true
+        type: string
+        description: "Tag to apply to images"
+      node:
+        default: "xeon"
+        required: true
+        type: string
+        description: "Hardware to run test"
+      deploy:
+        default: true
+        required: true
+        type: boolean
+        description: 'Whether to deploy gmc'
+
+jobs:
+####################################################################################################
+# Image Build and Scan
+####################################################################################################
+  image-build:
+    runs-on: "docker-build-${{ inputs.node }}"
+    steps:
+      - name: Checkout GenAIInfra repository
+        uses: actions/checkout@v4
+        with:
+          repository: opea-project/GenAIInfra
+          ref: ${{ inputs.tag }}
+          path: GenAIInfra
+
+      - name: Set variables
+        id: set_variables
+        run: |
+          echo "DOCKER_REGISTRY=${OPEA_IMAGE_REPO}opea" >> $GITHUB_ENV
+          echo "IMAGE_REPO=${OPEA_IMAGE_REPO}" >> $GITHUB_OUTPUT
+          echo "VERSION=${{ inputs.tag }}" >> $GITHUB_ENV
+          echo "VERSION=${{ inputs.tag }}" >> $GITHUB_OUTPUT
+
+      - name: Build image and push
+        run: |
+          cd ${{github.workspace}}/GenAIInfra/microservices-connector
+          make docker.build
+          make docker.push
+
+      - name: Scan gmcmanager
+        if: ${{ inputs.node == 'gaudi' }}
+        uses: opea-project/validation/actions/trivy-scan@main
+        with:
+          image-ref: ${{ env.DOCKER_REGISTRY }}/gmcmanager:${{ env.VERSION }}
+          output: gmcmanager-scan.txt
+
+      - name: Upload gmcmanager scan result
+        if: ${{ inputs.node == 'gaudi' }}
+        uses: actions/upload-artifact@v4.3.4
+        with:
+          name: gmcmanager-scan
+          path: gmcmanager-scan.txt
+          overwrite: true
+
+      - name: Scan gmcrouter
+        if: ${{ inputs.node == 'gaudi' }}
+        uses: opea-project/validation/actions/trivy-scan@main
+        with:
+          image-ref: ${{ env.DOCKER_REGISTRY }}/gmcrouter:${{ env.VERSION }}
+          output: gmcrouter-scan.txt
+
+      - name: Upload gmcrouter scan result
+        if: ${{ inputs.node == 'gaudi' }}
+        uses: actions/upload-artifact@v4.3.4
+        with:
+          name: gmcrouter-scan
+          path: gmcrouter-scan.txt
+          overwrite: true
+
+      - name: Clean up images
+        if: always()
+        run: |
+          docker rmi ${{ env.DOCKER_REGISTRY }}/gmcrouter:${{ env.VERSION }}
+          docker rmi ${{ env.DOCKER_REGISTRY }}/gmcmanager:${{ env.VERSION }}
+
+      - name: Clean up GenAIInfra source codes
+        if: always()
+        run: |
+           rm -rf ${{github.workspace}}/GenAIInfra
+
+####################################################################################################
+# GMC Install
+####################################################################################################
+  gmc-install:
+    needs: image-build
+    if: ${{ fromJSON(inputs.deploy) }}
+    runs-on: "k8s-${{ inputs.node }}"
+    steps:
+      - name: Checkout GenAIInfra repository
+        uses: actions/checkout@v4
+        with:
+          repository: opea-project/GenAIInfra
+          ref: ${{ inputs.tag }}
+          path: GenAIInfra
+
+      - name: Set variables
+        run: |
+          echo "SYSTEM_NAMESPACE=opea-system" >> $GITHUB_ENV
+          echo "VERSION=${{ inputs.tag }}" >> $GITHUB_ENV
+          echo "SET_VERSION=true" >> $GITHUB_ENV # to change the tag of microservice images
+
+      - name: Cleanup existing GMC
+        run: |
+          cd GenAIInfra
+          .github/workflows/scripts/e2e/gmc_install.sh cleanup_gmc
+          cd ..
+
+      - name: Install GMC
+        run: |
+          cd GenAIInfra
+          .github/workflows/scripts/e2e/gmc_install.sh install_gmc
+          cd ..
+
+      - name: Clean up GenAIInfra source codes
+        if: always()
+        run: |
+           rm -rf ${{github.workspace}}/GenAIInfra
diff --git a/.github/workflows/manual-example-workflow.yml b/.github/workflows/manual-example-workflow.yml
index 95230bf90f..63240f0362 100644
--- a/.github/workflows/manual-example-workflow.yml
+++ b/.github/workflows/manual-example-workflow.yml
@@ -20,6 +20,11 @@ on:
         description: "Tag to apply to images"
         required: true
         type: string
+      deploy_gmc:
+        default: false
+        description: 'Whether to deploy gmc'
+        required: true
+        type: boolean
       build:
         default: true
         description: 'Build test required images for Examples'
@@ -69,6 +74,18 @@ jobs:
         nodes_json=$(printf '%s\n' "${nodes[@]}" | sort -u | jq -R '.' | jq -sc '.')
         echo "nodes=$nodes_json" >> $GITHUB_OUTPUT
 
+  build-deploy-gmc:
+    strategy:
+      matrix:
+        node: ${{ fromJson(needs.get-test-matrix.outputs.nodes) }}
+      fail-fast: false
+    uses: ./.github/workflows/_gmc-workflow.yml
+    with:
+      node: ${{ matrix.node }}
+      tag: ${{ inputs.tag }}
+      deploy: ${{ fromJSON(inputs.deploy_gmc) }}
+    secrets: inherit
+
   run-examples:
     needs: [get-test-matrix]
     strategy:

From 31c9fe64895cb17f239939a0cca31d28cb8eefe9 Mon Sep 17 00:00:00 2001
From: Ying Chun Guo <yingchun.guo@intel.com>
Date: Fri, 16 Aug 2024 21:57:28 +0800
Subject: [PATCH 52/57] change microservice tags in CD workflow (#612)

Signed-off-by: Yingchun Guo <yingchun.guo@intel.com>
Signed-off-by: dmsuehir <dina.s.jones@intel.com>
---
 .github/workflows/_example-workflow.yml   | 1 +
 .github/workflows/_manifest-e2e.yml       | 6 ++++++
 ChatQnA/tests/test_manifest_on_gaudi.sh   | 9 +++++++--
 ChatQnA/tests/test_manifest_on_xeon.sh    | 9 +++++++--
 CodeGen/tests/test_manifest_on_gaudi.sh   | 9 +++++++--
 CodeGen/tests/test_manifest_on_xeon.sh    | 9 +++++++--
 CodeTrans/tests/test_manifest_on_gaudi.sh | 9 +++++++--
 CodeTrans/tests/test_manifest_on_xeon.sh  | 9 +++++++--
 DocSum/tests/test_manifest_on_gaudi.sh    | 9 +++++++--
 DocSum/tests/test_manifest_on_xeon.sh     | 9 +++++++--
 10 files changed, 63 insertions(+), 16 deletions(-)

diff --git a/.github/workflows/_example-workflow.yml b/.github/workflows/_example-workflow.yml
index 51aff5fcde..827f668e3c 100644
--- a/.github/workflows/_example-workflow.yml
+++ b/.github/workflows/_example-workflow.yml
@@ -150,4 +150,5 @@ jobs:
       example: ${{ inputs.example }}
       hardware: ${{ inputs.node }}
       tag: ${{ inputs.tag }}
+      context: "CD"
     secrets: inherit
diff --git a/.github/workflows/_manifest-e2e.yml b/.github/workflows/_manifest-e2e.yml
index d8127ae5aa..5ada482e09 100644
--- a/.github/workflows/_manifest-e2e.yml
+++ b/.github/workflows/_manifest-e2e.yml
@@ -20,6 +20,11 @@ on:
         description: "Tag to apply to images, default is latest"
         required: false
         type: string
+      context:
+        default: "CI"
+        description: "CI or CD"
+        required: false
+        type: string
 
 jobs:
   manifest-test:
@@ -55,6 +60,7 @@ jobs:
           echo "continue_test=true" >> $GITHUB_ENV
           echo "should_cleanup=false" >> $GITHUB_ENV
           echo "skip_validate=true" >> $GITHUB_ENV
+          echo "CONTEXT=${{ inputs.context }}" >> $GITHUB_ENV
           echo "NAMESPACE=$NAMESPACE"
 
       - name: Kubectl install
diff --git a/ChatQnA/tests/test_manifest_on_gaudi.sh b/ChatQnA/tests/test_manifest_on_gaudi.sh
index 12a5a6febe..ca7c55794f 100755
--- a/ChatQnA/tests/test_manifest_on_gaudi.sh
+++ b/ChatQnA/tests/test_manifest_on_gaudi.sh
@@ -12,8 +12,13 @@ IMAGE_TAG=${IMAGE_TAG:-latest}
 function init_chatqna() {
     # replace the mount dir "path: /mnt/opea-models" with "path: $CHART_MOUNT"
     find . -name '*.yaml' -type f -exec sed -i "s#path: /mnt/opea-models#path: $MOUNT_DIR#g" {} \;
-    # replace megaservice image tag
-    find . -name '*.yaml' -type f -exec sed -i "s#image: opea/chatqna:latest#image: opea/chatqna:${IMAGE_TAG}#g" {} \;
+    if [ $CONTEXT == "CI" ]; then
+        # replace megaservice image tag
+        find . -name '*.yaml' -type f -exec sed -i "s#image: \"opea/chatqna:latest#image: \"opea/chatqna:${IMAGE_TAG}#g" {} \;
+    else
+        # replace microservice image tag
+        find . -name '*.yaml' -type f -exec sed -i "s#image: \"opea/\(.*\):latest#image: \"opea/\1:${IMAGE_TAG}#g" {} \;
+    fi
     # replace the repository "image: opea/*" with "image: $IMAGE_REPO/opea/"
     find . -name '*.yaml' -type f -exec sed -i "s#image: \"opea/*#image: \"${IMAGE_REPO}opea/#g" {} \;
     # set huggingface token
diff --git a/ChatQnA/tests/test_manifest_on_xeon.sh b/ChatQnA/tests/test_manifest_on_xeon.sh
index b33337b8ad..c755f36e6a 100755
--- a/ChatQnA/tests/test_manifest_on_xeon.sh
+++ b/ChatQnA/tests/test_manifest_on_xeon.sh
@@ -12,8 +12,13 @@ IMAGE_TAG=${IMAGE_TAG:-latest}
 function init_chatqna() {
     # replace the mount dir "path: /mnt/opea-models" with "path: $CHART_MOUNT"
     find . -name '*.yaml' -type f -exec sed -i "s#path: /mnt/opea-models#path: $MOUNT_DIR#g" {} \;
-    # replace megaservice image tag
-    find . -name '*.yaml' -type f -exec sed -i "s#image: opea/chatqna:latest#image: opea/chatqna:${IMAGE_TAG}#g" {} \;
+    if [ $CONTEXT == "CI" ]; then
+        # replace megaservice image tag
+        find . -name '*.yaml' -type f -exec sed -i "s#image: \"opea/chatqna:latest#image: \"opea/chatqna:${IMAGE_TAG}#g" {} \;
+    else
+        # replace microservice image tag
+        find . -name '*.yaml' -type f -exec sed -i "s#image: \"opea/\(.*\):latest#image: \"opea/\1:${IMAGE_TAG}#g" {} \;
+    fi
     # replace the repository "image: opea/*" with "image: $IMAGE_REPO/opea/"
     find . -name '*.yaml' -type f -exec sed -i "s#image: \"opea/*#image: \"${IMAGE_REPO}opea/#g" {} \;
     # set huggingface token
diff --git a/CodeGen/tests/test_manifest_on_gaudi.sh b/CodeGen/tests/test_manifest_on_gaudi.sh
index 84fe53e4e3..c251768b7e 100755
--- a/CodeGen/tests/test_manifest_on_gaudi.sh
+++ b/CodeGen/tests/test_manifest_on_gaudi.sh
@@ -13,8 +13,13 @@ function init_codegen() {
     # executed under path manifest/codegen/xeon
     # replace the mount dir "path: /mnt/model" with "path: $CHART_MOUNT"
     find . -name '*.yaml' -type f -exec sed -i "s#path: /mnt/opea-models#path: $MOUNT_DIR#g" {} \;
-    # replace megaservice image tag
-    find . -name '*.yaml' -type f -exec sed -i "s#image: opea/codegen:latest#image: opea/codegen:${IMAGE_TAG}#g" {} \;
+    if [ $CONTEXT == "CI" ]; then
+        # replace megaservice image tag
+        find . -name '*.yaml' -type f -exec sed -i "s#image: \"opea/codegen:latest#image: \"opea/codegen:${IMAGE_TAG}#g" {} \;
+    else
+        # replace microservice image tag
+        find . -name '*.yaml' -type f -exec sed -i "s#image: \"opea/\(.*\):latest#image: \"opea/\1:${IMAGE_TAG}#g" {} \;
+    fi
     # replace the repository "image: opea/*" with "image: $IMAGE_REPO/opea/"
     find . -name '*.yaml' -type f -exec sed -i "s#image: \"opea/*#image: \"${IMAGE_REPO}opea/#g" {} \;
     # set huggingface token
diff --git a/CodeGen/tests/test_manifest_on_xeon.sh b/CodeGen/tests/test_manifest_on_xeon.sh
index 46724742d9..597b7e0368 100755
--- a/CodeGen/tests/test_manifest_on_xeon.sh
+++ b/CodeGen/tests/test_manifest_on_xeon.sh
@@ -13,8 +13,13 @@ function init_codegen() {
     # executed under path manifest/codegen/xeon
     # replace the mount dir "path: /mnt/model" with "path: $CHART_MOUNT"
     find . -name '*.yaml' -type f -exec sed -i "s#path: /mnt/opea-models#path: $MOUNT_DIR#g" {} \;
-    # replace megaservice image tag
-    find . -name '*.yaml' -type f -exec sed -i "s#image: opea/codegen:latest#image: opea/codegen:${IMAGE_TAG}#g" {} \;
+    if [ $CONTEXT == "CI" ]; then
+        # replace megaservice image tag
+        find . -name '*.yaml' -type f -exec sed -i "s#image: \"opea/codegen:latest#image: \"opea/codegen:${IMAGE_TAG}#g" {} \;
+    else
+        # replace microservice image tag
+        find . -name '*.yaml' -type f -exec sed -i "s#image: \"opea/\(.*\):latest#image: \"opea/\1:${IMAGE_TAG}#g" {} \;
+    fi
     # replace the repository "image: opea/*" with "image: $IMAGE_REPO/opea/"
     find . -name '*.yaml' -type f -exec sed -i "s#image: \"opea/*#image: \"${IMAGE_REPO}opea/#g" {} \;
     # set huggingface token
diff --git a/CodeTrans/tests/test_manifest_on_gaudi.sh b/CodeTrans/tests/test_manifest_on_gaudi.sh
index 2a9f9846b5..e4bbafe770 100755
--- a/CodeTrans/tests/test_manifest_on_gaudi.sh
+++ b/CodeTrans/tests/test_manifest_on_gaudi.sh
@@ -13,8 +13,13 @@ function init_codetrans() {
     # executed under path manifest/codetrans/xeon
     # replace the mount dir "path: /mnt/model" with "path: $CHART_MOUNT"
     find . -name '*.yaml' -type f -exec sed -i "s#path: /mnt/opea-models#path: $MOUNT_DIR#g" {} \;
-    # replace megaservice image tag
-    find . -name '*.yaml' -type f -exec sed -i "s#image: opea/codetrans:latest#image: opea/codetrans:${IMAGE_TAG}#g" {} \;
+    if [ $CONTEXT == "CI" ]; then
+        # replace megaservice image tag
+        find . -name '*.yaml' -type f -exec sed -i "s#image: \"opea/codetrans:latest#image: \"opea/codetrans:${IMAGE_TAG}#g" {} \;
+    else
+        # replace microservice image tag
+        find . -name '*.yaml' -type f -exec sed -i "s#image: \"opea/\(.*\):latest#image: \"opea/\1:${IMAGE_TAG}#g" {} \;
+    fi
     # replace the repository "image: opea/*" with "image: $IMAGE_REPO/opea/"
     find . -name '*.yaml' -type f -exec sed -i "s#image: \"opea/*#image: \"${IMAGE_REPO}opea/#g" {} \;
     # set huggingface token
diff --git a/CodeTrans/tests/test_manifest_on_xeon.sh b/CodeTrans/tests/test_manifest_on_xeon.sh
index a9f40984e0..d21d3bd6a8 100755
--- a/CodeTrans/tests/test_manifest_on_xeon.sh
+++ b/CodeTrans/tests/test_manifest_on_xeon.sh
@@ -13,8 +13,13 @@ function init_codetrans() {
     # executed under path manifest/codetrans/xeon
     # replace the mount dir "path: /mnt/model" with "path: $CHART_MOUNT"
     find . -name '*.yaml' -type f -exec sed -i "s#path: /mnt/opea-models#path: $MOUNT_DIR#g" {} \;
-    # replace megaservice image tag
-    find . -name '*.yaml' -type f -exec sed -i "s#image: opea/codetrans:latest#image: opea/codetrans:${IMAGE_TAG}#g" {} \;
+    if [ $CONTEXT == "CI" ]; then
+        # replace megaservice image tag
+        find . -name '*.yaml' -type f -exec sed -i "s#image: \"opea/codetrans:latest#image: \"opea/codetrans:${IMAGE_TAG}#g" {} \;
+    else
+        # replace microservice image tag
+        find . -name '*.yaml' -type f -exec sed -i "s#image: \"opea/\(.*\):latest#image: \"opea/\1:${IMAGE_TAG}#g" {} \;
+    fi
     # replace the repository "image: opea/*" with "image: $IMAGE_REPO/opea/"
     find . -name '*.yaml' -type f -exec sed -i "s#image: \"opea/*#image: \"${IMAGE_REPO}opea/#g" {} \;
     # set huggingface token
diff --git a/DocSum/tests/test_manifest_on_gaudi.sh b/DocSum/tests/test_manifest_on_gaudi.sh
index 5a8a9c8f2a..f58aa2c0db 100755
--- a/DocSum/tests/test_manifest_on_gaudi.sh
+++ b/DocSum/tests/test_manifest_on_gaudi.sh
@@ -13,8 +13,13 @@ function init_docsum() {
     # executed under path manifest/docsum/xeon
     # replace the mount dir "path: /mnt/model" with "path: $CHART_MOUNT"
     find . -name '*.yaml' -type f -exec sed -i "s#path: /mnt/opea-models#path: $MOUNT_DIR#g" {} \;
-    # replace megaservice image tag
-    find . -name '*.yaml' -type f -exec sed -i "s#image: opea/docsum:latest#image: opea/docsum:${IMAGE_TAG}#g" {} \;
+    if [ $CONTEXT == "CI" ]; then
+        # replace megaservice image tag
+        find . -name '*.yaml' -type f -exec sed -i "s#image: \"opea/docsum:latest#image: \"opea/docsum:${IMAGE_TAG}#g" {} \;
+    else
+        # replace microservice image tag
+        find . -name '*.yaml' -type f -exec sed -i "s#image: \"opea/\(.*\):latest#image: \"opea/\1:${IMAGE_TAG}#g" {} \;
+    fi
     # replace the repository "image: opea/*" with "image: $IMAGE_REPO/opea/"
     find . -name '*.yaml' -type f -exec sed -i "s#image: \"opea/*#image: \"${IMAGE_REPO}opea/#g" {} \;
     # set huggingface token
diff --git a/DocSum/tests/test_manifest_on_xeon.sh b/DocSum/tests/test_manifest_on_xeon.sh
index 4a52661eaf..f9a01d5ddd 100755
--- a/DocSum/tests/test_manifest_on_xeon.sh
+++ b/DocSum/tests/test_manifest_on_xeon.sh
@@ -13,8 +13,13 @@ function init_docsum() {
     # executed under path manifest/docsum/xeon
     # replace the mount dir "path: /mnt/model" with "path: $CHART_MOUNT"
     find . -name '*.yaml' -type f -exec sed -i "s#path: /mnt/opea-models#path: $MOUNT_DIR#g" {} \;
-    # replace megaservice image tag
-    find . -name '*.yaml' -type f -exec sed -i "s#image: opea/docsum:latest#image: opea/docsum:${IMAGE_TAG}#g" {} \;
+    if [ $CONTEXT == "CI" ]; then
+        # replace megaservice image tag
+        find . -name '*.yaml' -type f -exec sed -i "s#image: \"opea/docsum:latest#image: \"opea/docsum:${IMAGE_TAG}#g" {} \;
+    else
+        # replace microservice image tag
+        find . -name '*.yaml' -type f -exec sed -i "s#image: \"opea/\(.*\):latest#image: \"opea/\1:${IMAGE_TAG}#g" {} \;
+    fi
     # replace the repository "image: opea/*" with "image: $IMAGE_REPO/opea/"
     find . -name '*.yaml' -type f -exec sed -i "s#image: \"opea/*#image: \"${IMAGE_REPO}opea/#g" {} \;
     # set huggingface token

From c432f72744f043920a78eb5fe7c9149b18e61adf Mon Sep 17 00:00:00 2001
From: dmsuehir <dina.s.jones@intel.com>
Date: Wed, 14 Aug 2024 13:55:25 -0700
Subject: [PATCH 53/57] Fix the CodeGen Kubernetes ConfigMap 'nil' proxy var
 error

Signed-off-by: dmsuehir <dina.s.jones@intel.com>
---
 CodeGen/kubernetes/manifests/README.md | 1 +
 1 file changed, 1 insertion(+)

diff --git a/CodeGen/kubernetes/manifests/README.md b/CodeGen/kubernetes/manifests/README.md
index 4e0a0e0b69..dbda67429b 100644
--- a/CodeGen/kubernetes/manifests/README.md
+++ b/CodeGen/kubernetes/manifests/README.md
@@ -44,3 +44,4 @@ curl http://localhost:7778/v1/codegen -H "Content-Type: application/json" -d '{
      "messages": "Implement a high-level API for a TODO list application. The API takes as input an operation request and updates the TODO list in place. If the request is invalid, raise an exception."
      }'
 ```
+

From e4cf14aab170cc68b796dc3c05f840374cfc0b17 Mon Sep 17 00:00:00 2001
From: dmsuehir <dina.s.jones@intel.com>
Date: Wed, 14 Aug 2024 14:52:30 -0700
Subject: [PATCH 54/57] Removing blank line

Signed-off-by: dmsuehir <dina.s.jones@intel.com>
---
 CodeGen/kubernetes/manifests/README.md | 1 -
 1 file changed, 1 deletion(-)

diff --git a/CodeGen/kubernetes/manifests/README.md b/CodeGen/kubernetes/manifests/README.md
index dbda67429b..4e0a0e0b69 100644
--- a/CodeGen/kubernetes/manifests/README.md
+++ b/CodeGen/kubernetes/manifests/README.md
@@ -44,4 +44,3 @@ curl http://localhost:7778/v1/codegen -H "Content-Type: application/json" -d '{
      "messages": "Implement a high-level API for a TODO list application. The API takes as input an operation request and updates the TODO list in place. If the request is invalid, raise an exception."
      }'
 ```
-

From e2c899df8801ad7306be97a08827ec84c8706a0e Mon Sep 17 00:00:00 2001
From: "chen, suyue" <suyue.chen@intel.com>
Date: Thu, 15 Aug 2024 22:39:21 +0800
Subject: [PATCH 55/57] Enhance CI/CD infrastructure (#593)

Signed-off-by: chensuyue <suyue.chen@intel.com>
Signed-off-by: Sun, Xuehao <xuehao.sun@intel.com>
Signed-off-by: dmsuehir <dina.s.jones@intel.com>
---
 .github/workflows/_example-workflow.yml       | 4 ----
 .github/workflows/manual-example-workflow.yml | 5 -----
 .github/workflows/pr-docker-compose-e2e.yml   | 2 +-
 3 files changed, 1 insertion(+), 10 deletions(-)

diff --git a/.github/workflows/_example-workflow.yml b/.github/workflows/_example-workflow.yml
index 827f668e3c..f28426805a 100644
--- a/.github/workflows/_example-workflow.yml
+++ b/.github/workflows/_example-workflow.yml
@@ -36,10 +36,6 @@ on:
         default: "main"
         required: false
         type: string
-      GenAIComps_branch:
-        default: "main"
-        required: false
-        type: string
 jobs:
 ####################################################################################################
 # Image Build
diff --git a/.github/workflows/manual-example-workflow.yml b/.github/workflows/manual-example-workflow.yml
index 63240f0362..99e63fd3a3 100644
--- a/.github/workflows/manual-example-workflow.yml
+++ b/.github/workflows/manual-example-workflow.yml
@@ -50,11 +50,6 @@ on:
         description: 'OPEA branch for image build'
         required: false
         type: string
-      GenAIComps_branch:
-        default: "main"
-        description: 'GenAIComps branch for image build'
-        required: false
-        type: string
 
 permissions: read-all
 jobs:
diff --git a/.github/workflows/pr-docker-compose-e2e.yml b/.github/workflows/pr-docker-compose-e2e.yml
index 66d9417e9c..e02c60fb83 100644
--- a/.github/workflows/pr-docker-compose-e2e.yml
+++ b/.github/workflows/pr-docker-compose-e2e.yml
@@ -4,7 +4,7 @@
 name: E2E test with docker compose
 
 on:
-  pull_request_target:
+  pull_request:
     branches: [main]
     types: [opened, reopened, ready_for_review, synchronize] # added `ready_for_review` since draft is skipped
     paths:

From b4bdacef03c022cb41e0d5f003372ddb64a8a339 Mon Sep 17 00:00:00 2001
From: "chen, suyue" <suyue.chen@intel.com>
Date: Fri, 16 Aug 2024 00:31:01 +0800
Subject: [PATCH 56/57] set action back to pull_request_target (#602)

Signed-off-by: chensuyue <suyue.chen@intel.com>
Signed-off-by: dmsuehir <dina.s.jones@intel.com>
---
 .github/workflows/pr-docker-compose-e2e.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/pr-docker-compose-e2e.yml b/.github/workflows/pr-docker-compose-e2e.yml
index e02c60fb83..66d9417e9c 100644
--- a/.github/workflows/pr-docker-compose-e2e.yml
+++ b/.github/workflows/pr-docker-compose-e2e.yml
@@ -4,7 +4,7 @@
 name: E2E test with docker compose
 
 on:
-  pull_request:
+  pull_request_target:
     branches: [main]
     types: [opened, reopened, ready_for_review, synchronize] # added `ready_for_review` since draft is skipped
     paths:

From 171c4730ee7bfc0b16b0ed486b4b429ac7a01c66 Mon Sep 17 00:00:00 2001
From: dmsuehir <dina.s.jones@intel.com>
Date: Fri, 16 Aug 2024 09:47:28 -0700
Subject: [PATCH 57/57] Resolve conflict

Signed-off-by: dmsuehir <dina.s.jones@intel.com>
---
 .github/workflows/_example-workflow.yml | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/.github/workflows/_example-workflow.yml b/.github/workflows/_example-workflow.yml
index 827f668e3c..f28426805a 100644
--- a/.github/workflows/_example-workflow.yml
+++ b/.github/workflows/_example-workflow.yml
@@ -36,10 +36,6 @@ on:
         default: "main"
         required: false
         type: string
-      GenAIComps_branch:
-        default: "main"
-        required: false
-        type: string
 jobs:
 ####################################################################################################
 # Image Build
