fix: build milvus in rockylinux8 (#32619)

issue: #32299

1. xz utils recovers
2. forget to install ninja

Signed-off-by: PowderLi <min.li@zilliz.com>
This commit is contained in:
PowderLi 2024-04-29 14:53:26 +08:00 committed by GitHub
parent f07e78ec91
commit 6289f3a9eb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 15 additions and 11 deletions

View File

@ -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 /

View File

@ -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

View File

@ -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)