[CICD enhance] EdgeCraftRAG run CI with latest base image, group logs in GHA outputs. (#1877)
Signed-off-by: chensuyue <suyue.chen@intel.com>
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
|
||||
ARG IMAGE_REPO=opea
|
||||
ARG BASE_TAG=latest
|
||||
FROM opea/comps-base:$BASE_TAG
|
||||
FROM $IMAGE_REPO/comps-base:$BASE_TAG
|
||||
|
||||
COPY ./audioqna.py $HOME/audioqna.py
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
|
||||
ARG IMAGE_REPO=opea
|
||||
ARG BASE_TAG=latest
|
||||
FROM opea/comps-base:$BASE_TAG
|
||||
FROM $IMAGE_REPO/comps-base:$BASE_TAG
|
||||
|
||||
COPY ./audioqna_multilang.py $HOME/audioqna_multilang.py
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
# Copyright (C) 2024 Intel Corporation
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
ARG IMAGE_REPO=opea
|
||||
ARG BASE_TAG=latest
|
||||
FROM opea/comps-base:$BASE_TAG
|
||||
FROM $IMAGE_REPO/comps-base:$BASE_TAG
|
||||
|
||||
COPY ./chatqna.py $HOME/chatqna.py
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ services:
|
||||
- ecrag
|
||||
vllm-openvino-server:
|
||||
container_name: vllm-openvino-server
|
||||
image: opea/vllm-arc:latest
|
||||
image: ${REGISTRY:-opea}/vllm-arc:${TAG:-latest}
|
||||
ports:
|
||||
- ${VLLM_SERVICE_PORT:-8008}:80
|
||||
environment:
|
||||
|
||||
@@ -2,35 +2,33 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
services:
|
||||
edgecraftrag-server:
|
||||
build:
|
||||
context: ../
|
||||
args:
|
||||
http_proxy: ${http_proxy}
|
||||
https_proxy: ${https_proxy}
|
||||
dockerfile: ./Dockerfile.server
|
||||
image: ${REGISTRY:-opea}/edgecraftrag-server:${TAG:-latest}
|
||||
edgecraftrag-ui:
|
||||
build:
|
||||
context: ../
|
||||
args:
|
||||
http_proxy: ${http_proxy}
|
||||
https_proxy: ${https_proxy}
|
||||
dockerfile: ./ui/docker/Dockerfile.ui
|
||||
image: ${REGISTRY:-opea}/edgecraftrag-ui:${TAG:-latest}
|
||||
edgecraftrag-ui-gradio:
|
||||
build:
|
||||
context: ../
|
||||
args:
|
||||
http_proxy: ${http_proxy}
|
||||
https_proxy: ${https_proxy}
|
||||
dockerfile: ./ui/docker/Dockerfile.gradio
|
||||
image: ${REGISTRY:-opea}/edgecraftrag-ui-gradio:${TAG:-latest}
|
||||
edgecraftrag:
|
||||
build:
|
||||
context: ../
|
||||
args:
|
||||
IMAGE_REPO: ${REGISTRY}
|
||||
BASE_TAG: ${TAG}
|
||||
http_proxy: ${http_proxy}
|
||||
https_proxy: ${https_proxy}
|
||||
dockerfile: ./Dockerfile
|
||||
image: ${REGISTRY:-opea}/edgecraftrag:${TAG:-latest}
|
||||
edgecraftrag-server:
|
||||
build:
|
||||
dockerfile: ./Dockerfile.server
|
||||
extends: edgecraftrag
|
||||
image: ${REGISTRY:-opea}/edgecraftrag-server:${TAG:-latest}
|
||||
edgecraftrag-ui:
|
||||
build:
|
||||
dockerfile: ./ui/docker/Dockerfile.ui
|
||||
extends: edgecraftrag
|
||||
image: ${REGISTRY:-opea}/edgecraftrag-ui:${TAG:-latest}
|
||||
edgecraftrag-ui-gradio:
|
||||
build:
|
||||
dockerfile: ./ui/docker/Dockerfile.gradio
|
||||
extends: edgecraftrag
|
||||
image: ${REGISTRY:-opea}/edgecraftrag-ui-gradio:${TAG:-latest}
|
||||
vllm-arc:
|
||||
build:
|
||||
context: GenAIComps
|
||||
dockerfile: comps/third_parties/vllm/src/Dockerfile.intel_gpu
|
||||
image: ${REGISTRY:-opea}/vllm-arc:${TAG:-latest}
|
||||
|
||||
@@ -30,8 +30,16 @@ HF_ENDPOINT=https://hf-mirror.com
|
||||
|
||||
|
||||
function build_docker_images() {
|
||||
opea_branch=${opea_branch:-"main"}
|
||||
cd $WORKPATH/docker_image_build
|
||||
git clone --depth 1 --branch ${opea_branch} https://github.com/opea-project/GenAIComps.git
|
||||
pushd GenAIComps
|
||||
echo "GenAIComps test commit is $(git rev-parse HEAD)"
|
||||
docker build --no-cache -t ${REGISTRY}/comps-base:${TAG} --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f Dockerfile .
|
||||
popd && sleep 1s
|
||||
|
||||
echo "Build all the images with --no-cache, check docker_image_build.log for details..."
|
||||
service_list="edgecraftrag edgecraftrag-server edgecraftrag-ui"
|
||||
docker compose -f build.yaml build --no-cache > ${LOG_PATH}/docker_image_build.log
|
||||
|
||||
docker images && sleep 1s
|
||||
@@ -102,16 +110,30 @@ function stop_docker() {
|
||||
function main() {
|
||||
mkdir -p $LOG_PATH
|
||||
|
||||
echo "::group::stop_docker"
|
||||
stop_docker
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::build_docker_images"
|
||||
if [[ "$IMAGE_REPO" == "opea" ]]; then build_docker_images; fi
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::start_services"
|
||||
start_services
|
||||
echo "EC_RAG service started" && sleep 1s
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::validate_rag"
|
||||
validate_rag
|
||||
validate_megaservice
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::validate_megaservice"
|
||||
validate_megaservice
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::stop_docker"
|
||||
stop_docker
|
||||
echo y | docker system prune
|
||||
echo "::endgroup::"
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,14 @@ vLLM_ENDPOINT="http://${HOST_IP}:${VLLM_SERVICE_PORT}"
|
||||
|
||||
|
||||
function build_docker_images() {
|
||||
opea_branch=${opea_branch:-"main"}
|
||||
cd $WORKPATH/docker_image_build
|
||||
git clone --depth 1 --branch ${opea_branch} https://github.com/opea-project/GenAIComps.git
|
||||
pushd GenAIComps
|
||||
echo "GenAIComps test commit is $(git rev-parse HEAD)"
|
||||
docker build --no-cache -t ${REGISTRY}/comps-base:${TAG} --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f Dockerfile .
|
||||
popd && sleep 1s
|
||||
|
||||
echo "Build all the images with --no-cache, check docker_image_build.log for details..."
|
||||
docker compose -f build.yaml build --no-cache > ${LOG_PATH}/docker_image_build.log
|
||||
|
||||
@@ -152,19 +159,30 @@ function stop_docker() {
|
||||
function main() {
|
||||
mkdir -p "$LOG_PATH"
|
||||
|
||||
echo "::group::stop_docker"
|
||||
stop_docker
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::build_docker_images"
|
||||
if [[ "$IMAGE_REPO" == "opea" ]]; then build_docker_images; fi
|
||||
start_time=$(date +%s)
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::start_services"
|
||||
start_services
|
||||
end_time=$(date +%s)
|
||||
duration=$((end_time-start_time))
|
||||
echo "EC_RAG service start duration is $duration s" && sleep 1s
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::validate_rag"
|
||||
validate_rag
|
||||
validate_megaservice
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::validate_megaservice"
|
||||
validate_megaservice
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::stop_docker"
|
||||
stop_docker
|
||||
echo y | docker system prune
|
||||
echo "::endgroup::"
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user