From 6289f3a9eb0c6a511f74aeeca98bacc73eeb2427 Mon Sep 17 00:00:00 2001 From: PowderLi <135960789+PowderLi@users.noreply.github.com> Date: Mon, 29 Apr 2024 14:53:26 +0800 Subject: [PATCH] fix: build milvus in rockylinux8 (#32619) issue: #32299 1. xz utils recovers 2. forget to install ninja Signed-off-by: PowderLi --- .../docker/builder/cpu/rockylinux8/Dockerfile | 20 +++++++++++-------- .../docker/builder/gpu/ubuntu22.04/Dockerfile | 2 +- .../cmake-modules/AzureVcpkg.cmake | 4 ++-- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/build/docker/builder/cpu/rockylinux8/Dockerfile b/build/docker/builder/cpu/rockylinux8/Dockerfile index e3078bc1a4..74e625b57f 100644 --- a/build/docker/builder/cpu/rockylinux8/Dockerfile +++ b/build/docker/builder/cpu/rockylinux8/Dockerfile @@ -31,18 +31,19 @@ FROM rockylinux/rockylinux:8 ARG TARGETARCH -RUN dnf install -y make automake gcc gcc-c++ curl zip unzip tar git which \ +RUN dnf install -y make cmake automake gcc gcc-c++ curl zip unzip tar git which \ libaio libuuid-devel wget python3 python3-pip \ - pkg-config perl-IPC-Cmd perl-Digest-SHA libatomic libtool + pkg-config perl-IPC-Cmd perl-Digest-SHA libatomic libtool -# install openblas-devel and texinfo -RUN dnf -y install dnf-plugins-core && \ +# install openblas-devel texinfo ninja +RUN dnf -y update && \ + dnf -y install dnf-plugins-core && \ dnf config-manager --set-enabled powertools && \ - dnf -y install texinfo openblas-devel + dnf -y install texinfo openblas-devel ninja-build + RUN pip3 install conan==1.61.0 RUN mkdir -p /usr/local/go && wget -qO- "https://go.dev/dl/go1.20.7.linux-$TARGETARCH.tar.gz" | tar --strip-components=1 -xz -C /usr/local/go -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 curl https://sh.rustup.rs -sSf | \ sh -s -- --default-toolchain=1.73 -y @@ -50,9 +51,12 @@ 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/master.tar.gz | tar --strip-components=1 -xz -C /opt/vcpkg && \ + rm -rf vcpkg.tar.gz # Copy the vcpkg installed libraries -COPY --from=vcpkg-installer /opt/vcpkg \ - /opt/vcpkg +COPY --from=vcpkg-installer /root/.cache/vcpkg /root/.cache/vcpkg COPY --chown=0:0 build/docker/builder/entrypoint.sh / diff --git a/build/docker/builder/gpu/ubuntu22.04/Dockerfile b/build/docker/builder/gpu/ubuntu22.04/Dockerfile index f4160efdab..df5b979eae 100644 --- a/build/docker/builder/gpu/ubuntu22.04/Dockerfile +++ b/build/docker/builder/gpu/ubuntu22.04/Dockerfile @@ -22,7 +22,7 @@ RUN curl https://sh.rustup.rs -sSf | \ 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/milvus-io/vcpkg/archive/master.tar.gz | tar --strip-components=1 -xz -C /opt/vcpkg && \ + wget -qO- vcpkg.tar.gz https://github.com/microsoft/vcpkg/archive/master.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 diff --git a/internal/core/src/storage/azure-blob-storage/cmake-modules/AzureVcpkg.cmake b/internal/core/src/storage/azure-blob-storage/cmake-modules/AzureVcpkg.cmake index 428a6f6777..4d9aedf6cd 100644 --- a/internal/core/src/storage/azure-blob-storage/cmake-modules/AzureVcpkg.cmake +++ b/internal/core/src/storage/azure-blob-storage/cmake-modules/AzureVcpkg.cmake @@ -18,7 +18,7 @@ macro(az_vcpkg_integrate) message("AZURE_SDK_DISABLE_AUTO_VCPKG is not defined. Fetch a local copy of vcpkg.") # GET VCPKG FROM SOURCE # User can set env var AZURE_SDK_VCPKG_COMMIT to pick the VCPKG commit to fetch - set(VCPKG_COMMIT_STRING 061fe134942a36905e12c11477c8eba761bffc5f) # default SDK tested commit + set(VCPKG_COMMIT_STRING 8150939b69720adc475461978e07c2d2bf5fb76e) # default SDK tested commit if(DEFINED ENV{AZURE_SDK_VCPKG_COMMIT}) message("AZURE_SDK_VCPKG_COMMIT is defined. Using that instead of the default.") set(VCPKG_COMMIT_STRING "$ENV{AZURE_SDK_VCPKG_COMMIT}") # default SDK tested commit @@ -27,7 +27,7 @@ macro(az_vcpkg_integrate) include(FetchContent) FetchContent_Declare( vcpkg - GIT_REPOSITORY https://github.com/milvus-io/vcpkg.git + GIT_REPOSITORY https://github.com/microsoft/vcpkg.git GIT_TAG ${VCPKG_COMMIT_STRING} ) FetchContent_GetProperties(vcpkg)