@@ -45,26 +45,18 @@ function check_service_ready() {
4545
4646function build_docker_images() {
4747 opea_branch=${opea_branch:- " main" }
48- # If the opea_branch isn't main, replace the git clone branch in Dockerfile.
49- if [[ " ${opea_branch} " != " main" ]]; then
50- cd $WORKPATH
51- OLD_STRING=" RUN git clone --depth 1 https://github.com/opea-project/GenAIComps.git"
52- NEW_STRING=" RUN git clone --depth 1 --branch ${opea_branch} https://github.com/opea-project/GenAIComps.git"
53- find . -type f -name " Dockerfile*" | while read -r file; do
54- echo " Processing file: $file "
55- sed -i " s|$OLD_STRING |$NEW_STRING |g" " $file "
56- done
57- fi
5848
5949 cd $WORKPATH /docker_image_build
6050 git clone --depth 1 --branch ${opea_branch} https://github.com/opea-project/GenAIComps.git
51+ pushd GenAIComps
52+ echo " GenAIComps test commit is $( git rev-parse HEAD) "
53+ docker build --no-cache -t ${REGISTRY} /comps-base:${TAG} --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f Dockerfile .
54+ popd && sleep 1s
6155
6256 echo " Build all the images with --no-cache, check docker_image_build.log for details..."
6357 service_list=" multimodalqna multimodalqna-ui embedding-multimodal-bridgetower-gaudi embedding retriever speecht5 lvm dataprep whisper"
6458 docker compose -f build.yaml build ${service_list} --no-cache > ${LOG_PATH} /docker_image_build.log
6559
66- docker pull ghcr.io/huggingface/tgi-gaudi:2.3.1
67-
6860 docker images && sleep 1s
6961}
7062
@@ -366,25 +358,44 @@ function stop_docker() {
366358function main() {
367359
368360 setup_env
361+
362+ echo " ::group::stop_docker"
369363 stop_docker
364+ echo " ::endgroup::"
365+
366+ echo " ::group::build_docker_images"
370367 if [[ " $IMAGE_REPO " == " opea" ]]; then build_docker_images; fi
371- start_time=$( date +%s)
368+ echo " ::endgroup::"
369+
370+ echo " ::group::start_services"
372371 start_services
373- end_time= $( date +%s )
374- duration= $(( end_time - start_time ))
375- echo " Mega service start duration is $duration s " && sleep 1s
372+ echo " ::endgroup:: "
373+
374+ echo " ::group::prepare_data "
376375 prepare_data
376+ echo " ::endgroup::"
377377
378+ echo " ::group::validate_microservices"
378379 validate_microservices
379- echo " ==== microservices validated ===="
380+ echo " ::endgroup::"
381+
382+ echo " ::group::validate_megaservice"
380383 validate_megaservice
381- echo " ==== megaservice validated ===="
384+ echo " ::endgroup::"
385+
386+ echo " ::group::validate_delete"
382387 validate_delete
383- echo " ==== delete validated ==== "
388+ echo " ::endgroup:: "
384389
390+ echo " ::group::delete_data"
385391 delete_data
392+ echo " ::endgroup::"
393+
394+ echo " ::group::stop_docker"
386395 stop_docker
387- echo y | docker system prune
396+ echo " ::endgroup::"
397+
398+ docker system prune -f
388399
389400}
390401
0 commit comments