From f1be50a22ccad45b7f7685d08a3733ded58eca64 Mon Sep 17 00:00:00 2001 From: ZePan110 Date: Thu, 15 Aug 2024 21:20:56 +0800 Subject: [PATCH] Standardize image build. (#472) Signed-off-by: zepan Signed-off-by: siddhivelankar23 --- tests/test_agent_langchain.sh | 2 +- tests/test_dataprep_pgvector.sh | 2 +- tests/test_dataprep_pinecone.sh | 2 +- tests/test_dataprep_redis_langchain_ray.sh | 2 +- tests/test_guardrails_pii_detection.sh | 2 +- tests/test_llms_text-generation_vllm-openvino.sh | 2 +- tests/test_llms_text-generation_vllm-ray.sh | 4 ++-- tests/test_llms_text-generation_vllm.sh | 4 ++-- tests/test_lvms_llava.sh | 2 +- tests/test_lvms_tgi_llava_next.sh | 3 ++- 10 files changed, 13 insertions(+), 12 deletions(-) diff --git a/tests/test_agent_langchain.sh b/tests/test_agent_langchain.sh index e44d88292..02de6e5d4 100644 --- a/tests/test_agent_langchain.sh +++ b/tests/test_agent_langchain.sh @@ -12,7 +12,7 @@ function build_docker_images() { echo "Building the docker images" cd $WORKPATH echo $WORKPATH - docker build -t opea/comps-agent-langchain:comps -f comps/agent/langchain/docker/Dockerfile . + docker build --no-cache -t opea/comps-agent-langchain:comps -f comps/agent/langchain/docker/Dockerfile . if $? ; then echo "opea/comps-agent-langchain built fail" exit 1 diff --git a/tests/test_dataprep_pgvector.sh b/tests/test_dataprep_pgvector.sh index 1f2b93ab4..3ea3df9f8 100755 --- a/tests/test_dataprep_pgvector.sh +++ b/tests/test_dataprep_pgvector.sh @@ -16,7 +16,7 @@ function build_docker_images() { docker pull pgvector/pgvector:0.7.0-pg16 # build dataprep image for pgvector - docker build -t opea/dataprep-pgvector:comps --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f $WORKPATH/comps/dataprep/pgvector/langchain/docker/Dockerfile . + docker build --no-cache -t opea/dataprep-pgvector:comps --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f $WORKPATH/comps/dataprep/pgvector/langchain/docker/Dockerfile . if $? ; then echo "opea/dataprep-pgvector built fail" exit 1 diff --git a/tests/test_dataprep_pinecone.sh b/tests/test_dataprep_pinecone.sh index 55e42073d..3f63858d9 100755 --- a/tests/test_dataprep_pinecone.sh +++ b/tests/test_dataprep_pinecone.sh @@ -10,7 +10,7 @@ function build_docker_images() { cd $WORKPATH # build dataprep image for pinecone - docker build -t opea/dataprep-pinecone:comps --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f $WORKPATH/comps/dataprep/pinecone/docker/Dockerfile . + docker build --no-cache -t opea/dataprep-pinecone:comps --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f $WORKPATH/comps/dataprep/pinecone/docker/Dockerfile . if $? ; then echo "opea/dataprep-pinecone built fail" exit 1 diff --git a/tests/test_dataprep_redis_langchain_ray.sh b/tests/test_dataprep_redis_langchain_ray.sh index 220609b13..0980eafc1 100644 --- a/tests/test_dataprep_redis_langchain_ray.sh +++ b/tests/test_dataprep_redis_langchain_ray.sh @@ -11,7 +11,7 @@ ip_address=$(hostname -I | awk '{print $1}') function build_docker_images() { echo "Building the docker images" cd $WORKPATH - docker build -t opea/dataprep-on-ray-redis:comps --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/dataprep/redis/langchain_ray/docker/Dockerfile . + docker build --no-cache -t opea/dataprep-on-ray-redis:comps --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/dataprep/redis/langchain_ray/docker/Dockerfile . if $? ; then echo "opea/dataprep-on-ray-redis built fail" exit 1 diff --git a/tests/test_guardrails_pii_detection.sh b/tests/test_guardrails_pii_detection.sh index 783fa0d99..639d8f150 100644 --- a/tests/test_guardrails_pii_detection.sh +++ b/tests/test_guardrails_pii_detection.sh @@ -10,7 +10,7 @@ ip_address=$(hostname -I | awk '{print $1}') function build_docker_images() { echo "Start building docker images for microservice" cd $WORKPATH - docker build -t opea/guardrails-pii-detection:comps --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/guardrails/pii_detection/docker/Dockerfile . + docker build --no-cache -t opea/guardrails-pii-detection:comps --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/guardrails/pii_detection/docker/Dockerfile . if $? ; then echo "opea/guardrails-pii-detection built fail" exit 1 diff --git a/tests/test_llms_text-generation_vllm-openvino.sh b/tests/test_llms_text-generation_vllm-openvino.sh index 7e4e40e98..e3c6e3d63 100755 --- a/tests/test_llms_text-generation_vllm-openvino.sh +++ b/tests/test_llms_text-generation_vllm-openvino.sh @@ -16,7 +16,7 @@ function build_container() { cd $WORKPATH git clone https://github.com/vllm-project/vllm.git vllm-openvino cd ./vllm-openvino/ - docker build -t $DOCKER_IMAGE \ + docker build --no-cache -t $DOCKER_IMAGE \ -f Dockerfile.openvino \ . \ --build-arg https_proxy=$https_proxy \ diff --git a/tests/test_llms_text-generation_vllm-ray.sh b/tests/test_llms_text-generation_vllm-ray.sh index 3b1c60681..83260be92 100644 --- a/tests/test_llms_text-generation_vllm-ray.sh +++ b/tests/test_llms_text-generation_vllm-ray.sh @@ -12,7 +12,7 @@ function build_docker_images() { cd $WORKPATH docker build \ -f comps/llms/text-generation/vllm-ray/docker/Dockerfile.vllmray \ - -t opea/vllm_ray-habana:comps --network=host . + --no-cache -t opea/vllm_ray-habana:comps --network=host . if $? ; then echo "opea/vllm_ray-habana built fail" exit 1 @@ -23,7 +23,7 @@ function build_docker_images() { ## Build OPEA microservice docker cd $WORKPATH docker build \ - -t opea/llm-vllm-ray:comps \ + --no-cache -t opea/llm-vllm-ray:comps \ -f comps/llms/text-generation/vllm-ray/docker/Dockerfile.microservice . if $? ; then echo "opea/llm-vllm-ray built fail" diff --git a/tests/test_llms_text-generation_vllm.sh b/tests/test_llms_text-generation_vllm.sh index 05f249cc8..ed906b99a 100644 --- a/tests/test_llms_text-generation_vllm.sh +++ b/tests/test_llms_text-generation_vllm.sh @@ -12,7 +12,7 @@ function build_docker_images() { cd $WORKPATH/comps/llms/text-generation/vllm docker build \ -f docker/Dockerfile.hpu \ - -t opea/vllm-hpu:comps \ + --no-cache -t opea/vllm-hpu:comps \ --shm-size=128g . if $? ; then echo "opea/vllm-hpu built fail" @@ -24,7 +24,7 @@ function build_docker_images() { ## Build OPEA microservice docker cd $WORKPATH docker build \ - -t opea/llm-vllm:comps \ + --no-cache -t opea/llm-vllm:comps \ -f comps/llms/text-generation/vllm/docker/Dockerfile.microservice . if $? ; then echo "opea/llm-vllm built fail" diff --git a/tests/test_lvms_llava.sh b/tests/test_lvms_llava.sh index 928229847..2e8f3cbd5 100644 --- a/tests/test_lvms_llava.sh +++ b/tests/test_lvms_llava.sh @@ -10,7 +10,7 @@ ip_address=$(hostname -I | awk '{print $1}') function build_docker_images() { cd $WORKPATH echo $(pwd) - docker build -t opea/llava:comps -f comps/lvms/llava/Dockerfile . + docker build --no-cache -t opea/llava:comps -f comps/lvms/llava/Dockerfile . if $? ; then echo "opea/llava built fail" exit 1 diff --git a/tests/test_lvms_tgi_llava_next.sh b/tests/test_lvms_tgi_llava_next.sh index 1824df015..5a654b4ec 100644 --- a/tests/test_lvms_tgi_llava_next.sh +++ b/tests/test_lvms_tgi_llava_next.sh @@ -11,13 +11,14 @@ function build_docker_images() { cd $WORKPATH echo $(pwd) git clone https://github.com/yuanwu2017/tgi-gaudi.git && cd tgi-gaudi && git checkout v2.0.4 - docker build -t opea/llava-tgi:comps . + docker build --no-cache -t opea/llava-tgi:comps . if $? ; then echo "opea/llava-tgi built fail" exit 1 else echo "opea/llava-tgi built successful" fi + cd .. docker build --no-cache -t opea/lvm-tgi:comps -f comps/lvms/Dockerfile_tgi . if $? ; then