From 0ec47a50badbf67aeee14f9de79e4d02bfec28cf Mon Sep 17 00:00:00 2001 From: sthuang <167743503+shaoting-huang@users.noreply.github.com> Date: Tue, 16 Sep 2025 10:21:59 +0800 Subject: [PATCH] enhance: clean up vcpkg build (#44386) related: #44385 Signed-off-by: shaoting-huang --- DEVELOPMENT.md | 4 -- .../builder/cpu/amazonlinux2023/Dockerfile | 11 ---- .../docker/builder/cpu/rockylinux8/Dockerfile | 26 --------- .../docker/builder/cpu/ubuntu20.04/Dockerfile | 10 ---- .../docker/builder/cpu/ubuntu22.04/Dockerfile | 10 ---- .../docker/builder/gpu/ubuntu20.04/Dockerfile | 10 ---- .../docker/builder/gpu/ubuntu22.04/Dockerfile | 8 --- scripts/azure_build.sh | 53 ------------------- scripts/core_build.sh | 3 -- 9 files changed, 135 deletions(-) delete mode 100644 scripts/azure_build.sh diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index b8f6a9c056..d820548fc1 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -503,10 +503,6 @@ ${CMAKE_EXTRA_ARGS} \ -DINDEX_ENGINE=${INDEX_ENGINE} \ -DENABLE_GCP_NATIVE=${ENABLE_GCP_NATIVE} \ -DENABLE_AZURE_FS=${ENABLE_AZURE_FS} " -if [ -z "$BUILD_WITHOUT_AZURE" ]; then -CMAKE_CMD=${CMAKE_CMD}"-DAZURE_BUILD_DIR=${AZURE_BUILD_DIR} \ - -DVCPKG_TARGET_TRIPLET=${VCPKG_TARGET_TRIPLET} " -fi CMAKE_CMD=${CMAKE_CMD}"${CPP_SRC_DIR}" ``` diff --git a/build/docker/builder/cpu/amazonlinux2023/Dockerfile b/build/docker/builder/cpu/amazonlinux2023/Dockerfile index 48c66e03f1..7386ea717e 100644 --- a/build/docker/builder/cpu/amazonlinux2023/Dockerfile +++ b/build/docker/builder/cpu/amazonlinux2023/Dockerfile @@ -32,17 +32,6 @@ RUN pip3 install conan==1.64.1 RUN echo "target arch $TARGETARCH" RUN wget -qO- "https://cmake.org/files/v3.27/cmake-3.27.5-linux-`uname -m`.tar.gz" | tar --strip-components=1 -xz -C /usr/local -# https://github.com/microsoft/vcpkg/pull/35084 -RUN mkdir /opt/vcpkg && \ - wget -qO- vcpkg.tar.gz https://github.com/microsoft/vcpkg/archive/refs/tags/2023.11.20.tar.gz | tar --strip-components=1 -xz -C /opt/vcpkg && \ - rm -rf vcpkg.tar.gz - -ENV VCPKG_FORCE_SYSTEM_BINARIES 1 - -RUN /opt/vcpkg/bootstrap-vcpkg.sh -disableMetrics && ln -s /opt/vcpkg/vcpkg /usr/local/bin/vcpkg && vcpkg version - -RUN vcpkg install azure-identity-cpp azure-storage-blobs-cpp gtest --only-downloads - RUN mkdir /tmp/ccache && cd /tmp/ccache &&\ wget https://dl.fedoraproject.org/pub/epel/9/Everything/`uname -m`/Packages/h/hiredis-1.0.2-2.el9.`uname -m`.rpm &&\ wget https://dl.fedoraproject.org/pub/epel/9/Everything/`uname -m`/Packages/c/ccache-4.5.1-2.el9.`uname -m`.rpm &&\ diff --git a/build/docker/builder/cpu/rockylinux8/Dockerfile b/build/docker/builder/cpu/rockylinux8/Dockerfile index f644bc5055..edfe85ae68 100644 --- a/build/docker/builder/cpu/rockylinux8/Dockerfile +++ b/build/docker/builder/cpu/rockylinux8/Dockerfile @@ -10,22 +10,6 @@ RUN dnf -y update && \ dnf config-manager --set-enabled powertools && \ dnf -y install ninja-build -ENV VCPKG_FORCE_SYSTEM_BINARIES 1 - -# install vcpkg -RUN mkdir /opt/vcpkg && \ - wget -qO- vcpkg.tar.gz https://github.com/microsoft/vcpkg/archive/2025.06.13.tar.gz | tar --strip-components=1 -xz -C /opt/vcpkg && \ - rm -rf vcpkg.tar.gz - -# empty the vscpkg toolchains linux.cmake file to avoid the error -RUN echo "" > /opt/vcpkg/scripts/toolchains/linux.cmake - -# install azure-identity-cpp azure-storage-blobs-cpp gtest via vcpkg -RUN /opt/vcpkg/bootstrap-vcpkg.sh -disableMetrics && \ - ln -s /opt/vcpkg/vcpkg /usr/local/bin/vcpkg && \ - vcpkg version && \ - vcpkg install azure-identity-cpp azure-storage-blobs-cpp gtest - ######################################################################################## FROM rockylinux/rockylinux:8 @@ -49,16 +33,6 @@ RUN curl https://sh.rustup.rs -sSf | \ ENV PATH=/root/.cargo/bin:/usr/local/bin:/usr/local/go/bin:$PATH -ENV VCPKG_FORCE_SYSTEM_BINARIES 1 - -# install vcpkg -RUN mkdir /opt/vcpkg && \ - wget -qO- vcpkg.tar.gz https://github.com/microsoft/vcpkg/archive/2025.06.13.tar.gz | tar --strip-components=1 -xz -C /opt/vcpkg && \ - rm -rf vcpkg.tar.gz -# Copy the vcpkg installed libraries -COPY --from=vcpkg-installer /root/.cache/vcpkg /root/.cache/vcpkg - - COPY --chown=0:0 build/docker/builder/entrypoint.sh / ENTRYPOINT [ "/entrypoint.sh" ] diff --git a/build/docker/builder/cpu/ubuntu20.04/Dockerfile b/build/docker/builder/cpu/ubuntu20.04/Dockerfile index ea6f8a501f..728d6d9976 100644 --- a/build/docker/builder/cpu/ubuntu20.04/Dockerfile +++ b/build/docker/builder/cpu/ubuntu20.04/Dockerfile @@ -25,16 +25,6 @@ RUN pip3 install conan==1.64.1 RUN echo "target arch $TARGETARCH" RUN wget -qO- "https://cmake.org/files/v3.27/cmake-3.27.5-linux-`uname -m`.tar.gz" | tar --strip-components=1 -xz -C /usr/local -RUN mkdir /opt/vcpkg && \ - wget -qO- vcpkg.tar.gz https://github.com/microsoft/vcpkg/archive/2025.06.13.tar.gz | tar --strip-components=1 -xz -C /opt/vcpkg && \ - rm -rf vcpkg.tar.gz - -ENV VCPKG_FORCE_SYSTEM_BINARIES 1 - -RUN /opt/vcpkg/bootstrap-vcpkg.sh -disableMetrics && ln -s /opt/vcpkg/vcpkg /usr/local/bin/vcpkg && vcpkg version - -RUN vcpkg install azure-identity-cpp azure-storage-blobs-cpp gtest - # Install Go ENV GOPATH /go ENV GOROOT /usr/local/go diff --git a/build/docker/builder/cpu/ubuntu22.04/Dockerfile b/build/docker/builder/cpu/ubuntu22.04/Dockerfile index 4378191f08..99eac1d049 100644 --- a/build/docker/builder/cpu/ubuntu22.04/Dockerfile +++ b/build/docker/builder/cpu/ubuntu22.04/Dockerfile @@ -31,16 +31,6 @@ RUN pip3 install conan==1.64.1 RUN echo "target arch $TARGETARCH" RUN wget -qO- "https://cmake.org/files/v3.31/cmake-3.31.8-linux-`uname -m`.tar.gz" | tar --strip-components=1 -xz -C /usr/local -RUN mkdir /opt/vcpkg && \ - wget -qO- vcpkg.tar.gz https://github.com/microsoft/vcpkg/archive/2025.06.13.tar.gz | tar --strip-components=1 -xz -C /opt/vcpkg && \ - rm -rf vcpkg.tar.gz - -ENV VCPKG_FORCE_SYSTEM_BINARIES 1 - -RUN /opt/vcpkg/bootstrap-vcpkg.sh -disableMetrics && ln -s /opt/vcpkg/vcpkg /usr/local/bin/vcpkg && vcpkg version - -RUN vcpkg install azure-identity-cpp azure-storage-blobs-cpp gtest - # Install Go ENV GOPATH /go ENV GOROOT /usr/local/go diff --git a/build/docker/builder/gpu/ubuntu20.04/Dockerfile b/build/docker/builder/gpu/ubuntu20.04/Dockerfile index 8d4057e5c0..ac6499ec89 100644 --- a/build/docker/builder/gpu/ubuntu20.04/Dockerfile +++ b/build/docker/builder/gpu/ubuntu20.04/Dockerfile @@ -24,16 +24,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends wget curl ca-ce RUN pip3 install conan==1.64.1 -RUN mkdir /opt/vcpkg && \ - wget -qO- vcpkg.tar.gz https://github.com/microsoft/vcpkg/archive/2025.06.13.tar.gz | tar --strip-components=1 -xz -C /opt/vcpkg && \ - rm -rf vcpkg.tar.gz - -ENV VCPKG_FORCE_SYSTEM_BINARIES 1 - -RUN /opt/vcpkg/bootstrap-vcpkg.sh -disableMetrics && ln -s /opt/vcpkg/vcpkg /usr/local/bin/vcpkg && vcpkg version - -RUN vcpkg install azure-identity-cpp azure-storage-blobs-cpp gtest - # Install openblas # RUN wget https://github.com/xianyi/OpenBLAS/archive/v0.3.21.tar.gz && \ # tar zxvf v0.3.21.tar.gz && cd OpenBLAS-0.3.21 && \ diff --git a/build/docker/builder/gpu/ubuntu22.04/Dockerfile b/build/docker/builder/gpu/ubuntu22.04/Dockerfile index 5bd2a6937d..832698b7de 100644 --- a/build/docker/builder/gpu/ubuntu22.04/Dockerfile +++ b/build/docker/builder/gpu/ubuntu22.04/Dockerfile @@ -21,14 +21,6 @@ RUN curl https://sh.rustup.rs -sSf | \ sh -s -- --default-toolchain=1.89 -y ENV PATH=/root/.cargo/bin:/usr/local/bin:/usr/local/go/bin:$PATH -RUN mkdir /opt/vcpkg && \ - wget -qO- vcpkg.tar.gz https://github.com/microsoft/vcpkg/archive/2025.06.13.tar.gz | tar --strip-components=1 -xz -C /opt/vcpkg && \ - rm -rf vcpkg.tar.gz -ENV VCPKG_FORCE_SYSTEM_BINARIES 1 -RUN /opt/vcpkg/bootstrap-vcpkg.sh -disableMetrics && ln -s /opt/vcpkg/vcpkg /usr/local/bin/vcpkg && vcpkg version -RUN vcpkg install azure-identity-cpp azure-storage-blobs-cpp gtest - - # refer: https://code.visualstudio.com/docs/remote/containers-advanced#_avoiding-extension-reinstalls-on-container-rebuild RUN mkdir -p /home/milvus/.vscode-server/extensions \ /home/milvus/.vscode-server-insiders/extensions \ diff --git a/scripts/azure_build.sh b/scripts/azure_build.sh deleted file mode 100644 index 0ea585eb36..0000000000 --- a/scripts/azure_build.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/usr/bin/env bash -BUILD_UNITTEST="OFF" -while getopts "p:s:t:h" arg; do - case $arg in - p) - INSTALL_PREFIX=$OPTARG - ;; - s) - SOURCE_DIR=$OPTARG - ;; - t) - BUILD_UNITTEST=$OPTARG - ;; - h) # help - echo " -parameter: --p: install prefix --s: source directory --t: ON means build with unittest --h: help - -usage: -./azure_build.sh -p \${INSTALL_PREFIX} -s \${SOURCE_DIR} [-t \${BUILD_UNITTEST}] [-h] -" - exit 0 - ;; - ?) - echo "ERROR! unknown argument" - exit 1 - ;; - esac -done - -ARCHITECTURE=$(uname -m) -if [[ ${ARCHITECTURE} == "aarch64" ]]; then - export VCPKG_FORCE_SYSTEM_BINARIES="arm" -fi - -AZURE_CMAKE_CMD="cmake -DBUILD_UNIT_TEST=${BUILD_UNITTEST} \ --DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} \ -${SOURCE_DIR}" - -if [[ -f "/opt/vcpkg/scripts/buildsystems/vcpkg.cmake" ]]; then - AZURE_CMAKE_CMD="cmake -DBUILD_UNIT_TEST=${BUILD_UNITTEST} \ - -DCMAKE_TOOLCHAIN_FILE=/opt/vcpkg/scripts/buildsystems/vcpkg.cmake \ - -DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} \ - ${SOURCE_DIR}" -fi - -echo ${AZURE_CMAKE_CMD} -${AZURE_CMAKE_CMD} - -make install \ No newline at end of file diff --git a/scripts/core_build.sh b/scripts/core_build.sh index 66e2bb27f3..f7b38793e3 100755 --- a/scripts/core_build.sh +++ b/scripts/core_build.sh @@ -145,9 +145,6 @@ while getopts "p:t:s:n:a:y:x:o:f:ulcgbZh" arg; do y) USE_DYNAMIC_SIMD=$OPTARG ;; - Z) - BUILD_WITHOUT_AZURE="on" - ;; x) INDEX_ENGINE=$OPTARG ;;