From 9f5b186881dde1dedb4c22947074f5ed81b12f37 Mon Sep 17 00:00:00 2001 From: zepan Date: Tue, 13 Aug 2024 21:49:36 +0800 Subject: [PATCH] Standardize image build. Signed-off-by: zepan --- 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_ray_serve.sh | 4 ++-- 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 | 2 +- tests/test_vectorstores_pgvector.sh | 2 +- 12 files changed, 15 insertions(+), 15 deletions(-) diff --git a/tests/test_agent_langchain.sh b/tests/test_agent_langchain.sh index ad9aae145..ed063571f 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:latest -f comps/agent/langchain/docker/Dockerfile . + docker build --no-cache -t opea/comps-agent-langchain:latest -f comps/agent/langchain/docker/Dockerfile . } diff --git a/tests/test_dataprep_pgvector.sh b/tests/test_dataprep_pgvector.sh index c4c892ee9..bae4e3ab9 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:latest --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:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f $WORKPATH/comps/dataprep/pgvector/langchain/docker/Dockerfile . } function start_service() { diff --git a/tests/test_dataprep_pinecone.sh b/tests/test_dataprep_pinecone.sh index a92a86c64..243bb2bd6 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:latest --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:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f $WORKPATH/comps/dataprep/pinecone/docker/Dockerfile . } function start_service() { diff --git a/tests/test_dataprep_redis_langchain_ray.sh b/tests/test_dataprep_redis_langchain_ray.sh index f377d9ef5..3641e2f34 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:latest --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:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/dataprep/redis/langchain_ray/docker/Dockerfile . echo "Docker image built successfully" } diff --git a/tests/test_guardrails_pii_detection.sh b/tests/test_guardrails_pii_detection.sh index 1ba8202f6..6e67f576a 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:latest --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:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/guardrails/pii_detection/docker/Dockerfile . echo "Docker images built" } diff --git a/tests/test_llms_text-generation_ray_serve.sh b/tests/test_llms_text-generation_ray_serve.sh index 823971ecc..7535dc2a5 100644 --- a/tests/test_llms_text-generation_ray_serve.sh +++ b/tests/test_llms_text-generation_ray_serve.sh @@ -13,13 +13,13 @@ function build_docker_images() { docker build \ -f comps/llms/text-generation/ray_serve/docker/Dockerfile.rayserve \ --network=host \ - -t ray_serve:habana . + --no-cache -t ray_serve:habana . ## Build OPEA microservice docker cd $WORKPATH docker build \ -t opea/llm-ray:comps \ - -f comps/llms/text-generation/ray_serve/docker/Dockerfile.microservice . + --no-cache -f comps/llms/text-generation/ray_serve/docker/Dockerfile.microservice . } function start_service() { diff --git a/tests/test_llms_text-generation_vllm-openvino.sh b/tests/test_llms_text-generation_vllm-openvino.sh index f2df98584..ca084dd0a 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 7ab235a93..1af9257e1 100644 --- a/tests/test_llms_text-generation_vllm-ray.sh +++ b/tests/test_llms_text-generation_vllm-ray.sh @@ -12,12 +12,12 @@ function build_docker_images() { cd $WORKPATH docker build \ -f comps/llms/text-generation/vllm-ray/docker/Dockerfile.vllmray \ - -t opea/vllm_ray:habana --network=host . + --no-cache -t opea/vllm_ray:habana --network=host . ## 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 . } diff --git a/tests/test_llms_text-generation_vllm.sh b/tests/test_llms_text-generation_vllm.sh index 48bee9ae8..5cad3c3f2 100644 --- a/tests/test_llms_text-generation_vllm.sh +++ b/tests/test_llms_text-generation_vllm.sh @@ -12,13 +12,13 @@ function build_docker_images() { cd $WORKPATH/comps/llms/text-generation/vllm docker build \ -f docker/Dockerfile.hpu \ - -t opea/vllm:hpu \ + --no-cache -t opea/vllm:hpu \ --shm-size=128g . ## 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 . } diff --git a/tests/test_lvms_llava.sh b/tests/test_lvms_llava.sh index d9d4258e7..c7ad3371a 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 . docker build --no-cache -t opea/lvm:comps -f comps/lvms/Dockerfile . } diff --git a/tests/test_lvms_tgi_llava_next.sh b/tests/test_lvms_tgi_llava_next.sh index 970e3004f..37d542da0 100644 --- a/tests/test_lvms_tgi_llava_next.sh +++ b/tests/test_lvms_tgi_llava_next.sh @@ -11,7 +11,7 @@ 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:latest . + docker build --no-cache -t opea/llava-tgi:latest . cd .. docker build --no-cache -t opea/lvm-tgi:latest -f comps/lvms/Dockerfile_tgi . } diff --git a/tests/test_vectorstores_pgvector.sh b/tests/test_vectorstores_pgvector.sh index 1b43a6930..4eaaf67c8 100755 --- a/tests/test_vectorstores_pgvector.sh +++ b/tests/test_vectorstores_pgvector.sh @@ -13,7 +13,7 @@ function build_docker_images() { docker pull pgvector/pgvector:0.7.0-pg16 # build dataprep image for pgvector - docker build -t opea/dataprep-pgvector:latest --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:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f $WORKPATH/comps/dataprep/pgvector/langchain/docker/Dockerfile . } function start_service() {