@@ -15,68 +15,15 @@ LOG_PATH="$WORKPATH/tests"
1515ip_address=$( hostname -I | awk ' {print $1}' )
1616export host_ip=${ip_address}
1717
18- function setup_env() {
19- export HF_TOKEN=${HF_TOKEN}
20-
21- export INDEX_NAME=" mega-videoqna"
22- export LLM_DOWNLOAD=" True" # Set to "False" before redeploy LVM server to avoid model download
23- export RERANK_COMPONENT_NAME=" OPEA_VIDEO_RERANKING"
24- export LVM_COMPONENT_NAME=" OPEA_VIDEO_LLAMA_LVM"
25- export EMBEDDING_COMPONENT_NAME=" OPEA_CLIP_EMBEDDING"
26- export USECLIP=1
27- export LOGFLAG=True
28-
29- export EMBEDDING_SERVICE_HOST_IP=${host_ip}
30- export LVM_SERVICE_HOST_IP=${host_ip}
31- export MEGA_SERVICE_HOST_IP=${host_ip}
32- export RERANK_SERVICE_HOST_IP=${host_ip}
33- export RETRIEVER_SERVICE_HOST_IP=${host_ip}
34- export VDMS_HOST=${host_ip}
35-
36- export BACKEND_PORT=8888
37- export DATAPREP_PORT=6007
38- export EMBEDDER_PORT=6990
39- export MULTIMODAL_CLIP_EMBEDDER_PORT=6991
40- export LVM_PORT=9399
41- export RERANKING_PORT=8000
42- export RETRIEVER_PORT=7000
43- export UI_PORT=5173
44- export VDMS_PORT=8001
45- export VIDEO_LLAMA_PORT=9009
46-
47- export BACKEND_HEALTH_CHECK_ENDPOINT=" http://${host_ip} :${BACKEND_PORT} /v1/health_check"
48- export BACKEND_SERVICE_ENDPOINT=" http://${host_ip} :${BACKEND_PORT} /v1/videoqna"
49- export CLIP_EMBEDDING_ENDPOINT=" http://${host_ip} :${MULTIMODAL_CLIP_EMBEDDER_PORT} "
50- export DATAPREP_GET_FILE_ENDPOINT=" http://${host_ip} :${DATAPREP_PORT} /v1/dataprep/get"
51- export DATAPREP_GET_VIDEO_LIST_ENDPOINT=" http://${host_ip} :${DATAPREP_PORT} /v1/dataprep/get_videos"
52- export DATAPREP_INGEST_SERVICE_ENDPOINT=" http://${host_ip} :${DATAPREP_PORT} /v1/dataprep/ingest_videos"
53- export EMBEDDING_ENDPOINT=" http://${host_ip} :${EMBEDDER_PORT} /v1/embeddings"
54- export FRONTEND_ENDPOINT=" http://${host_ip} :${UI_PORT} /_stcore/health"
55- export LVM_ENDPOINT=" http://${host_ip} :${VIDEO_LLAMA_PORT} "
56- export LVM_VIDEO_ENDPOINT=" http://${host_ip} :${VIDEO_LLAMA_PORT} /generate"
57- export RERANKING_ENDPOINT=" http://${host_ip} :${RERANKING_PORT} /v1/reranking"
58- export RETRIEVER_ENDPOINT=" http://${host_ip} :${RETRIEVER_PORT} /v1/retrieval"
59- export TEI_RERANKING_ENDPOINT=" http://${host_ip} :${TEI_RERANKING_PORT} "
60- export UI_ENDPOINT=" http://${host_ip} :${UI_PORT} /_stcore/health"
61-
62- export no_proxy=" ${NO_PROXY} ,${host_ip} ,vdms-vector-db,dataprep-vdms-server,clip-embedding-server,reranking-tei-server,retriever-vdms-server,lvm-video-llama,lvm,videoqna-xeon-backend-server,videoqna-xeon-ui-server"
63- }
6418
6519function build_docker_images() {
6620 opea_branch=${opea_branch:- " main" }
67- # If the opea_branch isn't main, replace the git clone branch in Dockerfile.
68- if [[ " ${opea_branch} " != " main" ]]; then
69- cd $WORKPATH
70- OLD_STRING=" RUN git clone --depth 1 https://github.com/opea-project/GenAIComps.git"
71- NEW_STRING=" RUN git clone --depth 1 --branch ${opea_branch} https://github.com/opea-project/GenAIComps.git"
72- find . -type f -name " Dockerfile*" | while read -r file; do
73- echo " Processing file: $file "
74- sed -i " s|$OLD_STRING |$NEW_STRING |g" " $file "
75- done
76- fi
77-
7821 cd $WORKPATH /docker_image_build
79- git clone --depth 1 --branch ${opea_branch} https://github.com/opea-project/GenAIComps.git GenAIComps
22+ git clone --depth 1 --branch ${opea_branch} https://github.com/opea-project/GenAIComps.git
23+ pushd GenAIComps
24+ echo " GenAIComps test commit is $( git rev-parse HEAD) "
25+ docker build --no-cache -t ${REGISTRY} /comps-base:${TAG} --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f Dockerfile .
26+ popd && sleep 1s
8027
8128 # Create .cache directory for cache volume to connect (avoids permission denied error)
8229 OLD_STRING=" mkdir -p /home/user "
@@ -88,13 +35,13 @@ function build_docker_images() {
8835 echo " Build all the images with --no-cache, check docker_image_build.log for details..."
8936 docker compose -f build.yaml build --no-cache > ${LOG_PATH} /docker_image_build.log 2>&1
9037
91- docker pull intellabs/vdms:latest
9238 docker images && sleep 1s
9339}
9440
9541function start_services() {
9642 echo " Starting services..."
9743 cd $WORKPATH /docker_compose/intel/cpu/xeon/
44+ source ./set_env.sh
9845
9946 docker volume create video-llama-model
10047 docker volume create videoqna-cache
@@ -331,23 +278,35 @@ function stop_docker() {
331278
332279function main() {
333280
334- setup_env
281+ echo " ::group::stop_docker "
335282 stop_docker
283+ echo " ::endgroup::"
336284
285+ echo " ::group::build_docker_images"
337286 if [[ " $IMAGE_REPO " == " opea" ]]; then build_docker_images; fi
287+ echo " ::endgroup::"
338288
339- start_time= $( date +%s )
289+ echo " ::group::start_services "
340290 start_services
341- end_time=$( date +%s)
342- duration=$(( end_time- start_time))
343- echo " Mega service start duration is $duration s" && sleep 1s
291+ echo " ::endgroup::"
344292
293+ echo " ::group::validate_microservices"
345294 validate_microservices
295+ echo " ::endgroup::"
296+
297+ echo " ::group::validate_megaservice"
346298 validate_megaservice
299+ echo " ::endgroup::"
300+
301+ echo " ::group::validate_frontend"
347302 validate_frontend
303+ echo " ::endgroup::"
348304
305+ echo " ::group::stop_docker"
349306 stop_docker
350- echo y | docker system prune
307+ echo " ::endgroup::"
308+
309+ docker system prune -f
351310
352311}
353312
0 commit comments