optimize docker compose CI workflow (#190)
Signed-off-by: chensuyue <suyue.chen@intel.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
57
.github/workflows/ChatQnA_gaudi.yml
vendored
57
.github/workflows/ChatQnA_gaudi.yml
vendored
@@ -1,57 +0,0 @@
|
|||||||
# Copyright (C) 2024 Intel Corporation
|
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
|
||||||
|
|
||||||
name: ChatQnA E2E test on Gaudi
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request_target:
|
|
||||||
branches: [main]
|
|
||||||
types: [opened, reopened, ready_for_review, synchronize] # added `ready_for_review` since draft is skipped
|
|
||||||
paths:
|
|
||||||
- ChatQnA/docker-composer/gaudi/**
|
|
||||||
- ChatQnA/tests/test_chatqna_on_gaudi.sh
|
|
||||||
- "!**.md"
|
|
||||||
- "!**/ui/**"
|
|
||||||
- .github/workflows/ChatQnA_gaudi.yml
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
# 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:
|
|
||||||
ChatQnA-Gaudi:
|
|
||||||
runs-on: aise-cluster
|
|
||||||
steps:
|
|
||||||
- name: Clean Up Working Directory
|
|
||||||
run: sudo rm -rf ${{github.workspace}}/*
|
|
||||||
|
|
||||||
- name: Checkout out Repo
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
ref: "refs/pull/${{ github.event.number }}/merge"
|
|
||||||
|
|
||||||
- name: Run Test
|
|
||||||
env:
|
|
||||||
HUGGINGFACEHUB_API_TOKEN: ${{ secrets.HUGGINGFACEHUB_API_TOKEN }}
|
|
||||||
AISE_CLUSTER_01_2_IP: ${{ secrets.AISE_CLUSTER_01_2_IP }}
|
|
||||||
run: |
|
|
||||||
cd ${{ github.workspace }}/ChatQnA/tests
|
|
||||||
timeout 20m bash test_chatqna_on_gaudi.sh
|
|
||||||
|
|
||||||
- name: Clean Up Container
|
|
||||||
if: cancelled() || failure()
|
|
||||||
run: |
|
|
||||||
cd ${{ github.workspace }}/ChatQnA/docker-composer/gaudi
|
|
||||||
container_list=$(cat docker_compose.yaml | grep container_name | cut -d':' -f2)
|
|
||||||
for container_name in $container_list; do
|
|
||||||
cid=$(docker ps -aq --filter "name=$container_name")
|
|
||||||
if [[ ! -z "$cid" ]]; then docker stop $cid && docker rm $cid && sleep 1s; fi
|
|
||||||
done
|
|
||||||
|
|
||||||
- name: Publish pipeline artifact
|
|
||||||
if: ${{ !cancelled() }}
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
path: ${{ github.workspace }}/ChatQnA/tests/*.log
|
|
||||||
57
.github/workflows/ChatQnA_xeon.yml
vendored
57
.github/workflows/ChatQnA_xeon.yml
vendored
@@ -1,57 +0,0 @@
|
|||||||
# Copyright (C) 2024 Intel Corporation
|
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
|
||||||
|
|
||||||
name: ChatQnA E2E test on Xeon
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request_target:
|
|
||||||
branches: [main]
|
|
||||||
types: [opened, reopened, ready_for_review, synchronize] # added `ready_for_review` since draft is skipped
|
|
||||||
paths:
|
|
||||||
- ChatQnA/docker-composer/xeon/**
|
|
||||||
- ChatQnA/tests/test_chatqna_on_xeon.sh
|
|
||||||
- "!**.md"
|
|
||||||
- "!**/ui/**"
|
|
||||||
- .github/workflows/ChatQnA_xeon.yml
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
# 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:
|
|
||||||
ChatQnA-Xeon:
|
|
||||||
runs-on: aise-cluster
|
|
||||||
steps:
|
|
||||||
- name: Clean Up Working Directory
|
|
||||||
run: sudo rm -rf ${{github.workspace}}/*
|
|
||||||
|
|
||||||
- name: Checkout out Repo
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
ref: "refs/pull/${{ github.event.number }}/merge"
|
|
||||||
|
|
||||||
- name: Run Test
|
|
||||||
env:
|
|
||||||
HUGGINGFACEHUB_API_TOKEN: ${{ secrets.HUGGINGFACEHUB_API_TOKEN }}
|
|
||||||
AISE_CLUSTER_01_2_IP: ${{ secrets.AISE_CLUSTER_01_2_IP }}
|
|
||||||
run: |
|
|
||||||
cd ${{ github.workspace }}/ChatQnA/tests
|
|
||||||
timeout 20m bash test_chatqna_on_xeon.sh
|
|
||||||
|
|
||||||
- name: Clean Up Container
|
|
||||||
if: cancelled() || failure()
|
|
||||||
run: |
|
|
||||||
cd ${{ github.workspace }}/ChatQnA/docker-composer/xeon
|
|
||||||
container_list=$(cat docker_compose.yaml | grep container_name | cut -d':' -f2)
|
|
||||||
for container_name in $container_list; do
|
|
||||||
cid=$(docker ps -aq --filter "name=$container_name")
|
|
||||||
if [[ ! -z "$cid" ]]; then docker stop $cid && docker rm $cid && sleep 1s; fi
|
|
||||||
done
|
|
||||||
|
|
||||||
- name: Publish pipeline artifact
|
|
||||||
if: ${{ !cancelled() }}
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
path: ${{ github.workspace }}/ChatQnA/tests/*.log
|
|
||||||
57
.github/workflows/CodeGen_gaudi.yml
vendored
57
.github/workflows/CodeGen_gaudi.yml
vendored
@@ -1,57 +0,0 @@
|
|||||||
# Copyright (C) 2024 Intel Corporation
|
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
|
||||||
|
|
||||||
name: CodeGen E2E test on Gaudi
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request_target:
|
|
||||||
branches: [main]
|
|
||||||
types: [opened, reopened, ready_for_review, synchronize] # added `ready_for_review` since draft is skipped
|
|
||||||
paths:
|
|
||||||
- CodeGen/docker-composer/gaudi/**
|
|
||||||
- CodeGen/tests/test_codegen_on_gaudi.sh
|
|
||||||
- "!**.md"
|
|
||||||
- "!**/ui/**"
|
|
||||||
- .github/workflows/CodeGen_gaudi.yml
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
# 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:
|
|
||||||
CodeGen-Gaudi:
|
|
||||||
runs-on: aise-cluster
|
|
||||||
steps:
|
|
||||||
- name: Clean Up Working Directory
|
|
||||||
run: sudo rm -rf ${{github.workspace}}/*
|
|
||||||
|
|
||||||
- name: Checkout out Repo
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
ref: "refs/pull/${{ github.event.number }}/merge"
|
|
||||||
|
|
||||||
- name: Run Test
|
|
||||||
env:
|
|
||||||
HUGGINGFACEHUB_API_TOKEN: ${{ secrets.HUGGINGFACEHUB_API_TOKEN }}
|
|
||||||
AISE_CLUSTER_01_2_IP: ${{ secrets.AISE_CLUSTER_01_2_IP }}
|
|
||||||
run: |
|
|
||||||
cd ${{ github.workspace }}/CodeGen/tests
|
|
||||||
timeout 20m bash test_codegen_on_gaudi.sh
|
|
||||||
|
|
||||||
- name: Clean Up Container
|
|
||||||
if: cancelled() || failure()
|
|
||||||
run: |
|
|
||||||
cd ${{ github.workspace }}/CodeGen/docker-composer/gaudi
|
|
||||||
container_list=$(cat docker_compose.yaml | grep container_name | cut -d':' -f2)
|
|
||||||
for container_name in $container_list; do
|
|
||||||
cid=$(docker ps -aq --filter "name=$container_name")
|
|
||||||
if [[ ! -z "$cid" ]]; then docker stop $cid && docker rm $cid && sleep 1s; fi
|
|
||||||
done
|
|
||||||
|
|
||||||
- name: Publish pipeline artifact
|
|
||||||
if: ${{ !cancelled() }}
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
path: ${{ github.workspace }}/CodeGen/tests/*.log
|
|
||||||
57
.github/workflows/CodeGen_xeon.yml
vendored
57
.github/workflows/CodeGen_xeon.yml
vendored
@@ -1,57 +0,0 @@
|
|||||||
# Copyright (C) 2024 Intel Corporation
|
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
|
||||||
|
|
||||||
name: CodeGen E2E test on Xeon
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request_target:
|
|
||||||
branches: [main]
|
|
||||||
types: [opened, reopened, ready_for_review, synchronize] # added `ready_for_review` since draft is skipped
|
|
||||||
paths:
|
|
||||||
- CodeGen/docker-composer/xeon/**
|
|
||||||
- CodeGen/tests/test_codegen_on_xeon.sh
|
|
||||||
- "!**.md"
|
|
||||||
- "!**/ui/**"
|
|
||||||
- .github/workflows/CodeGen_xeon.yml
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
# 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:
|
|
||||||
CodeGen-Xeon:
|
|
||||||
runs-on: aise-cluster
|
|
||||||
steps:
|
|
||||||
- name: Clean Up Working Directory
|
|
||||||
run: sudo rm -rf ${{github.workspace}}/*
|
|
||||||
|
|
||||||
- name: Checkout out Repo
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
ref: "refs/pull/${{ github.event.number }}/merge"
|
|
||||||
|
|
||||||
- name: Run Test
|
|
||||||
env:
|
|
||||||
HUGGINGFACEHUB_API_TOKEN: ${{ secrets.HUGGINGFACEHUB_API_TOKEN }}
|
|
||||||
AISE_CLUSTER_01_2_IP: ${{ secrets.AISE_CLUSTER_01_2_IP }}
|
|
||||||
run: |
|
|
||||||
cd ${{ github.workspace }}/CodeGen/tests
|
|
||||||
timeout 20m bash test_codegen_on_xeon.sh
|
|
||||||
|
|
||||||
- name: Clean Up Container
|
|
||||||
if: cancelled() || failure()
|
|
||||||
run: |
|
|
||||||
cd ${{ github.workspace }}/CodeGen/docker-composer/xeon
|
|
||||||
container_list=$(cat docker_compose.yaml | grep container_name | cut -d':' -f2)
|
|
||||||
for container_name in $container_list; do
|
|
||||||
cid=$(docker ps -aq --filter "name=$container_name")
|
|
||||||
if [[ ! -z "$cid" ]]; then docker stop $cid && docker rm $cid && sleep 1s; fi
|
|
||||||
done
|
|
||||||
|
|
||||||
- name: Publish pipeline artifact
|
|
||||||
if: ${{ !cancelled() }}
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
path: ${{ github.workspace }}/CodeGen/tests/*.log
|
|
||||||
57
.github/workflows/CodeTrans_gaudi.yml
vendored
57
.github/workflows/CodeTrans_gaudi.yml
vendored
@@ -1,57 +0,0 @@
|
|||||||
# Copyright (C) 2024 Intel Corporation
|
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
|
||||||
|
|
||||||
name: CodeTrans E2E test on Gaudi
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request_target:
|
|
||||||
branches: [main]
|
|
||||||
types: [opened, reopened, ready_for_review, synchronize] # added `ready_for_review` since draft is skipped
|
|
||||||
paths:
|
|
||||||
- CodeTrans/docker-composer/gaudi/**
|
|
||||||
- CodeTrans/tests/test_codetrans_on_gaudi.sh
|
|
||||||
- "!**.md"
|
|
||||||
- "!**/ui/**"
|
|
||||||
- .github/workflows/CodeTrans_gaudi.yml
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
# 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:
|
|
||||||
CodeTrans-Gaudi:
|
|
||||||
runs-on: aise-cluster
|
|
||||||
steps:
|
|
||||||
- name: Clean Up Working Directory
|
|
||||||
run: sudo rm -rf ${{github.workspace}}/*
|
|
||||||
|
|
||||||
- name: Checkout out Repo
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
ref: "refs/pull/${{ github.event.number }}/merge"
|
|
||||||
|
|
||||||
- name: Run Test
|
|
||||||
env:
|
|
||||||
HUGGINGFACEHUB_API_TOKEN: ${{ secrets.HUGGINGFACEHUB_API_TOKEN }}
|
|
||||||
AISE_CLUSTER_01_2_IP: ${{ secrets.AISE_CLUSTER_01_2_IP }}
|
|
||||||
run: |
|
|
||||||
cd ${{ github.workspace }}/CodeTrans/tests
|
|
||||||
timeout 20m bash test_codetrans_on_gaudi.sh
|
|
||||||
|
|
||||||
- name: Clean Up Container
|
|
||||||
if: cancelled() || failure()
|
|
||||||
run: |
|
|
||||||
cd ${{ github.workspace }}/CodeTrans/docker-composer/gaudi
|
|
||||||
container_list=$(cat docker_compose.yaml | grep container_name | cut -d':' -f2)
|
|
||||||
for container_name in $container_list; do
|
|
||||||
cid=$(docker ps -aq --filter "name=$container_name")
|
|
||||||
if [[ ! -z "$cid" ]]; then docker stop $cid && docker rm $cid && sleep 1s; fi
|
|
||||||
done
|
|
||||||
|
|
||||||
- name: Publish pipeline artifact
|
|
||||||
if: ${{ !cancelled() }}
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
path: ${{ github.workspace }}/CodeTrans/tests/*.log
|
|
||||||
57
.github/workflows/CodeTrans_xeon.yml
vendored
57
.github/workflows/CodeTrans_xeon.yml
vendored
@@ -1,57 +0,0 @@
|
|||||||
# Copyright (C) 2024 Intel Corporation
|
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
|
||||||
|
|
||||||
name: CodeTrans E2E test on Xeon
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request_target:
|
|
||||||
branches: [main]
|
|
||||||
types: [opened, reopened, ready_for_review, synchronize] # added `ready_for_review` since draft is skipped
|
|
||||||
paths:
|
|
||||||
- CodeTrans/docker-composer/xeon/**
|
|
||||||
- CodeTrans/tests/test_codetrans_on_xeon.sh
|
|
||||||
- "!**.md"
|
|
||||||
- "!**/ui/**"
|
|
||||||
- .github/workflows/CodeTrans_xeon.yml
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
# 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:
|
|
||||||
CodeTrans-Xeon:
|
|
||||||
runs-on: aise-cluster
|
|
||||||
steps:
|
|
||||||
- name: Clean Up Working Directory
|
|
||||||
run: sudo rm -rf ${{github.workspace}}/*
|
|
||||||
|
|
||||||
- name: Checkout out Repo
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
ref: "refs/pull/${{ github.event.number }}/merge"
|
|
||||||
|
|
||||||
- name: Run Test
|
|
||||||
env:
|
|
||||||
HUGGINGFACEHUB_API_TOKEN: ${{ secrets.HUGGINGFACEHUB_API_TOKEN }}
|
|
||||||
AISE_CLUSTER_01_2_IP: ${{ secrets.AISE_CLUSTER_01_2_IP }}
|
|
||||||
run: |
|
|
||||||
cd ${{ github.workspace }}/CodeTrans/tests
|
|
||||||
timeout 20m bash test_codetrans_on_xeon.sh
|
|
||||||
|
|
||||||
- name: Clean Up Container
|
|
||||||
if: cancelled() || failure()
|
|
||||||
run: |
|
|
||||||
cd ${{ github.workspace }}/CodeTrans/docker-composer/xeon
|
|
||||||
container_list=$(cat docker_compose.yaml | grep container_name | cut -d':' -f2)
|
|
||||||
for container_name in $container_list; do
|
|
||||||
cid=$(docker ps -aq --filter "name=$container_name")
|
|
||||||
if [[ ! -z "$cid" ]]; then docker stop $cid && docker rm $cid && sleep 1s; fi
|
|
||||||
done
|
|
||||||
|
|
||||||
- name: Publish pipeline artifact
|
|
||||||
if: ${{ !cancelled() }}
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
path: ${{ github.workspace }}/CodeTrans/tests/*.log
|
|
||||||
57
.github/workflows/DocSum_gaudi.yml
vendored
57
.github/workflows/DocSum_gaudi.yml
vendored
@@ -1,57 +0,0 @@
|
|||||||
# Copyright (C) 2024 Intel Corporation
|
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
|
||||||
|
|
||||||
name: DocSum E2E test on Gaudi
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request_target:
|
|
||||||
branches: [main]
|
|
||||||
types: [opened, reopened, ready_for_review, synchronize] # added `ready_for_review` since draft is skipped
|
|
||||||
paths:
|
|
||||||
- DocSum/docker-composer/gaudi/**
|
|
||||||
- DocSum/tests/test_docsum_on_gaudi.sh
|
|
||||||
- "!**.md"
|
|
||||||
- "!**/ui/**"
|
|
||||||
- .github/workflows/DocSum_gaudi.yml
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
# 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:
|
|
||||||
DocSum-Gaudi:
|
|
||||||
runs-on: aise-cluster
|
|
||||||
steps:
|
|
||||||
- name: Clean Up Working Directory
|
|
||||||
run: sudo rm -rf ${{github.workspace}}/*
|
|
||||||
|
|
||||||
- name: Checkout out Repo
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
ref: "refs/pull/${{ github.event.number }}/merge"
|
|
||||||
|
|
||||||
- name: Run Test
|
|
||||||
env:
|
|
||||||
HUGGINGFACEHUB_API_TOKEN: ${{ secrets.HUGGINGFACEHUB_API_TOKEN }}
|
|
||||||
AISE_CLUSTER_01_2_IP: ${{ secrets.AISE_CLUSTER_01_2_IP }}
|
|
||||||
run: |
|
|
||||||
cd ${{ github.workspace }}/DocSum/tests
|
|
||||||
timeout 20m bash test_docsum_on_gaudi.sh
|
|
||||||
|
|
||||||
- name: Clean Up Container
|
|
||||||
if: cancelled() || failure()
|
|
||||||
run: |
|
|
||||||
cd ${{ github.workspace }}/DocSum/docker-composer/gaudi
|
|
||||||
container_list=$(cat docker_compose.yaml | grep container_name | cut -d':' -f2)
|
|
||||||
for container_name in $container_list; do
|
|
||||||
cid=$(docker ps -aq --filter "name=$container_name")
|
|
||||||
if [[ ! -z "$cid" ]]; then docker stop $cid && docker rm $cid && sleep 1s; fi
|
|
||||||
done
|
|
||||||
|
|
||||||
- name: Publish pipeline artifact
|
|
||||||
if: ${{ !cancelled() }}
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
path: ${{ github.workspace }}/DocSum/tests/*.log
|
|
||||||
57
.github/workflows/DocSum_xeon.yml
vendored
57
.github/workflows/DocSum_xeon.yml
vendored
@@ -1,57 +0,0 @@
|
|||||||
# Copyright (C) 2024 Intel Corporation
|
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
|
||||||
|
|
||||||
name: DocSum E2E test on Xeon
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request_target:
|
|
||||||
branches: [main]
|
|
||||||
types: [opened, reopened, ready_for_review, synchronize] # added `ready_for_review` since draft is skipped
|
|
||||||
paths:
|
|
||||||
- DocSum/docker-composer/xeon/**
|
|
||||||
- DocSum/tests/test_docsum_on_xeon.sh
|
|
||||||
- "!**.md"
|
|
||||||
- "!**/ui/**"
|
|
||||||
- .github/workflows/DocSum_xeon.yml
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
# 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:
|
|
||||||
DocSum-Xeon:
|
|
||||||
runs-on: aise-cluster
|
|
||||||
steps:
|
|
||||||
- name: Clean Up Working Directory
|
|
||||||
run: sudo rm -rf ${{github.workspace}}/*
|
|
||||||
|
|
||||||
- name: Checkout out Repo
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
ref: "refs/pull/${{ github.event.number }}/merge"
|
|
||||||
|
|
||||||
- name: Run Test
|
|
||||||
env:
|
|
||||||
HUGGINGFACEHUB_API_TOKEN: ${{ secrets.HUGGINGFACEHUB_API_TOKEN }}
|
|
||||||
AISE_CLUSTER_01_2_IP: ${{ secrets.AISE_CLUSTER_01_2_IP }}
|
|
||||||
run: |
|
|
||||||
cd ${{ github.workspace }}/DocSum/tests
|
|
||||||
timeout 20m bash test_docsum_on_xeon.sh
|
|
||||||
|
|
||||||
- name: Clean Up Container
|
|
||||||
if: cancelled() || failure()
|
|
||||||
run: |
|
|
||||||
cd ${{ github.workspace }}/DocSum/docker-composer/xeon
|
|
||||||
container_list=$(cat docker_compose.yaml | grep container_name | cut -d':' -f2)
|
|
||||||
for container_name in $container_list; do
|
|
||||||
cid=$(docker ps -aq --filter "name=$container_name")
|
|
||||||
if [[ ! -z "$cid" ]]; then docker stop $cid && docker rm $cid && sleep 1s; fi
|
|
||||||
done
|
|
||||||
|
|
||||||
- name: Publish pipeline artifact
|
|
||||||
if: ${{ !cancelled() }}
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
path: ${{ github.workspace }}/DocSum/tests/*.log
|
|
||||||
104
.github/workflows/E2E_test_with_compose.yml
vendored
Normal file
104
.github/workflows/E2E_test_with_compose.yml
vendored
Normal file
@@ -0,0 +1,104 @@
|
|||||||
|
# Copyright (C) 2024 Intel Corporation
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
name: E2E test with docker compose
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request_target:
|
||||||
|
branches: [main]
|
||||||
|
types: [opened, reopened, ready_for_review, synchronize] # added `ready_for_review` since draft is skipped
|
||||||
|
paths:
|
||||||
|
- "**/docker-composer/**"
|
||||||
|
- "**/tests/**"
|
||||||
|
- "**/ui/**"
|
||||||
|
- "!**.md"
|
||||||
|
- "!**.txt"
|
||||||
|
- .github/workflows/E2E_test_with_compose.yml
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
# 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:
|
||||||
|
job1:
|
||||||
|
name: Get-test-matrix
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
run_matrix: ${{ steps.get-test-matrix.outputs.run_matrix }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout out Repo
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Get test matrix
|
||||||
|
id: get-test-matrix
|
||||||
|
run: |
|
||||||
|
set -xe
|
||||||
|
changed_files=$(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} | \
|
||||||
|
grep -vE '.github|README.md|*.txt|deprecate|kubernetes')
|
||||||
|
examples=$(printf '%s\n' "${changed_files[@]}" | grep '/' | cut -d'/' -f1 | sort -u)
|
||||||
|
run_matrix="{\"include\":["
|
||||||
|
for example in ${examples}; do
|
||||||
|
run_hardware=""
|
||||||
|
if [ $(printf '%s\n' "${changed_files[@]}" | grep ${example} | grep -c gaudi) != 0 ]; then run_hardware="gaudi"; fi
|
||||||
|
if [ $(printf '%s\n' "${changed_files[@]}" | grep ${example} | grep -c xeon) != 0 ]; then run_hardware="xeon ${run_hardware}"; fi
|
||||||
|
if [ $run_hardware = "" ]; then run_hardware="xeon"; fi
|
||||||
|
for hw in ${run_hardware}; do
|
||||||
|
run_matrix="${run_matrix}{\"example\":\"${example}\",\"hardware\":\"${hw}\"},"
|
||||||
|
done
|
||||||
|
done
|
||||||
|
run_matrix=$run_matrix"]}"
|
||||||
|
echo "run_matrix=${run_matrix}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
Example-test:
|
||||||
|
needs: job1
|
||||||
|
strategy:
|
||||||
|
matrix: ${{ fromJSON(needs.job1.outputs.run_matrix) }}
|
||||||
|
runs-on: ${{ matrix.hardware }}
|
||||||
|
continue-on-error: true
|
||||||
|
steps:
|
||||||
|
- name: Test example
|
||||||
|
run: |
|
||||||
|
echo "Matrix - example ${{ matrix.example }}, hardware ${{ matrix.hardware }}"
|
||||||
|
|
||||||
|
- name: Clean Up Working Directory
|
||||||
|
run: sudo rm -rf ${{github.workspace}}/*
|
||||||
|
|
||||||
|
- name: Checkout out Repo
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
ref: "refs/pull/${{ github.event.number }}/merge"
|
||||||
|
|
||||||
|
- name: Run test
|
||||||
|
env:
|
||||||
|
HUGGINGFACEHUB_API_TOKEN: ${{ secrets.HUGGINGFACEHUB_API_TOKEN }}
|
||||||
|
example: ${{ matrix.example }}
|
||||||
|
hardware: ${{ matrix.hardware }}
|
||||||
|
run: |
|
||||||
|
cd ${{ github.workspace }}/$example/tests
|
||||||
|
example_l=$(echo $example | tr '[:upper:]' '[:lower:]')
|
||||||
|
timeout 20m bash test_${example_l}_on_${hardware}.sh
|
||||||
|
|
||||||
|
- name: Clean up container
|
||||||
|
env:
|
||||||
|
example: ${{ matrix.example }}
|
||||||
|
hardware: ${{ matrix.hardware }}
|
||||||
|
if: cancelled() || failure()
|
||||||
|
run: |
|
||||||
|
cd ${{ github.workspace }}/$example/docker-composer/$hardware
|
||||||
|
container_list=$(cat docker_compose.yaml | grep container_name | cut -d':' -f2)
|
||||||
|
for container_name in $container_list; do
|
||||||
|
cid=$(docker ps -aq --filter "name=$container_name")
|
||||||
|
if [[ ! -z "$cid" ]]; then docker stop $cid && docker rm $cid && sleep 1s; fi
|
||||||
|
done
|
||||||
|
echo y | docker system prune
|
||||||
|
|
||||||
|
- name: Publish pipeline artifact
|
||||||
|
if: ${{ !cancelled() }}
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: ${{ matrix.example }}-${{ matrix.hardware }}
|
||||||
|
path: ${{ github.workspace }}/${{ matrix.example }}/tests/*.log
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
# Copyright (C) 2024 Intel Corporation
|
# Copyright (C) 2024 Intel Corporation
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
set -x
|
set -xe
|
||||||
|
|
||||||
WORKPATH=$(dirname "$PWD")
|
WORKPATH=$(dirname "$PWD")
|
||||||
LOG_PATH="$WORKPATH/tests"
|
LOG_PATH="$WORKPATH/tests"
|
||||||
@@ -89,7 +89,7 @@ function validate_microservices() {
|
|||||||
fi
|
fi
|
||||||
sleep 5s
|
sleep 5s
|
||||||
|
|
||||||
export PATH="${HOME}/miniconda3/bin:$PATH"
|
export PATH="${HOME}/miniforge3/bin:$PATH"
|
||||||
source activate
|
source activate
|
||||||
test_embedding=$(python -c "import random; embedding = [random.uniform(-1, 1) for _ in range(768)]; print(embedding)")
|
test_embedding=$(python -c "import random; embedding = [random.uniform(-1, 1) for _ in range(768)]; print(embedding)")
|
||||||
curl http://${ip_address}:7000/v1/retrieval \
|
curl http://${ip_address}:7000/v1/retrieval \
|
||||||
|
|||||||
@@ -2,12 +2,11 @@
|
|||||||
# Copyright (C) 2024 Intel Corporation
|
# Copyright (C) 2024 Intel Corporation
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
set -x
|
set -xe
|
||||||
|
|
||||||
WORKPATH=$(dirname "$PWD")
|
WORKPATH=$(dirname "$PWD")
|
||||||
LOG_PATH="$WORKPATH/tests"
|
LOG_PATH="$WORKPATH/tests"
|
||||||
ip_name=$(echo $(hostname) | tr '[a-z]-' '[A-Z]_')_$(echo 'IP')
|
ip_address=$(hostname -I | awk '{print $1}')
|
||||||
ip_address=$(eval echo '$'$ip_name)
|
|
||||||
|
|
||||||
function build_docker_images() {
|
function build_docker_images() {
|
||||||
cd $WORKPATH
|
cd $WORKPATH
|
||||||
@@ -81,7 +80,7 @@ function validate_microservices() {
|
|||||||
fi
|
fi
|
||||||
sleep 5s
|
sleep 5s
|
||||||
|
|
||||||
export PATH="${HOME}/miniconda3/bin:$PATH"
|
export PATH="${HOME}/miniforge3/bin:$PATH"
|
||||||
source activate
|
source activate
|
||||||
test_embedding=$(python -c "import random; embedding = [random.uniform(-1, 1) for _ in range(768)]; print(embedding)")
|
test_embedding=$(python -c "import random; embedding = [random.uniform(-1, 1) for _ in range(768)]; print(embedding)")
|
||||||
curl http://${ip_address}:7000/v1/retrieval \
|
curl http://${ip_address}:7000/v1/retrieval \
|
||||||
|
|||||||
@@ -12,12 +12,11 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
set -x
|
set -xe
|
||||||
|
|
||||||
WORKPATH=$(dirname "$PWD")
|
WORKPATH=$(dirname "$PWD")
|
||||||
LOG_PATH="$WORKPATH/tests"
|
LOG_PATH="$WORKPATH/tests"
|
||||||
ip_name=$(echo $(hostname) | tr '[a-z]-' '[A-Z]_')_$(echo 'IP')
|
ip_address=$(hostname -I | awk '{print $1}')
|
||||||
ip_address=$(eval echo '$'$ip_name)
|
|
||||||
|
|
||||||
function build_docker_images() {
|
function build_docker_images() {
|
||||||
cd $WORKPATH
|
cd $WORKPATH
|
||||||
@@ -58,7 +57,7 @@ function validate_microservices() {
|
|||||||
# Check if the microservices are running correctly.
|
# Check if the microservices are running correctly.
|
||||||
# TODO: Any results check required??
|
# TODO: Any results check required??
|
||||||
|
|
||||||
export PATH="${HOME}/miniconda3/bin:$PATH"
|
export PATH="${HOME}/miniforge3/bin:$PATH"
|
||||||
|
|
||||||
curl http://${ip_address}:8028/generate \
|
curl http://${ip_address}:8028/generate \
|
||||||
-X POST \
|
-X POST \
|
||||||
|
|||||||
@@ -6,8 +6,7 @@ set -xe
|
|||||||
|
|
||||||
WORKPATH=$(dirname "$PWD")
|
WORKPATH=$(dirname "$PWD")
|
||||||
LOG_PATH="$WORKPATH/tests"
|
LOG_PATH="$WORKPATH/tests"
|
||||||
ip_name=$(echo $(hostname) | tr '[a-z]-' '[A-Z]_')_$(echo 'IP')
|
ip_address=$(hostname -I | awk '{print $1}')
|
||||||
ip_address=$(eval echo '$'$ip_name)
|
|
||||||
|
|
||||||
function build_docker_images() {
|
function build_docker_images() {
|
||||||
cd $WORKPATH
|
cd $WORKPATH
|
||||||
@@ -46,7 +45,7 @@ function validate_microservices() {
|
|||||||
# Check if the microservices are running correctly.
|
# Check if the microservices are running correctly.
|
||||||
# TODO: Any results check required??
|
# TODO: Any results check required??
|
||||||
|
|
||||||
export PATH="${HOME}/miniconda3/bin:$PATH"
|
export PATH="${HOME}/miniforge3/bin:$PATH"
|
||||||
|
|
||||||
curl http://${ip_address}:8028/generate \
|
curl http://${ip_address}:8028/generate \
|
||||||
-X POST \
|
-X POST \
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
|
|
||||||
set -xe
|
set -xe
|
||||||
|
|
||||||
|
|
||||||
WORKPATH=$(dirname "$PWD")
|
WORKPATH=$(dirname "$PWD")
|
||||||
LOG_PATH="$WORKPATH/tests"
|
LOG_PATH="$WORKPATH/tests"
|
||||||
ip_address=$(hostname -I | awk '{print $1}')
|
ip_address=$(hostname -I | awk '{print $1}')
|
||||||
|
|||||||
@@ -6,8 +6,7 @@ set -x
|
|||||||
|
|
||||||
WORKPATH=$(dirname "$PWD")
|
WORKPATH=$(dirname "$PWD")
|
||||||
LOG_PATH="$WORKPATH/tests"
|
LOG_PATH="$WORKPATH/tests"
|
||||||
ip_name=$(echo $(hostname) | tr '[a-z]-' '[A-Z]_')_$(echo 'IP')
|
ip_address=$(hostname -I | awk '{print $1}')
|
||||||
ip_address=$(eval echo '$'$ip_name)
|
|
||||||
|
|
||||||
function build_docker_images() {
|
function build_docker_images() {
|
||||||
cd $WORKPATH
|
cd $WORKPATH
|
||||||
|
|||||||
@@ -6,8 +6,7 @@ set -x
|
|||||||
|
|
||||||
WORKPATH=$(dirname "$PWD")
|
WORKPATH=$(dirname "$PWD")
|
||||||
LOG_PATH="$WORKPATH/tests"
|
LOG_PATH="$WORKPATH/tests"
|
||||||
ip_name=$(echo $(hostname) | tr '[a-z]-' '[A-Z]_')_$(echo 'IP')
|
ip_address=$(hostname -I | awk '{print $1}')
|
||||||
ip_address=$(eval echo '$'$ip_name)
|
|
||||||
|
|
||||||
function build_docker_images() {
|
function build_docker_images() {
|
||||||
cd $WORKPATH
|
cd $WORKPATH
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ terms are listed below.
|
|||||||
1. huggingface/transformers
|
1. huggingface/transformers
|
||||||
Copyright 2018- The Hugging Face team. All rights reserved.
|
Copyright 2018- The Hugging Face team. All rights reserved.
|
||||||
|
|
||||||
|
|
||||||
Apache License
|
Apache License
|
||||||
Version 2.0, January 2004
|
Version 2.0, January 2004
|
||||||
http://www.apache.org/licenses/
|
http://www.apache.org/licenses/
|
||||||
|
|||||||
Reference in New Issue
Block a user