Skip to content

Commit 9fec25e

Browse files
committed
Group log lines in GHA outputs for better readable logs.
Signed-off-by: chensuyue <suyue.chen@intel.com>
1 parent 13dd27e commit 9fec25e

6 files changed

+46
-71
lines changed

AgentQnA/docker_image_build/build.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ services:
1717
dockerfile: ./docker/Dockerfile
1818
extends: agent
1919
image: ${REGISTRY:-opea}/agent-ui:${TAG:-latest}
20+
vllm-gaudi:
21+
build:
22+
context: vllm-fork
23+
dockerfile: Dockerfile.hpu
24+
extends: chatqna
25+
image: ${REGISTRY:-opea}/vllm-gaudi:${TAG:-latest}
2026
vllm-rocm:
2127
build:
2228
args:

AgentQnA/tests/step1_build_images.sh

Lines changed: 6 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ function get_genai_comps() {
1515
fi
1616
}
1717

18-
1918
function build_docker_images_for_retrieval_tool(){
2019
cd $WORKDIR/GenAIExamples/DocIndexRetriever/docker_image_build/
2120
get_genai_comps
@@ -30,29 +29,15 @@ function build_docker_images_for_retrieval_tool(){
3029
function build_agent_docker_image() {
3130
cd $WORKDIR/GenAIExamples/AgentQnA/docker_image_build/
3231
get_genai_comps
33-
echo "Build agent image with --no-cache..."
34-
docker compose -f build.yaml build --no-cache
35-
}
3632

37-
function build_vllm_docker_image() {
38-
echo "Building the vllm docker image"
39-
cd $WORKPATH
40-
echo $WORKPATH
41-
if [ ! -d "./vllm-fork" ]; then
42-
git clone https://github.com/HabanaAI/vllm-fork.git
43-
fi
44-
cd ./vllm-fork
33+
git clone https://github.com/HabanaAI/vllm-fork.git && cd vllm-fork
4534
VLLM_VER=v0.6.6.post1+Gaudi-1.20.0
46-
git checkout ${VLLM_VER} &> /dev/null
47-
docker build --no-cache -f Dockerfile.hpu -t opea/vllm-gaudi:ci --shm-size=128g . --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy
48-
if [ $? -ne 0 ]; then
49-
echo "opea/vllm-gaudi:ci failed"
50-
exit 1
51-
else
52-
echo "opea/vllm-gaudi:ci successful"
53-
fi
54-
}
35+
git checkout ${VLLM_VER} &> /dev/null && cd ../
5536

37+
echo "Build agent image with --no-cache..."
38+
service_list="agent agent-ui vllm-gaudi"
39+
docker compose -f build.yaml build ${service_list} --no-cache
40+
}
5641

5742
function main() {
5843
echo "==================== Build docker images for retrieval tool ===================="
@@ -63,10 +48,6 @@ function main() {
6348
build_agent_docker_image
6449
echo "==================== Build agent docker image completed ===================="
6550

66-
echo "==================== Build vllm docker image ===================="
67-
build_vllm_docker_image
68-
echo "==================== Build vllm docker image completed ===================="
69-
7051
docker image ls | grep vllm
7152
}
7253

AgentQnA/tests/step1_build_images_rocm_vllm.sh

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,12 @@ export WORKDIR=${WORKPATH}/../../
88
echo "WORKDIR=${WORKDIR}"
99
export ip_address=$(hostname -I | awk '{print $1}')
1010

11-
1211
function get_genai_comps() {
1312
if [ ! -d "GenAIComps" ] ; then
1413
git clone --depth 1 --branch ${opea_branch:-"main"} https://github.com/opea-project/GenAIComps.git
1514
fi
1615
}
1716

18-
1917
function build_docker_images_for_retrieval_tool(){
2018
cd $WORKPATH/../DocIndexRetriever/docker_image_build/
2119
get_genai_comps
@@ -31,20 +29,12 @@ function build_agent_docker_image() {
3129
cd $WORKPATH/docker_image_build/
3230
get_genai_comps
3331
echo "Build agent image with --no-cache..."
34-
docker compose -f build.yaml build --no-cache
32+
service_list="agent agent-ui vllm-rocm"
33+
docker compose -f build.yaml build ${service_list} --no-cache
3534

3635
docker images && sleep 3s
3736
}
3837

39-
#function build_vllm_docker_image() {
40-
# echo "Building the vllm docker image"
41-
# cd $WORKPATH/
42-
# docker build --no-cache -t opea/llm-vllm-rocm:ci -f Dockerfile-vllm-rocm .
43-
#
44-
# docker images && sleep 3s
45-
#}
46-
47-
4838
function main() {
4939
echo "==================== Build docker images for retrieval tool ===================="
5040
build_docker_images_for_retrieval_tool
@@ -54,10 +44,6 @@ function main() {
5444
build_agent_docker_image
5545
echo "==================== Build agent docker image completed ===================="
5646

57-
# echo "==================== Build vllm docker image ===================="
58-
# build_vllm_docker_image
59-
# echo "==================== Build vllm docker image completed ===================="
60-
6147
docker image ls | grep vllm
6248
}
6349

AgentQnA/tests/test_compose_on_gaudi.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ function get_genai_comps() {
1818
fi
1919
}
2020

21-
2221
function build_agent_docker_image() {
2322
cd $WORKDIR/GenAIExamples/AgentQnA/docker_image_build/
2423
get_genai_comps
@@ -92,31 +91,32 @@ function stop_retrieval_tool() {
9291
done
9392
}
9493
echo "workpath: $WORKPATH"
95-
echo "=================== Stop containers ===================="
94+
echo "::group::=================== Stop containers ===================="
9695
stop_llm
9796
stop_crag
9897
stop_agent_containers
9998
stop_retrieval_tool
10099
stop_telemetry_containers
100+
echo "::endgroup::"
101101

102102
cd $WORKPATH/tests
103103

104-
echo "=================== #1 Building docker images===================="
104+
echo "::group::=================== #1 Building docker images===================="
105105
build_retrieval_docker_image
106106
build_agent_docker_image
107-
echo "=================== #1 Building docker images completed===================="
107+
echo "::endgroup::"
108108

109-
echo "=================== #4 Start agent, API server, retrieval, and ingest data===================="
109+
echo "::endgroup::=================== #4 Start agent, API server, retrieval, and ingest data===================="
110110
bash $WORKPATH/tests/step4_launch_and_validate_agent_gaudi.sh
111-
echo "=================== #4 Agent, retrieval test passed ===================="
111+
echo "::endgroup::"
112112

113-
echo "=================== #5 Stop agent and API server===================="
113+
echo "::endgroup::=================== #5 Stop agent and API server===================="
114114
stop_llm
115115
stop_crag
116116
stop_agent_containers
117117
stop_retrieval_tool
118118
stop_telemetry_containers
119-
echo "=================== #5 Agent and API server stopped===================="
119+
echo "::endgroup::"
120120

121121
echo y | docker system prune
122122

AgentQnA/tests/test_compose_on_rocm.sh

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,34 +37,35 @@ function stop_retrieval_tool() {
3737
done
3838
}
3939
echo "workpath: $WORKPATH"
40-
echo "=================== Stop containers ===================="
40+
echo "::group::=================== Stop containers ===================="
4141
stop_crag
4242
stop_agent_docker
4343
stop_retrieval_tool
44+
echo "::endgroup::=================== Stop containers completed ===================="
4445

4546
cd $WORKPATH/tests
4647

47-
echo "=================== #1 Building docker images===================="
48+
echo "::group::=================== #1 Building docker images===================="
4849
bash step1_build_images.sh
49-
echo "=================== #1 Building docker images completed===================="
50+
echo "::endgroup::=================== #1 Building docker images completed===================="
5051

51-
echo "=================== #2 Start retrieval tool===================="
52+
echo "::group::=================== #2 Start retrieval tool===================="
5253
bash step2_start_retrieval_tool.sh
53-
echo "=================== #2 Retrieval tool started===================="
54+
echo "::endgroup::=================== #2 Retrieval tool started===================="
5455

55-
echo "=================== #3 Ingest data and validate retrieval===================="
56+
echo "::group::=================== #3 Ingest data and validate retrieval===================="
5657
bash step3_ingest_data_and_validate_retrieval.sh
57-
echo "=================== #3 Data ingestion and validation completed===================="
58+
echo "::endgroup::=================== #3 Data ingestion and validation completed===================="
5859

59-
echo "=================== #4 Start agent and API server===================="
60+
echo "::group::=================== #4 Start agent and API server===================="
6061
bash step4a_launch_and_validate_agent_tgi_on_rocm.sh
61-
echo "=================== #4 Agent test passed ===================="
62+
echo "::endgroup::=================== #4 Agent test passed ===================="
6263

63-
echo "=================== #5 Stop agent and API server===================="
64+
echo "::group::=================== #5 Stop agent and API server===================="
6465
stop_crag
6566
stop_agent_docker
6667
stop_retrieval_tool
67-
echo "=================== #5 Agent and API server stopped===================="
68+
echo "::endgroup::=================== #5 Agent and API server stopped===================="
6869

6970
echo y | docker system prune
7071

AgentQnA/tests/test_compose_vllm_on_rocm.sh

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,34 +32,35 @@ function stop_retrieval_tool() {
3232
}
3333

3434
echo "workpath: $WORKPATH"
35-
echo "=================== Stop containers ===================="
35+
echo "::group::=================== Stop containers ===================="
3636
stop_crag
3737
stop_agent_docker
3838
stop_retrieval_tool
39+
echo "::endgroup::"
3940

4041
cd $WORKPATH/tests
4142

42-
echo "=================== #1 Building docker images===================="
43+
echo "::group::=================== #1 Building docker images===================="
4344
bash step1_build_images_rocm_vllm.sh
44-
echo "=================== #1 Building docker images completed===================="
45+
echo "::endgroup::=================== #1 Building docker images completed===================="
4546

46-
echo "=================== #2 Start retrieval tool===================="
47+
echo "::group::=================== #2 Start retrieval tool===================="
4748
bash step2_start_retrieval_tool_rocm_vllm.sh
48-
echo "=================== #2 Retrieval tool started===================="
49+
echo "::endgroup::=================== #2 Retrieval tool started===================="
4950

50-
echo "=================== #3 Ingest data and validate retrieval===================="
51+
echo "::group::=================== #3 Ingest data and validate retrieval===================="
5152
bash step3_ingest_data_and_validate_retrieval_rocm_vllm.sh
52-
echo "=================== #3 Data ingestion and validation completed===================="
53+
echo "::endgroup::=================== #3 Data ingestion and validation completed===================="
5354

54-
echo "=================== #4 Start agent and API server===================="
55+
echo "::group::=================== #4 Start agent and API server===================="
5556
bash step4_launch_and_validate_agent_rocm_vllm.sh
56-
echo "=================== #4 Agent test passed ===================="
57+
echo "::endgroup::=================== #4 Agent test passed ===================="
5758

58-
echo "=================== #5 Stop agent and API server===================="
59+
echo "::group::=================== #5 Stop agent and API server===================="
5960
stop_crag
6061
stop_agent_docker
6162
stop_retrieval_tool
62-
echo "=================== #5 Agent and API server stopped===================="
63+
echo "::endgroup::=================== #5 Agent and API server stopped===================="
6364

6465
echo y | docker system prune
6566

0 commit comments

Comments
 (0)