Add Arbitration Post-Hearing Component with LLM-Based Entity Extracti… #645
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: Build latest images on push event | |
| permissions: read-all | |
| on: | |
| push: | |
| branches: ["main"] | |
| paths: | |
| - 'comps/**' | |
| - 'src/**' | |
| - '.github/workflows/docker/compose/**' | |
| - '!**/*.md' | |
| - '!**/*.txt' | |
| - '**/requirements.txt' | |
| - '.github/workflows/push-image-build.yml' | |
| jobs: | |
| get-build-matrix: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| services: ${{ steps.get-services.outputs.services }} | |
| steps: | |
| - name: Checkout Repo | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Get Test Services | |
| id: get-services | |
| run: | | |
| set -x | |
| base_commit=$(git rev-parse HEAD~1) | |
| merged_commit=$(git log -1 --format='%H') | |
| # git diff --name-only ${base_commit} ${merged_commit} | grep -E "cores|comps/__init__.py" | grep -Ev ".md" | |
| if git diff --name-only ${base_commit} ${merged_commit} | grep -E "cores|comps/__init__.py" | grep -Ev ".md"; then | |
| echo "ALL image build!!!" | |
| services=$(basename -a .github/workflows/docker/compose/*-compose.yaml | sed 's/-compose.yaml//' | jq -R '.' ) | |
| else | |
| changed_src="$(git diff --name-only ${base_commit} ${merged_commit} | grep 'src/' | grep -vE '\.md')" || true | |
| changed_yamls="$(git diff --name-only ${base_commit} ${merged_commit} | grep '.github/workflows/docker/compose/')" || true | |
| [[ -n "$changed_src" ]] && services=$(printf '%s\n' "${changed_src[@]}" | cut -d'/' -f2 | grep -vE '\.py' | sort -u | jq -R '.' ) || true | |
| if [[ -n "$changed_yamls" ]]; then | |
| while IFS= read -r line; do | |
| filename=$(basename "$line" -compose.yaml) | |
| echo "$line $(printf '%s\n' "$filename" | jq -R '.' )" | |
| services+=" $(printf '%s\n' "$filename" | jq -R '.' )" || true | |
| done <<< "$changed_yamls" | |
| else | |
| echo "No changes in YAML files." | |
| fi | |
| fi | |
| echo "services=$(echo "$services" | jq -sc 'unique | sort')" | |
| echo "services=$(echo "$services" | jq -sc 'unique | sort')" >> $GITHUB_OUTPUT | |
| continue-on-error: true | |
| image-build: | |
| needs: get-build-matrix | |
| if: needs.get-build-matrix.outputs.services != '[]' | |
| strategy: | |
| matrix: | |
| service: ${{ fromJSON(needs.get-build-matrix.outputs.services) }} | |
| node: [gaudi] | |
| runs-on: docker-build-${{ matrix.node }} | |
| continue-on-error: true | |
| steps: | |
| - name: Clean up Working Directory | |
| run: | | |
| echo "matrix.service=${{ matrix.service }}" | |
| sudo rm -rf ${{github.workspace}}/* | |
| - name: Checkout out Repo | |
| uses: actions/checkout@v4 | |
| - name: Check Docker Compose File Exists | |
| env: | |
| service: ${{ matrix.service }} | |
| run: | | |
| docker_compose_path="${{ github.workspace }}/.github/workflows/docker/compose/${service}-compose.yaml" | |
| if [ -e $docker_compose_path ]; then | |
| echo "file_exists=true" >> $GITHUB_ENV | |
| echo "docker_compose_path=${docker_compose_path}" >> $GITHUB_ENV | |
| else | |
| echo "file_exists=false" >> $GITHUB_ENV | |
| echo "docker_compose_path=${docker_compose_path} for this service does not exist, so skipping image build for this service!!!" | |
| fi | |
| source ${{ github.workspace }}/.github/env/_vllm_versions.sh | |
| if [[ $(grep -c "vllm-openvino:" ${docker_compose_path}) != 0 ]]; then | |
| git clone --depth 1 -b ${VLLM_OPENVINO_VER} --single-branch https://github.com/vllm-project/vllm.git vllm-openvino | |
| fi | |
| if [[ $(grep -c "vllm-gaudi:" ${docker_compose_path}) != 0 ]]; then | |
| git clone --depth 1 -b ${VLLM_FORK_VER} --single-branch https://github.com/HabanaAI/vllm-fork.git vllm-fork | |
| fi | |
| - name: Build Image | |
| if: env.file_exists == 'true' | |
| uses: opea-project/validation/actions/image-build@main | |
| with: | |
| work_dir: ${{ github.workspace }} | |
| docker_compose_path: ${{ env.docker_compose_path }} | |
| registry: ${OPEA_IMAGE_REPO}opea |