1. Simplify git clone code in CI test. 2. Replace git clone branch in Dockerfile. Signed-off-by: chensuyue <suyue.chen@intel.com>
30 lines
813 B
Bash
30 lines
813 B
Bash
#!/bin/bash
|
|
# Copyright (C) 2024 Intel Corporation
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
set -e
|
|
WORKPATH=$(dirname "$PWD")
|
|
export WORKDIR=$WORKPATH/../../
|
|
echo "WORKDIR=${WORKDIR}"
|
|
|
|
function get_genai_comps() {
|
|
if [ ! -d "GenAIComps" ] ; then
|
|
git clone --depth 1 --branch ${opea_branch:-"main"} https://github.com/opea-project/GenAIComps.git
|
|
fi
|
|
}
|
|
|
|
function build_agent_docker_image() {
|
|
cd $WORKDIR/GenAIExamples/WorkflowExecAgent/docker_image_build/
|
|
get_genai_comps
|
|
echo "Build agent image with --no-cache..."
|
|
docker compose -f build.yaml build --no-cache
|
|
}
|
|
|
|
function main() {
|
|
echo "==================== Build agent docker image ===================="
|
|
build_agent_docker_image
|
|
echo "==================== Build agent docker image completed ===================="
|
|
}
|
|
|
|
main
|