Specify image build list for VisualQnA (#1967)
Signed-off-by: chensuyue <suyue.chen@intel.com>
This commit is contained in:
10
.github/workflows/_run-docker-compose.yml
vendored
10
.github/workflows/_run-docker-compose.yml
vendored
@@ -204,6 +204,10 @@ jobs:
|
||||
if [[ ! -z "$cid" ]]; then docker stop $cid && docker rm $cid && sleep 1s; fi
|
||||
|
||||
echo "Cleaning up images ..."
|
||||
df -h
|
||||
sleep 1
|
||||
docker system df
|
||||
sleep 1
|
||||
if [[ "${{ inputs.hardware }}" == "xeon"* ]]; then
|
||||
docker system prune -a -f
|
||||
else
|
||||
@@ -213,7 +217,13 @@ jobs:
|
||||
docker images --filter reference="opea/comps-base" -q | xargs -r docker rmi && sleep 1s
|
||||
docker system prune -f
|
||||
fi
|
||||
sleep 5
|
||||
docker images
|
||||
sleep 1
|
||||
df -h
|
||||
sleep 1
|
||||
docker system df
|
||||
sleep 1
|
||||
|
||||
- name: Publish pipeline artifact
|
||||
if: ${{ !cancelled() }}
|
||||
|
||||
@@ -140,7 +140,7 @@ function validate_megaservice() {
|
||||
|
||||
function stop_docker() {
|
||||
cd $WORKPATH/docker_compose/intel/cpu/xeon
|
||||
docker compose down
|
||||
docker compose -f compose_mariadb.yaml down
|
||||
}
|
||||
|
||||
function main() {
|
||||
|
||||
@@ -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 ./visualqna.py $HOME/visualqna.py
|
||||
|
||||
|
||||
@@ -5,6 +5,8 @@ services:
|
||||
visualqna:
|
||||
build:
|
||||
args:
|
||||
IMAGE_REPO: ${REGISTRY:-opea}
|
||||
BASE_TAG: ${TAG:-latest}
|
||||
http_proxy: ${http_proxy}
|
||||
https_proxy: ${https_proxy}
|
||||
no_proxy: ${no_proxy}
|
||||
@@ -33,4 +35,17 @@ services:
|
||||
build:
|
||||
context: GenAIComps
|
||||
dockerfile: comps/third_parties/vllm/src/Dockerfile.amd_gpu
|
||||
extends: visualqna
|
||||
image: ${REGISTRY:-opea}/vllm-rocm:${TAG:-latest}
|
||||
vllm:
|
||||
build:
|
||||
context: vllm
|
||||
dockerfile: docker/Dockerfile.cpu
|
||||
extends: visualqna
|
||||
image: ${REGISTRY:-opea}/vllm:${TAG:-latest}
|
||||
vllm-gaudi:
|
||||
build:
|
||||
context: vllm-fork
|
||||
dockerfile: Dockerfile.hpu
|
||||
extends: visualqna
|
||||
image: ${REGISTRY:-opea}/vllm-gaudi:${TAG:-latest}
|
||||
|
||||
@@ -18,15 +18,20 @@ LOG_PATH="$WORKPATH/tests"
|
||||
ip_address=$(hostname -I | awk '{print $1}')
|
||||
|
||||
function build_docker_images() {
|
||||
opea_branch=${opea_branch:-"main"}
|
||||
cd $WORKPATH/docker_image_build
|
||||
git clone --depth 1 --branch main https://github.com/opea-project/GenAIComps.git
|
||||
docker compose -f build.yaml build --no-cache > ${LOG_PATH}/docker_image_build.log
|
||||
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
|
||||
|
||||
git clone https://github.com/HabanaAI/vllm-fork.git
|
||||
cd ./vllm-fork/
|
||||
docker build -f Dockerfile.hpu -t opea/vllm-gaudi:${TAG} --shm-size=128g . --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy
|
||||
cd ..
|
||||
rm -rf vllm-fork
|
||||
git clone https://github.com/HabanaAI/vllm-fork.git && cd vllm-fork
|
||||
VLLM_FORK_VER=v0.6.6.post1+Gaudi-1.20.0
|
||||
git checkout ${VLLM_FORK_VER} &> /dev/null && cd ../
|
||||
|
||||
service_list="visualqna visualqna-ui lvm nginx vllm-gaudi"
|
||||
docker compose -f build.yaml build ${service_list} --no-cache > ${LOG_PATH}/docker_image_build.log
|
||||
|
||||
docker images && sleep 1s
|
||||
}
|
||||
@@ -186,17 +191,31 @@ function stop_docker() {
|
||||
|
||||
function main() {
|
||||
|
||||
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 "::endgroup::"
|
||||
|
||||
echo "::group::validate_microservices"
|
||||
validate_microservices
|
||||
validate_megaservice
|
||||
#validate_frontend
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::validate_megaservice"
|
||||
validate_megaservice
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::stop_docker"
|
||||
stop_docker
|
||||
echo y | docker system prune
|
||||
echo "::endgroup::"
|
||||
|
||||
docker system prune -f
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -38,24 +38,17 @@ export MODEL_CACHE=${model_cache:-"/var/opea/multimodalqna-service/data"}
|
||||
|
||||
function build_docker_images() {
|
||||
opea_branch=${opea_branch:-"main"}
|
||||
# If the opea_branch isn't main, replace the git clone branch in Dockerfile.
|
||||
if [[ "${opea_branch}" != "main" ]]; then
|
||||
cd $WORKPATH
|
||||
OLD_STRING="RUN git clone --depth 1 https://github.com/opea-project/GenAIComps.git"
|
||||
NEW_STRING="RUN git clone --depth 1 --branch ${opea_branch} https://github.com/opea-project/GenAIComps.git"
|
||||
find . -type f -name "Dockerfile*" | while read -r file; do
|
||||
echo "Processing file: $file"
|
||||
sed -i "s|$OLD_STRING|$NEW_STRING|g" "$file"
|
||||
done
|
||||
fi
|
||||
|
||||
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
|
||||
service_list="visualqna visualqna-ui lvm nginx"
|
||||
docker compose -f build.yaml build ${service_list} --no-cache > ${LOG_PATH}/docker_image_build.log
|
||||
|
||||
docker pull ghcr.io/huggingface/text-generation-inference:2.4.1-rocm
|
||||
docker images && sleep 1s
|
||||
}
|
||||
|
||||
@@ -209,17 +202,31 @@ function stop_docker() {
|
||||
|
||||
function main() {
|
||||
|
||||
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 "::endgroup::"
|
||||
|
||||
echo "::group::validate_microservices"
|
||||
validate_microservices
|
||||
validate_megaservice
|
||||
#validate_frontend
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::validate_megaservice"
|
||||
validate_megaservice
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::stop_docker"
|
||||
stop_docker
|
||||
echo y | docker system prune
|
||||
echo "::endgroup::"
|
||||
|
||||
docker system prune -f
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -17,22 +17,28 @@ LOG_PATH="$WORKPATH/tests"
|
||||
ip_address=$(hostname -I | awk '{print $1}')
|
||||
|
||||
function build_docker_images() {
|
||||
opea_branch=${opea_branch:-"main"}
|
||||
cd $WORKPATH/docker_image_build
|
||||
git clone --depth 1 --branch main https://github.com/opea-project/GenAIComps.git
|
||||
docker compose -f build.yaml build --no-cache > ${LOG_PATH}/docker_image_build.log
|
||||
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
|
||||
git clone https://github.com/vllm-project/vllm.git && cd vllm
|
||||
VLLM_VER="v0.8.3"
|
||||
echo "Check out vLLM tag ${VLLM_VER}"
|
||||
git checkout ${VLLM_VER} &> /dev/null
|
||||
cd ../
|
||||
|
||||
docker pull opea/vllm:latest
|
||||
docker tag opea/vllm:latest opea/vllm:${TAG}
|
||||
service_list="visualqna visualqna-ui lvm nginx vllm"
|
||||
docker compose -f build.yaml build ${service_list} --no-cache > ${LOG_PATH}/docker_image_build.log
|
||||
docker images && sleep 1s
|
||||
}
|
||||
|
||||
function start_services() {
|
||||
cd $WORKPATH/docker_compose/intel/cpu/xeon/
|
||||
|
||||
source ./set_env.sh
|
||||
|
||||
sed -i "s/backend_address/$ip_address/g" $WORKPATH/ui/svelte/.env
|
||||
|
||||
# Start Docker Containers
|
||||
docker compose up -d > ${LOG_PATH}/start_services_with_compose.log
|
||||
|
||||
@@ -179,17 +185,31 @@ function stop_docker() {
|
||||
|
||||
function main() {
|
||||
|
||||
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 "::endgroup::"
|
||||
|
||||
echo "::group::validate_microservices"
|
||||
validate_microservices
|
||||
validate_megaservice
|
||||
#validate_frontend
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::validate_megaservice"
|
||||
validate_megaservice
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::stop_docker"
|
||||
stop_docker
|
||||
echo y | docker system prune
|
||||
echo "::endgroup::"
|
||||
|
||||
docker system prune -f
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -17,24 +17,17 @@ ip_address=$(hostname -I | awk '{print $1}')
|
||||
|
||||
function build_docker_images() {
|
||||
opea_branch=${opea_branch:-"main"}
|
||||
# If the opea_branch isn't main, replace the git clone branch in Dockerfile.
|
||||
if [[ "${opea_branch}" != "main" ]]; then
|
||||
cd $WORKPATH
|
||||
OLD_STRING="RUN git clone --depth 1 https://github.com/opea-project/GenAIComps.git"
|
||||
NEW_STRING="RUN git clone --depth 1 --branch ${opea_branch} https://github.com/opea-project/GenAIComps.git"
|
||||
find . -type f -name "Dockerfile*" | while read -r file; do
|
||||
echo "Processing file: $file"
|
||||
sed -i "s|$OLD_STRING|$NEW_STRING|g" "$file"
|
||||
done
|
||||
fi
|
||||
|
||||
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
|
||||
service_list="visualqna visualqna-ui lvm nginx"
|
||||
docker compose -f build.yaml build ${service_list} --no-cache > ${LOG_PATH}/docker_image_build.log
|
||||
|
||||
docker pull ghcr.io/huggingface/tgi-gaudi:2.0.6
|
||||
docker images && sleep 1s
|
||||
}
|
||||
|
||||
@@ -200,22 +193,36 @@ function validate_frontend() {
|
||||
|
||||
function stop_docker() {
|
||||
cd $WORKPATH/docker_compose/intel/hpu/gaudi
|
||||
docker compose stop && docker compose rm -f
|
||||
docker compose -f compose_tgi.yaml down
|
||||
}
|
||||
|
||||
function main() {
|
||||
|
||||
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 "::endgroup::"
|
||||
|
||||
echo "::group::validate_microservices"
|
||||
validate_microservices
|
||||
validate_megaservice
|
||||
# validate_frontend
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::validate_megaservice"
|
||||
validate_megaservice
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::stop_docker"
|
||||
stop_docker
|
||||
echo y | docker system prune
|
||||
echo "::endgroup::"
|
||||
|
||||
docker system prune -f
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -17,24 +17,17 @@ ip_address=$(hostname -I | awk '{print $1}')
|
||||
|
||||
function build_docker_images() {
|
||||
opea_branch=${opea_branch:-"main"}
|
||||
# If the opea_branch isn't main, replace the git clone branch in Dockerfile.
|
||||
if [[ "${opea_branch}" != "main" ]]; then
|
||||
cd $WORKPATH
|
||||
OLD_STRING="RUN git clone --depth 1 https://github.com/opea-project/GenAIComps.git"
|
||||
NEW_STRING="RUN git clone --depth 1 --branch ${opea_branch} https://github.com/opea-project/GenAIComps.git"
|
||||
find . -type f -name "Dockerfile*" | while read -r file; do
|
||||
echo "Processing file: $file"
|
||||
sed -i "s|$OLD_STRING|$NEW_STRING|g" "$file"
|
||||
done
|
||||
fi
|
||||
|
||||
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
|
||||
service_list="visualqna visualqna-ui lvm nginx"
|
||||
docker compose -f build.yaml build ${service_list} --no-cache > ${LOG_PATH}/docker_image_build.log
|
||||
|
||||
docker pull ghcr.io/huggingface/text-generation-inference:2.4.0-intel-cpu
|
||||
docker images && sleep 1s
|
||||
}
|
||||
|
||||
@@ -200,22 +193,36 @@ function validate_frontend() {
|
||||
|
||||
function stop_docker() {
|
||||
cd $WORKPATH/docker_compose/intel/cpu/xeon/
|
||||
docker compose stop && docker compose rm -f
|
||||
docker compose -f compose_tgi.yaml down
|
||||
}
|
||||
|
||||
function main() {
|
||||
|
||||
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 "::endgroup::"
|
||||
|
||||
echo "::group::validate_microservices"
|
||||
validate_microservices
|
||||
validate_megaservice
|
||||
# validate_frontend
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::validate_megaservice"
|
||||
validate_megaservice
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::stop_docker"
|
||||
stop_docker
|
||||
echo y | docker system prune
|
||||
echo "::endgroup::"
|
||||
|
||||
docker system prune -f
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -37,22 +37,16 @@ export MODEL_CACHE=${model_cache:-"/var/opea/multimodalqna-service/data"}
|
||||
|
||||
function build_docker_images() {
|
||||
opea_branch=${opea_branch:-"main"}
|
||||
# If the opea_branch isn't main, replace the git clone branch in Dockerfile.
|
||||
if [[ "${opea_branch}" != "main" ]]; then
|
||||
cd $WORKPATH
|
||||
OLD_STRING="RUN git clone --depth 1 https://github.com/opea-project/GenAIComps.git"
|
||||
NEW_STRING="RUN git clone --depth 1 --branch ${opea_branch} https://github.com/opea-project/GenAIComps.git"
|
||||
find . -type f -name "Dockerfile*" | while read -r file; do
|
||||
echo "Processing file: $file"
|
||||
sed -i "s|$OLD_STRING|$NEW_STRING|g" "$file"
|
||||
done
|
||||
fi
|
||||
|
||||
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
|
||||
service_list="visualqna visualqna-ui lvm nginx vllm-rocm"
|
||||
docker compose -f build.yaml build ${service_list} --no-cache > ${LOG_PATH}/docker_image_build.log
|
||||
|
||||
docker images && sleep 1s
|
||||
}
|
||||
@@ -207,17 +201,31 @@ function stop_docker() {
|
||||
|
||||
function main() {
|
||||
|
||||
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 "::endgroup::"
|
||||
|
||||
echo "::group::validate_microservices"
|
||||
validate_microservices
|
||||
validate_megaservice
|
||||
#validate_frontend
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::validate_megaservice"
|
||||
validate_megaservice
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::stop_docker"
|
||||
stop_docker
|
||||
echo y | docker system prune
|
||||
echo "::endgroup::"
|
||||
|
||||
docker system prune -f
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user