Add openGauss support to dataprep microservice and update related doc… #2511
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Copyright (C) 2024 Intel Corporation | |
| # SPDX-License-Identifier: Apache-2.0 | |
| name: Example-test | |
| permissions: read-all | |
| on: | |
| pull_request_target: | |
| branches: ["main", "**uv"] | |
| types: [opened, reopened, ready_for_review, synchronize] # added `ready_for_review` since draft is skipped | |
| paths: | |
| - .github/workflows/pr-examples-test.yml | |
| - comps/cores/** | |
| - comps/dataprep/src/** | |
| - comps/retrievers/src/** | |
| - comps/third_parties/nginx/src/** | |
| - requirements.txt | |
| - "!**.md" | |
| # If there is a new commit, the previous jobs will be canceled | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| example-test: | |
| runs-on: gaudi | |
| steps: | |
| - name: Clean Up Working Directory | |
| run: | | |
| sudo rm -rf ${{github.workspace}}/* || true | |
| # clean up containers use ports | |
| cid=$(docker ps --format '{{.Names}} : {{.Ports}}' | grep -v ' : $' | grep -v 5000 | awk -F' : ' '{print $1}') | |
| if [[ ! -z "$cid" ]]; then docker stop $cid && docker rm $cid && sleep 1s; fi | |
| docker rmi $(docker images --filter reference="*/*:comps" -q) || true | |
| docker system prune -f | |
| docker ps | |
| - name: Checkout out Repo | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: "refs/pull/${{ github.event.number }}/merge" | |
| - name: Run ChatQnA | |
| env: | |
| HF_TOKEN: ${{ secrets.HF_TOKEN }} | |
| run: | | |
| cd ../ && sudo rm -rf GenAIExamples | |
| git clone https://github.com/opea-project/GenAIExamples.git | |
| cd GenAIExamples/ChatQnA/docker_image_build | |
| cp -r ${{ github.workspace }}/../GenAIComps . | |
| cd ../tests | |
| sed -i '/GenAIComps.git/d' test_compose_on_gaudi.sh | |
| cat test_compose_on_gaudi.sh | |
| echo "Run test..." | |
| echo "LOG_DIR=$(pwd)" >> $GITHUB_ENV | |
| if [ -d "/data2/hf_model" ]; then | |
| export model_cache="/data2/hf_model" | |
| else | |
| export model_cache="~/.cache/huggingface/hub" | |
| fi | |
| export IMAGE_TAG="comps" | |
| timeout 50m bash test_compose_on_gaudi.sh | |
| - name: Clean up container | |
| if: cancelled() || failure() | |
| run: | | |
| cd ${{ github.workspace }}/../GenAIExamples/ChatQnA/docker_compose/intel/hpu/gaudi | |
| docker compose stop && docker compose rm -f | |
| docker system prune -f | |
| - name: Publish pipeline artifact | |
| if: ${{ !cancelled() }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: "Examples-Test-Logs" | |
| path: ${{ env.LOG_DIR }}/*.log |