@@ -16,15 +16,18 @@ LOG_PATH="$WORKPATH/tests"
1616ip_address=$( hostname -I | awk ' {print $1}' )
1717
1818function build_docker_images() {
19+ opea_branch=${opea_branch:- " main" }
1920 cd $WORKPATH /docker_image_build
20- git clone https://github.com/opea-project/GenAIComps.git && cd GenAIComps && git checkout " ${opea_branch:- " main" } " && cd ../
21+ 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
2126
2227 echo " Build all the images with --no-cache, check docker_image_build.log for details..."
2328 service_list=" searchqna searchqna-ui embedding web-retriever reranking llm-textgen nginx"
2429 docker compose -f build.yaml build ${service_list} --no-cache > ${LOG_PATH} /docker_image_build.log
2530
26- docker pull ghcr.io/huggingface/text-embeddings-inference:cpu-1.6
27- docker pull ghcr.io/huggingface/text-generation-inference:2.4.1-rocm
2831 docker images && sleep 1s
2932}
3033
@@ -38,7 +41,7 @@ function start_services() {
3841 docker compose up -d > ${LOG_PATH} /start_services_with_compose.log
3942 n=0
4043 until [[ " $n " -ge 100 ]]; do
41- docker logs search-tgi-service > $LOG_PATH /search-tgi-service_start.log
44+ docker logs search-tgi-service > $LOG_PATH /search-tgi-service_start.log 2>&1
4245 if grep -q Connected $LOG_PATH /search-tgi-service_start.log; then
4346 break
4447 fi
@@ -101,15 +104,31 @@ function stop_docker() {
101104
102105function main() {
103106
107+ echo " ::group::stop_docker"
104108 stop_docker
109+ echo " ::endgroup::"
110+
111+ echo " ::group::build_docker_images"
105112 if [[ " $IMAGE_REPO " == " opea" ]]; then build_docker_images; fi
113+ echo " ::endgroup::"
114+
115+ echo " ::group::start_services"
106116 start_services
117+ echo " ::endgroup::"
107118
119+ echo " ::group::validate_megaservice"
108120 validate_megaservice
121+ echo " ::endgroup::"
122+
123+ echo " ::group::validate_frontend"
109124 validate_frontend
125+ echo " ::endgroup::"
110126
127+ echo " ::group::stop_docker"
111128 stop_docker
112- echo y | docker system prune
129+ echo " ::endgroup::"
130+
131+ docker system prune -f
113132
114133}
115134
0 commit comments