@@ -17,24 +17,17 @@ ip_address=$(hostname -I | awk '{print $1}')
1717
1818function build_docker_images() {
1919 opea_branch=${opea_branch:- " main" }
20- # If the opea_branch isn't main, replace the git clone branch in Dockerfile.
21- if [[ " ${opea_branch} " != " main" ]]; then
22- cd $WORKPATH
23- OLD_STRING=" RUN git clone --depth 1 https://github.com/opea-project/GenAIComps.git"
24- NEW_STRING=" RUN git clone --depth 1 --branch ${opea_branch} https://github.com/opea-project/GenAIComps.git"
25- find . -type f -name " Dockerfile*" | while read -r file; do
26- echo " Processing file: $file "
27- sed -i " s|$OLD_STRING |$NEW_STRING |g" " $file "
28- done
29- fi
30-
3120 cd $WORKPATH /docker_image_build
3221 git clone --depth 1 --branch ${opea_branch} https://github.com/opea-project/GenAIComps.git
22+ pushd GenAIComps
23+ echo " GenAIComps test commit is $( git rev-parse HEAD) "
24+ docker build --no-cache -t ${REGISTRY} /comps-base:${TAG} --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f Dockerfile .
25+ popd && sleep 1s
3326
3427 echo " Build all the images with --no-cache, check docker_image_build.log for details..."
35- docker compose -f build.yaml build --no-cache > ${LOG_PATH} /docker_image_build.log
28+ service_list=" visualqna visualqna-ui lvm nginx"
29+ docker compose -f build.yaml build ${service_list} --no-cache > ${LOG_PATH} /docker_image_build.log
3630
37- docker pull ghcr.io/huggingface/tgi-gaudi:2.0.6
3831 docker images && sleep 1s
3932}
4033
@@ -200,22 +193,36 @@ function validate_frontend() {
200193
201194function stop_docker() {
202195 cd $WORKPATH /docker_compose/intel/hpu/gaudi
203- docker compose stop && docker compose rm -f
196+ docker compose -f compose_tgi.yaml down
204197}
205198
206199function main() {
207200
201+ echo " ::group::stop_docker"
208202 stop_docker
203+ echo " ::endgroup::"
209204
205+ echo " ::group::build_docker_images"
210206 if [[ " $IMAGE_REPO " == " opea" ]]; then build_docker_images; fi
207+ echo " ::endgroup::"
208+
209+ echo " ::group::start_services"
211210 start_services
211+ echo " ::endgroup::"
212212
213+ echo " ::group::validate_microservices"
213214 validate_microservices
215+ echo " ::endgroup::"
216+
217+ echo " ::group::validate_megaservice"
214218 validate_megaservice
215- # validate_frontend
219+ echo " ::endgroup:: "
216220
221+ echo " ::group::stop_docker"
217222 stop_docker
218- echo y | docker system prune
223+ echo " ::endgroup::"
224+
225+ docker system prune -f
219226
220227}
221228
0 commit comments