@@ -17,25 +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..."
3528 service_list=" translation translation-ui llm-textgen nginx"
3629 docker compose -f build.yaml build ${service_list} --no-cache > ${LOG_PATH} /docker_image_build.log
3730
38- docker pull ghcr.io/huggingface/text-generation-inference:2.4.1-rocm
3931 docker images && sleep 1s
4032}
4133
@@ -53,7 +45,7 @@ function start_services() {
5345 n=0
5446 # wait long for llm model download
5547 until [[ " $n " -ge 500 ]]; do
56- docker logs translation-tgi-service > ${LOG_PATH} /translation-tgi-service_start.log
48+ docker logs translation-tgi-service > ${LOG_PATH} /translation-tgi-service_start.log 2>&1
5749 if grep -q Connected ${LOG_PATH} /translation-tgi-service_start.log; then
5850 break
5951 fi
@@ -163,17 +155,35 @@ function stop_docker() {
163155
164156function main() {
165157
158+ echo " ::group::stop_docker"
166159 stop_docker
160+ echo " ::endgroup::"
167161
162+ echo " ::group::build_docker_images"
168163 if [[ " $IMAGE_REPO " == " opea" ]]; then build_docker_images; fi
164+ echo " ::endgroup::"
165+
166+ echo " ::group::start_services"
169167 start_services
168+ echo " ::endgroup::"
170169
170+ echo " ::group::validate_microservices"
171171 validate_microservices
172+ echo " ::endgroup::"
173+
174+ echo " ::group::validate_megaservice"
172175 validate_megaservice
176+ echo " ::endgroup::"
177+
178+ echo " ::group::validate_frontend"
173179 validate_frontend
180+ echo " ::endgroup::"
174181
182+ echo " ::group::stop_docker"
175183 stop_docker
176- echo y | docker system prune
184+ echo " ::endgroup::"
185+
186+ docker system prune -f
177187
178188}
179189
0 commit comments