Skip to content

Commit

Permalink
build and push new docker images into registry (#288)
Browse files Browse the repository at this point in the history
Signed-off-by: chensuyue <suyue.chen@intel.com>
  • Loading branch information
chensuyue authored Jul 11, 2024
1 parent f4b0298 commit 80da5a8
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 14 deletions.
26 changes: 12 additions & 14 deletions .github/workflows/reuse-get-test-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,26 +47,24 @@ jobs:
changed_files="$(git diff --name-only ${base_commit} ${merged_commit} | \
grep 'comps/' | grep -vE '*.md|*.txt|comps/cores')" || true
services=$(printf '%s\n' "${changed_files[@]}" | cut -d'/' -f2 | grep -vE '*.py' | sort -u) || true
path_level_1=("asr" "tts")
path_level_3=("llms/summarization" "llms/text-generation" "dataprep/redis" "retrievers/langchain")
run_matrix="{\"include\":["
for service in ${services}; do
hardware="gaudi" # default hardware, set based on the changed files
if [[ "${path_level_1[@]}" =~ "${service}" ]]; then
if [[ $(ls comps/${service} | grep -E "Dockerfile*|docker*") ]]; then
run_matrix="${run_matrix}{\"service\":\"${service}\",\"hardware\":\"${hardware}\"},"
else
vendors=$(printf '%s\n' "${changed_files[@]}" | grep ${service} | cut -d'/' -f3 | grep -vE '*.py|Dockerfile|*.md|*.sh' | sort -u)
for vendor in ${vendors}; do
if [[ "${path_level_3[@]}" =~ "${service}/${vendor}" ]]; then
sub_vendors=$(printf '%s\n' "${changed_files[@]}" | grep ${service} | grep ${vendor} | cut -d'/' -f4 | grep -vE '*.py' | sort -u)
for sub_vendor in ${sub_vendors}; do
run_matrix="${run_matrix}{\"service\":\"${service}/${vendor}/${sub_vendor}\",\"hardware\":\"${hardware}\"},"
done
else
run_matrix="${run_matrix}{\"service\":\"${service}/${vendor}\",\"hardware\":\"${hardware}\"},"
fi
vendors=$(printf '%s\n' "${changed_files[@]}" | grep ${service} | cut -d'/' -f3 | grep -vE '*.py|Dockerfile|*.sh|docker|*.yaml|*.yml' | sort -u)
for vendor in ${vendors}; do
if [[ $(ls comps/${service}/${vendor} | grep -E "Dockerfile*|docker*") ]]; then
run_matrix="${run_matrix}{\"service\":\"${service}/${vendor}\",\"hardware\":\"${hardware}\"},"
fi
sub_vendors=$(printf '%s\n' "${changed_files[@]}" | grep ${service} | grep ${vendor} | cut -d'/' -f4 | grep -vE '*.py|Dockerfile|*.sh|docker|*.yaml|*.yml' | sort -u)
for sub_vendor in ${sub_vendors}; do
if [[ $(ls comps/${service}/${vendor}/${sub_vendor} | grep -E "Dockerfile*|docker*") ]]; then
run_matrix="${run_matrix}{\"service\":\"${service}/${vendor}/${sub_vendor}\",\"hardware\":\"${hardware}\"},"
fi
done
fi
done
done
# add test for comps/dataprep/utils.py
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/scripts/docker_images_build_push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,15 @@ case ${micro_service} in
"llms/summarization/tgi")
IMAGE_NAME="opea/llm-docsum-tgi"
;;
"web_retrievers/langchain/chroma")
IMAGE_NAME="opea/web-retriever-chroma"
;;
"tts/speecht5")
IMAGE_NAME="opea/speecht5"
;;
"asr/whisper")
IMAGE_NAME="opea/whisper"
;;
*)
echo "Not supported yet"
exit 0
Expand Down
File renamed without changes.

0 comments on commit 80da5a8

Please sign in to comment.