Skip to content

Commit

Permalink
update test scripts
Browse files Browse the repository at this point in the history
Signed-off-by: Chun Tao <chun.tao@intel.com>
  • Loading branch information
ctao456 committed Oct 22, 2024
1 parent 8207732 commit 14a2916
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 21 deletions.
28 changes: 17 additions & 11 deletions AvatarChatbot/tests/test_compose_on_gaudi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,22 @@ function start_services() {
# Start Docker Containers
docker compose up -d
n=0
until [[ "$n" -ge 200 ]]; do
# check tgi and whisper services
docker logs llm-tgi-gaudi-server > $LOG_PATH/llm-tgi-gaudi-server_start.log
docker logs asr-service > $LOG_PATH/asr_service_start.log

if grep -q "initialized" $LOG_PATH/asr_service_start.log; then
break
fi
sleep 1s
until [[ "$n" -ge 100 ]]; do
docker logs tgi-gaudi-server > $LOG_PATH/tgi_service_start.log
if grep -q Connected $LOG_PATH/tgi_service_start.log; then
break
fi
sleep 5s
n=$((n+1))
done

n=0
until [[ "$n" -ge 100 ]]; do
docker logs whisper-service > $LOG_PATH/whisper_service_start.log
if grep -q "Uvicorn server setup on port" $LOG_PATH/whisper_service_start.log; then
break
fi
sleep 5s
n=$((n+1))
done
echo "All services are up and running"
Expand All @@ -93,7 +100,6 @@ function start_services() {


function validate_megaservice() {
cd $WORKPATH
result=$(http_proxy="" curl http://${ip_address}:3009/v1/avatarchatbot -X POST -d @sample_whoareyou.json -H 'Content-Type: application/json')
echo "result is === $result"
if [[ $result == *"mp4"* ]]; then
Expand Down Expand Up @@ -131,7 +137,7 @@ function main() {
stop_docker
if [[ "$IMAGE_REPO" == "opea" ]]; then build_docker_images; fi
start_services
validate_microservices
# validate_microservices
validate_megaservice
# validate_frontend
stop_docker
Expand Down
17 changes: 7 additions & 10 deletions AvatarChatbot/tests/test_compose_on_xeon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,12 @@ function start_services() {
# Start Docker Containers
docker compose up -d
n=0
until [[ "$n" -ge 200 ]]; do
# check tgi and whisper services
docker logs llm-tgi-server > $LOG_PATH/llm-tgi-server_start.log
docker logs asr-service > $LOG_PATH/asr_service_start.log

if grep -q "initialized" $LOG_PATH/asr_service_start.log; then
break
fi
sleep 1s
until [[ "$n" -ge 100 ]]; do
docker logs tgi-service > $LOG_PATH/tgi_service_start.log
if grep -q Connected $LOG_PATH/tgi_service_start.log; then
break
fi
sleep 5s
n=$((n+1))
done
echo "All services are up and running"
Expand Down Expand Up @@ -131,7 +128,7 @@ function main() {
stop_docker
if [[ "$IMAGE_REPO" == "opea" ]]; then build_docker_images; fi
start_services
validate_microservices
# validate_microservices
validate_megaservice
# validate_frontend
stop_docker
Expand Down

0 comments on commit 14a2916

Please sign in to comment.