-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* update description Signed-off-by: chensuyue <[email protected]> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Optimize path-scan. Signed-off-by: ZePan110 <[email protected]> * For test. Signed-off-by: ZePan110 <[email protected]> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Fix bug. Signed-off-by: ZePan110 <[email protected]> * test1 Signed-off-by: ZePan110 <[email protected]> * test2. Signed-off-by: ZePan110 <[email protected]> * test3 Signed-off-by: ZePan110 <[email protected]> * Restore test file. Signed-off-by: ZePan110 <[email protected]> * test4 Signed-off-by: ZePan110 <[email protected]> * Fix syntax error Signed-off-by: ZePan110 <[email protected]> * test Signed-off-by: ZePan110 <[email protected]> * test Signed-off-by: ZePan110 <[email protected]> * Fix issue. Signed-off-by: ZePan110 <[email protected]> * Remove debug output Signed-off-by: ZePan110 <[email protected]> * Restore test file and remove debug output. Signed-off-by: ZePan110 <[email protected]> * Remove deprecated code. Signed-off-by: ZePan110 <[email protected]> * Modify output. Signed-off-by: ZePan110 <[email protected]> * modify output Signed-off-by: ZePan110 <[email protected]> * Fix file path error. Signed-off-by: ZePan110 <[email protected]> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fix issue Signed-off-by: ZePan110 <[email protected]> * Fix error Signed-off-by: ZePan110 <[email protected]> * Fix error. Signed-off-by: ZePan110 <[email protected]> * Fix error. Signed-off-by: ZePan110 <[email protected]> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Fix error Signed-off-by: ZePan110 <[email protected]> * resolve confilct. Signed-off-by: ZePan110 <[email protected]> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Fix error. Signed-off-by: ZePan110 <[email protected]> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Signed-off-by: chensuyue <[email protected]> Signed-off-by: ZePan110 <[email protected]> Co-authored-by: chen, suyue <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
- Loading branch information
1 parent
7e40475
commit 61b8fa9
Showing
20 changed files
with
175 additions
and
47 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains 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
This file contains 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
This file contains 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
9 changes: 9 additions & 0 deletions
9
.github/workflows/docker/compose/feedback_management-compose-cd.yaml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Copyright (C) 2024 Intel Corporation | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
# this file should be run in the root of the repo | ||
services: | ||
feedbackmanagement: | ||
build: | ||
dockerfile: comps/feedback_management/mongo/Dockerfile | ||
image: ${REGISTRY:-opea}/feedbackmanagement:${TAG:-latest} |
13 changes: 13 additions & 0 deletions
13
.github/workflows/docker/compose/finetuning-compose-cd.yaml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Copyright (C) 2024 Intel Corporation | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
# this file should be run in the root of the repo | ||
services: | ||
finetuning: | ||
build: | ||
dockerfile: comps/finetuning/Dockerfile | ||
image: ${REGISTRY:-opea}/finetuning:${TAG:-latest} | ||
finetuning-gaudi: | ||
build: | ||
dockerfile: comps/finetuning/Dockerfile.intel_hpu | ||
image: ${REGISTRY:-opea}/finetuning-gaudi:${TAG:-latest} |
This file contains 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
9 changes: 9 additions & 0 deletions
9
.github/workflows/docker/compose/intent_detection-compose-cd.yaml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Copyright (C) 2024 Intel Corporation | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
# this file should be run in the root of the repo | ||
services: | ||
llm-tgi: | ||
build: | ||
dockerfile: comps/intent_detection/langchain/Dockerfile | ||
image: ${REGISTRY:-opea}/llm-tgi:${TAG:-latest} |
9 changes: 9 additions & 0 deletions
9
.github/workflows/docker/compose/knowledgegraphs-compose-cd.yaml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Copyright (C) 2024 Intel Corporation | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
# this file should be run in the root of the repo | ||
services: | ||
knowledge_graphs: | ||
build: | ||
dockerfile: comps/knowledgegraphs/langchain/Dockerfile | ||
image: ${REGISTRY:-opea}/knowledge_graphs:${TAG:-latest} |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Copyright (C) 2024 Intel Corporation | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
# this file should be run in the root of the repo | ||
services: | ||
lvm-tgi: | ||
build: | ||
dockerfile: comps/lvms/tgi-llava/Dockerfile | ||
image: ${REGISTRY:-opea}/lvm-tgi:${TAG:-latest} |
File renamed without changes.
File renamed without changes.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Copyright (C) 2024 Intel Corporation | ||
# SPDX-License-Identifier: Apache-2.0 | ||
services: | ||
ragas: | ||
build: | ||
dockerfile: comps/ragas/tgi/langchain/Dockerfile | ||
image: ${REGISTRY:-opea}/ragas:${TAG:-latest} |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Copyright (C) 2024 Intel Corporation | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
# this file should be run in the root of the repo | ||
# images used by GenAIExamples: reranking-tei | ||
services: | ||
tts: #need to rename | ||
build: | ||
dockerfile: comps/tts/Dockerfile | ||
image: ${REGISTRY:-opea}/tts:${TAG:-latest} |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,12 +20,18 @@ jobs: | |
- name: Clean Up Working Directory | ||
run: sudo rm -rf ${{github.workspace}}/* | ||
|
||
- name: Checkout code | ||
- name: Checkout Code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Check for changed Dockerfile paths in yaml | ||
- name: Clone GenAIExamples | ||
run: | | ||
cd .. | ||
git clone https://github.com/opea-project/GenAIExamples | ||
- name: Check Dockerfile Paths in Readme | ||
if: always() | ||
run: | | ||
set -e | ||
shopt -s globstar | ||
|
@@ -36,7 +42,7 @@ jobs: | |
changed_files="$(git diff --name-status --diff-filter=DR ${{ github.event.pull_request.base.sha }} ${merged_commit} -- '**/Dockerfile**' | cut -f2)" | ||
if [ -n "$changed_files" ]; then | ||
for file in $changed_files; do | ||
if grep -q "$file" .github/workflows/docker/compose/*.yaml; then | ||
if grep -q "$file" ./**/*.md; then | ||
is_use="TRUE" | ||
used_files+="$file " | ||
fi | ||
|
@@ -46,64 +52,68 @@ jobs: | |
if [[ "$is_use" == "TRUE" ]]; then | ||
echo "Warning: Changed Dockerfile paths:" | ||
echo "$used_files" | ||
echo "Please modify the corresponding yaml in GenAIComps/.github/workflows/docker/compose and ask [email protected] for final confirmation." | ||
echo "Please modify the corresponding README in GenAIComps." | ||
exit 1 | ||
fi | ||
- name: Check for changed Dockerfile paths in readme | ||
- name: Check all Dockerfile mode and if it exists in yaml | ||
if: always() | ||
run: | | ||
set -e | ||
shopt -s globstar | ||
no_add="FALSE" | ||
cd ${{github.workspace}} | ||
is_use="FALSE" | ||
used_files="" | ||
merged_commit=$(git log -1 --format='%H') | ||
changed_files="$(git diff --name-status --diff-filter=DR ${{ github.event.pull_request.base.sha }} ${merged_commit} -- '**/Dockerfile**' | cut -f2)" | ||
if [ -n "$changed_files" ]; then | ||
for file in $changed_files; do | ||
if grep -q "$file" ./**/*.md; then | ||
is_use="TRUE" | ||
used_files+="$file " | ||
Dockerfiles=$(find ./comps -name '*Dockerfile*'|sed 's/^\.\///') | ||
if [ -n "$Dockerfiles" ]; then | ||
for Dockerfile in $Dockerfiles; do | ||
service=$(echo "$Dockerfile" | awk -F '/' '{print $2}') | ||
if grep -q "$Dockerfile" ../GenAIExamples/**/*build.yaml*; then | ||
mode="" #CI | ||
else | ||
mode="-cd" #CD | ||
fi | ||
yaml_file=${{github.workspace}}/.github/workflows/docker/compose/$service'-compose'$mode'.yaml' | ||
if [ -e "$yaml_file" ]; then | ||
# check service yaml if exist | ||
if ! grep -q "$Dockerfile" "$yaml_file"; then | ||
echo "AR: Update $Dockerfile to .github/workflows/docker/compose/"$service"-compose"$mode".yaml." | ||
no_add="TRUE" | ||
fi | ||
else | ||
echo "AR: Create a new compose file .github/workflows/docker/compose/"$service"-compose"$mode".yaml for $Dockerfile and fill it in." | ||
no_add="TRUE" | ||
fi | ||
done | ||
fi | ||
if [[ "$is_use" == "TRUE" ]]; then | ||
echo "Warning: Changed Dockerfile paths:" | ||
echo "$used_files" | ||
echo "Please modify the corresponding README in GenAIComps." | ||
if [[ "$no_add" == "TRUE" ]]; then | ||
exit 1 | ||
fi | ||
- name: Check new Dockerfile in compose yaml | ||
- name: Check for the exist of Dockerfile in all yamls. | ||
if: always() | ||
run: | | ||
set -xe | ||
shopt -s globstar | ||
no_exist="FALSE" | ||
cd ${{github.workspace}} | ||
no_add="FALSE" | ||
merged_commit=$(git log -1 --format='%H') | ||
changed_files="$(git diff --name-status --diff-filter=A ${{ github.event.pull_request.base.sha }} ${merged_commit} -- '**/Dockerfile**' | cut -f2)" | ||
changed_yamls="$(git diff --name-status --diff-filter=AM ${{ github.event.pull_request.base.sha }} ${merged_commit} -- '**/*.yaml**' | cut -f2)" | ||
if [ -n "$changed_files" ]; then | ||
for file in $changed_files; do | ||
service=$(echo "$file" | awk -F '/' '{print $2}') | ||
if find "${{github.workspace}}/.github/workflows/docker/compose/" -name "*$service*" |grep -q .; then | ||
if [ -n "$changed_files" ] && grep -q $service'-compose-cd.yaml' <<< "$changed_yamls"; then | ||
echo "The $file has been added to the ${{github.workspace}}/.github/workflows/docker/compose/"$service"-compose-cd.yaml." | ||
else | ||
echo "Please check if the added $file is included in the yaml under path ${{github.workspace}}/.github/workflows/docker/compose/"$service"-compose-cd.yaml." | ||
no_add="TRUE" | ||
yamls=$(find .github/workflows/docker/compose/ -name '*.yaml') | ||
if [ -n "$yamls" ]; then | ||
for yaml in $yamls; do | ||
dockerfiles=$(grep 'dockerfile:' "$yaml"|sed 's/dockerfile: //') | ||
for dockerfile in $dockerfiles; do | ||
if [[ "$dockerfile" == *"comps/"* ]]; then | ||
if ! [ -e "$dockerfile" ]; then | ||
# cat "$yaml" | ||
echo "AR: The dockerfile path "$dockerfile" in "$yaml" does not exist, remove or update it." | ||
no_exist="TRUE" | ||
fi | ||
fi | ||
else | ||
echo "Please create a new compose file named "$service"-compose-cd.yaml in ${{github.workspace}}/.github/workflows/docker/compose/ for $file and fill it in." | ||
no_add="TRUE" | ||
fi | ||
done | ||
done | ||
fi | ||
if [[ "$no_add" == "TRUE" ]]; then | ||
if [[ "$no_exist" == "TRUE" ]]; then | ||
exit 1 | ||
fi | ||
|