Adding Chatqna Benchmark Test (#404)
Signed-off-by: zepan <ze.pan@intel.com>
This commit is contained in:
@@ -67,11 +67,15 @@ function start_services() {
|
||||
if [[ "$IMAGE_REPO" != "" ]]; then
|
||||
# Replace the container name with a test-specific name
|
||||
echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
|
||||
sed -i "s#image: opea/chatqna:latest#image: opea/chatqna:${IMAGE_TAG}#g" docker_compose.yaml
|
||||
sed -i "s#image: opea/chatqna-ui:latest#image: opea/chatqna-ui:${IMAGE_TAG}#g" docker_compose.yaml
|
||||
sed -i "s#image: opea/chatqna-conversation-ui:latest#image: opea/chatqna-conversation-ui:${IMAGE_TAG}#g" docker_compose.yaml
|
||||
sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" docker_compose.yaml
|
||||
sed -i "s#image: ${IMAGE_REPO}opea/tei-gaudi:latest#image: opea/tei-gaudi:latest#g" docker_compose.yaml
|
||||
if [ "${mode}" == "perf" ]; then
|
||||
sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" docker_compose.yaml
|
||||
else
|
||||
sed -i "s#image: opea/chatqna:latest#image: opea/chatqna:${IMAGE_TAG}#g" docker_compose.yaml
|
||||
sed -i "s#image: opea/chatqna-ui:latest#image: opea/chatqna-ui:${IMAGE_TAG}#g" docker_compose.yaml
|
||||
sed -i "s#image: opea/chatqna-conversation-ui:latest#image: opea/chatqna-conversation-ui:${IMAGE_TAG}#g" docker_compose.yaml
|
||||
sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" docker_compose.yaml
|
||||
sed -i "s#image: ${IMAGE_REPO}opea/tei-gaudi:latest#image: opea/tei-gaudi:latest#g" docker_compose.yaml
|
||||
fi
|
||||
echo "cat docker_compose.yaml"
|
||||
cat docker_compose.yaml
|
||||
fi
|
||||
@@ -236,9 +240,13 @@ function main() {
|
||||
duration=$((end_time-start_time))
|
||||
echo "Mega service start duration is $duration s"
|
||||
|
||||
validate_microservices
|
||||
validate_megaservice
|
||||
# validate_frontend
|
||||
if [ "${mode}" == "perf" ]; then
|
||||
python3 $WORKPATH/tests/chatqna_benchmark.py
|
||||
elif [ "${mode}" == "" ]; then
|
||||
validate_microservices
|
||||
validate_megaservice
|
||||
# validate_frontend
|
||||
fi
|
||||
|
||||
stop_docker
|
||||
echo y | docker system prune
|
||||
|
||||
@@ -54,10 +54,14 @@ function start_services() {
|
||||
if [[ "$IMAGE_REPO" != "" ]]; then
|
||||
# Replace the container name with a test-specific name
|
||||
echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
|
||||
sed -i "s#image: opea/chatqna:latest#image: opea/chatqna:${IMAGE_TAG}#g" docker_compose.yaml
|
||||
sed -i "s#image: opea/chatqna-ui:latest#image: opea/chatqna-ui:${IMAGE_TAG}#g" docker_compose.yaml
|
||||
sed -i "s#image: opea/chatqna-conversation-ui:latest#image: opea/chatqna-conversation-ui:${IMAGE_TAG}#g" docker_compose.yaml
|
||||
sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" docker_compose.yaml
|
||||
if [ "${mode}" == "perf" ]; then
|
||||
sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" docker_compose.yaml
|
||||
else
|
||||
sed -i "s#image: opea/chatqna:latest#image: opea/chatqna:${IMAGE_TAG}#g" docker_compose.yaml
|
||||
sed -i "s#image: opea/chatqna-ui:latest#image: opea/chatqna-ui:${IMAGE_TAG}#g" docker_compose.yaml
|
||||
sed -i "s#image: opea/chatqna-conversation-ui:latest#image: opea/chatqna-conversation-ui:${IMAGE_TAG}#g" docker_compose.yaml
|
||||
sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" docker_compose.yaml
|
||||
fi
|
||||
fi
|
||||
|
||||
# Start Docker Containers
|
||||
@@ -220,9 +224,13 @@ function main() {
|
||||
duration=$((end_time-start_time))
|
||||
echo "Mega service start duration is $duration s" && sleep 1s
|
||||
|
||||
validate_microservices
|
||||
validate_megaservice
|
||||
validate_frontend
|
||||
if [ "${mode}" == "perf" ]; then
|
||||
python3 $WORKPATH/tests/chatqna_benchmark.py
|
||||
elif [ "${mode}" == "" ]; then
|
||||
validate_microservices
|
||||
validate_megaservice
|
||||
validate_frontend
|
||||
fi
|
||||
|
||||
stop_docker
|
||||
echo y | docker system prune
|
||||
|
||||
Reference in New Issue
Block a user