Skip to content

Commit f90a6d2

Browse files
authored
[CICD enhance] EdgeCraftRAG run CI with latest base image, group logs in GHA outputs. (#1877)
Signed-off-by: chensuyue <[email protected]>
1 parent 1fdab59 commit f90a6d2

File tree

7 files changed

+62
-25
lines changed

7 files changed

+62
-25
lines changed

AudioQnA/Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
ARG IMAGE_REPO=opea
55
ARG BASE_TAG=latest
6-
FROM opea/comps-base:$BASE_TAG
76
FROM $IMAGE_REPO/comps-base:$BASE_TAG
87

98
COPY ./audioqna.py $HOME/audioqna.py

AudioQnA/Dockerfile.multilang

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
ARG IMAGE_REPO=opea
55
ARG BASE_TAG=latest
6-
FROM opea/comps-base:$BASE_TAG
76
FROM $IMAGE_REPO/comps-base:$BASE_TAG
87

98
COPY ./audioqna_multilang.py $HOME/audioqna_multilang.py

EdgeCraftRAG/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
# Copyright (C) 2024 Intel Corporation
22
# SPDX-License-Identifier: Apache-2.0
33

4+
ARG IMAGE_REPO=opea
45
ARG BASE_TAG=latest
5-
FROM opea/comps-base:$BASE_TAG
6+
FROM $IMAGE_REPO/comps-base:$BASE_TAG
67

78
COPY ./chatqna.py $HOME/chatqna.py
89

EdgeCraftRAG/docker_compose/intel/gpu/arc/compose_vllm.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ services:
6363
- ecrag
6464
vllm-openvino-server:
6565
container_name: vllm-openvino-server
66-
image: opea/vllm-arc:latest
66+
image: ${REGISTRY:-opea}/vllm-arc:${TAG:-latest}
6767
ports:
6868
- ${VLLM_SERVICE_PORT:-8008}:80
6969
environment:

EdgeCraftRAG/docker_image_build/build.yaml

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,33 @@
22
# SPDX-License-Identifier: Apache-2.0
33

44
services:
5-
edgecraftrag-server:
5+
edgecraftrag:
66
build:
77
context: ../
88
args:
9+
IMAGE_REPO: ${REGISTRY}
10+
BASE_TAG: ${TAG}
911
http_proxy: ${http_proxy}
1012
https_proxy: ${https_proxy}
13+
dockerfile: ./Dockerfile
14+
image: ${REGISTRY:-opea}/edgecraftrag:${TAG:-latest}
15+
edgecraftrag-server:
16+
build:
1117
dockerfile: ./Dockerfile.server
18+
extends: edgecraftrag
1219
image: ${REGISTRY:-opea}/edgecraftrag-server:${TAG:-latest}
1320
edgecraftrag-ui:
1421
build:
15-
context: ../
16-
args:
17-
http_proxy: ${http_proxy}
18-
https_proxy: ${https_proxy}
1922
dockerfile: ./ui/docker/Dockerfile.ui
23+
extends: edgecraftrag
2024
image: ${REGISTRY:-opea}/edgecraftrag-ui:${TAG:-latest}
2125
edgecraftrag-ui-gradio:
2226
build:
23-
context: ../
24-
args:
25-
http_proxy: ${http_proxy}
26-
https_proxy: ${https_proxy}
2727
dockerfile: ./ui/docker/Dockerfile.gradio
28+
extends: edgecraftrag
2829
image: ${REGISTRY:-opea}/edgecraftrag-ui-gradio:${TAG:-latest}
29-
edgecraftrag:
30+
vllm-arc:
3031
build:
31-
context: ../
32-
args:
33-
http_proxy: ${http_proxy}
34-
https_proxy: ${https_proxy}
35-
dockerfile: ./Dockerfile
36-
image: ${REGISTRY:-opea}/edgecraftrag:${TAG:-latest}
32+
context: GenAIComps
33+
dockerfile: comps/third_parties/vllm/src/Dockerfile.intel_gpu
34+
image: ${REGISTRY:-opea}/vllm-arc:${TAG:-latest}

EdgeCraftRAG/tests/test_compose_on_arc.sh

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,16 @@ HF_ENDPOINT=https://hf-mirror.com
3030

3131

3232
function build_docker_images() {
33+
opea_branch=${opea_branch:-"main"}
3334
cd $WORKPATH/docker_image_build
35+
git clone --depth 1 --branch ${opea_branch} https://github.com/opea-project/GenAIComps.git
36+
pushd GenAIComps
37+
echo "GenAIComps test commit is $(git rev-parse HEAD)"
38+
docker build --no-cache -t ${REGISTRY}/comps-base:${TAG} --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f Dockerfile .
39+
popd && sleep 1s
40+
3441
echo "Build all the images with --no-cache, check docker_image_build.log for details..."
42+
service_list="edgecraftrag edgecraftrag-server edgecraftrag-ui"
3543
docker compose -f build.yaml build --no-cache > ${LOG_PATH}/docker_image_build.log
3644

3745
docker images && sleep 1s
@@ -102,16 +110,30 @@ function stop_docker() {
102110
function main() {
103111
mkdir -p $LOG_PATH
104112

113+
echo "::group::stop_docker"
105114
stop_docker
115+
echo "::endgroup::"
116+
117+
echo "::group::build_docker_images"
106118
if [[ "$IMAGE_REPO" == "opea" ]]; then build_docker_images; fi
119+
echo "::endgroup::"
120+
121+
echo "::group::start_services"
107122
start_services
108-
echo "EC_RAG service started" && sleep 1s
123+
echo "::endgroup::"
109124

125+
echo "::group::validate_rag"
110126
validate_rag
127+
echo "::endgroup::"
128+
129+
echo "::group::validate_megaservice"
111130
validate_megaservice
131+
echo "::endgroup::"
112132

133+
echo "::group::stop_docker"
113134
stop_docker
114135
echo y | docker system prune
136+
echo "::endgroup::"
115137

116138
}
117139

EdgeCraftRAG/tests/test_compose_vllm_on_arc.sh

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,14 @@ vLLM_ENDPOINT="http://${HOST_IP}:${VLLM_SERVICE_PORT}"
3333

3434

3535
function build_docker_images() {
36+
opea_branch=${opea_branch:-"main"}
3637
cd $WORKPATH/docker_image_build
38+
git clone --depth 1 --branch ${opea_branch} https://github.com/opea-project/GenAIComps.git
39+
pushd GenAIComps
40+
echo "GenAIComps test commit is $(git rev-parse HEAD)"
41+
docker build --no-cache -t ${REGISTRY}/comps-base:${TAG} --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f Dockerfile .
42+
popd && sleep 1s
43+
3744
echo "Build all the images with --no-cache, check docker_image_build.log for details..."
3845
docker compose -f build.yaml build --no-cache > ${LOG_PATH}/docker_image_build.log
3946

@@ -152,19 +159,30 @@ function stop_docker() {
152159
function main() {
153160
mkdir -p "$LOG_PATH"
154161

162+
echo "::group::stop_docker"
155163
stop_docker
164+
echo "::endgroup::"
165+
166+
echo "::group::build_docker_images"
156167
if [[ "$IMAGE_REPO" == "opea" ]]; then build_docker_images; fi
157-
start_time=$(date +%s)
168+
echo "::endgroup::"
169+
170+
echo "::group::start_services"
158171
start_services
159-
end_time=$(date +%s)
160-
duration=$((end_time-start_time))
161-
echo "EC_RAG service start duration is $duration s" && sleep 1s
172+
echo "::endgroup::"
162173

174+
echo "::group::validate_rag"
163175
validate_rag
176+
echo "::endgroup::"
177+
178+
echo "::group::validate_megaservice"
164179
validate_megaservice
180+
echo "::endgroup::"
165181

182+
echo "::group::stop_docker"
166183
stop_docker
167184
echo y | docker system prune
185+
echo "::endgroup::"
168186

169187
}
170188

0 commit comments

Comments
 (0)