@@ -24,19 +24,13 @@ ip_address=$(hostname -I | awk '{print $1}')
2424
2525function build_docker_images() {
2626 opea_branch=${opea_branch:- " main" }
27- # If the opea_branch isn't main, replace the git clone branch in Dockerfile.
28- if [[ " ${opea_branch} " != " main" ]]; then
29- cd $WORKPATH
30- OLD_STRING=" RUN git clone --depth 1 https://github.com/opea-project/GenAIComps.git"
31- NEW_STRING=" RUN git clone --depth 1 --branch ${opea_branch} https://github.com/opea-project/GenAIComps.git"
32- find . -type f -name " Dockerfile*" | while read -r file; do
33- echo " Processing file: $file "
34- sed -i " s|$OLD_STRING |$NEW_STRING |g" " $file "
35- done
36- fi
3727
3828 cd $WORKPATH /docker_image_build
3929 git clone --depth 1 --branch ${opea_branch} https://github.com/opea-project/GenAIComps.git
30+ pushd GenAIComps
31+ echo " GenAIComps test commit is $( git rev-parse HEAD) "
32+ docker build --no-cache -t ${REGISTRY} /comps-base:${TAG} --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f Dockerfile .
33+ popd && sleep 1s
4034
4135 echo " Build all the images with --no-cache, check docker_image_build.log for details..."
4236 service_list=" avatarchatbot whisper-gaudi speecht5-gaudi wav2lip-gaudi animation"
@@ -128,19 +122,29 @@ function stop_docker() {
128122
129123
130124function main() {
125+ echo " ::group::stop_docker"
131126 stop_docker
132- echo y | docker builder prune --all
133- echo y | docker image prune
127+ echo " ::endgroup::"
128+ docker builder prune --all -f
129+ docker image prune -f
134130
131+ echo " ::group::build_docker_images"
135132 if [[ " $IMAGE_REPO " == " opea" ]]; then build_docker_images; fi
133+ echo " ::endgroup::"
134+
135+ echo " ::group::start_services"
136136 start_services
137- # validate_microservices
137+ echo " ::endgroup::"
138+
139+ echo " ::group::validate_megaservice"
138140 validate_megaservice
139- # validate_frontend
141+ echo " ::endgroup:: "
140142
143+ echo " ::group::stop_docker"
141144 stop_docker
142- echo y | docker builder prune --all
143- echo y | docker image prune
145+ echo " ::endgroup::"
146+ docker builder prune --all -f
147+ docker image prune -f
144148
145149}
146150
0 commit comments