Skip to content

Commit ae92b3c

Browse files
MrLohcursoragent
andcommitted
fix: CI build deps and Conan GLIBC compatibility
Keep --update in conan install so stale recipe revisions in the persistent CI Conan cache get refreshed, but force bison/flex/libtool/openssl to build from source on Linux to avoid remote binaries compiled against GLIBC_2.29+. Install missing deps in ci/entrypoint.sh (openblas-devel for cblas.h, perl-IPC-Cmd/perl-Digest-SHA for openssl source build) until the base image is rebuilt from scripts/Dockerfile.manylinux.*. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 0c0bd2d commit ae92b3c

5 files changed

Lines changed: 22 additions & 8 deletions

File tree

ci/entrypoint.sh

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
#!/bin/bash
2-
git config --global --add safe.directory /root/milvus-lite/thirdparty/milvus;
2+
set -e
3+
git config --global --add safe.directory /root/milvus-lite/thirdparty/milvus
4+
5+
# Deps missing from the current milvusdb/milvus-env:lite-main image:
6+
# - openblas-devel: cblas.h header needed by knowhere
7+
# - libatomic-static: static libatomic.a needed at link time
8+
# - perl-IPC-Cmd/perl-Digest-SHA: needed when openssl is built from source via Conan
9+
# These can be removed once the base image is rebuilt from scripts/Dockerfile.manylinux.*
10+
yum install -y openblas-devel libatomic-static perl-IPC-Cmd perl-Digest-SHA 2>/dev/null || true
11+
cp /usr/lib/gcc/x86_64-redhat-linux/8/libatomic.a /usr/lib64/ 2>/dev/null || true
12+
# RHEL 8 openblas-devel puts headers in /usr/include/openblas/ not /usr/include/
13+
ln -sf /usr/include/openblas/*.h /usr/include/ 2>/dev/null || true
14+
315
cd python
416
python3 -m build --wheel
517

python/setup.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,16 @@ def run(self):
105105
subprocess.call(['conan', 'remote', 'add', 'default-conan-local', 'https://milvus01.jfrog.io/artifactory/api/conan/default-conan-local'],
106106
cwd=build_temp, env=env)
107107
if sys.platform.lower() == 'linux':
108-
subprocess.check_call(['conan', 'install', extdir, '--build=missing', '-s', 'build_type=Release', '-s', 'compiler.libcxx=libstdc++11'],
108+
subprocess.check_call(['conan', 'install', extdir,
109+
'--build=missing', '--update',
110+
'--build=bison', '--build=flex',
111+
'--build=libtool', '--build=openssl',
112+
'-s', 'build_type=Release',
113+
'-s', 'compiler.libcxx=libstdc++11'],
109114
cwd=build_temp, env=env)
110115
else:
111116
# macos
112-
subprocess.check_call(['conan', 'install', extdir, '--build=missing', '-s', 'build_type=Release'], cwd=build_temp, env=env)
117+
subprocess.check_call(['conan', 'install', extdir, '--build=missing', '--update', '-s', 'build_type=Release'], cwd=build_temp, env=env)
113118
# build
114119
extra_cmake_args = shlex.split(env.get('CMAKE_ARGS', ''))
115120
extra_build_args = shlex.split(env.get('BUILD_ARGS', ''))

scripts/Dockerfile.manylinux.aarch64

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
FROM quay.io/pypa/manylinux_2_28_aarch64:2024.07.07-1
1414

15-
RUN yum install -y openblas-devel libatomic-static git && cp /usr/lib/gcc/aarch64-redhat-linux/8/libatomic.a /usr/lib64/
15+
RUN yum install -y openblas-devel libatomic-static git perl-IPC-Cmd perl-Digest-SHA && cp /usr/lib/gcc/aarch64-redhat-linux/8/libatomic.a /usr/lib64/
1616
ENV PATH="/opt/_internal/cpython-3.8.19/bin:${PATH}"
1717
RUN pip3 install conan==1.63.0
1818
RUN curl https://sh.rustup.rs -sSf | bash -s -- --default-toolchain=1.89 -y

scripts/Dockerfile.manylinux.x86_64

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
FROM quay.io/pypa/manylinux_2_28_x86_64:2024.07.07-1
1414

15-
RUN yum install -y openblas-devel libatomic-static git && cp /usr/lib/gcc/x86_64-redhat-linux/8/libatomic.a /usr/lib64/
15+
RUN yum install -y openblas-devel libatomic-static git perl-IPC-Cmd perl-Digest-SHA && cp /usr/lib/gcc/x86_64-redhat-linux/8/libatomic.a /usr/lib64/
1616
ENV PATH="/opt/_internal/cpython-3.8.19/bin:${PATH}"
1717
RUN pip3 install conan==1.63.0
1818
RUN curl https://sh.rustup.rs -sSf | bash -s -- --default-toolchain=1.89 -y

scripts/build_local.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,6 @@ conan remote add default-conan-local \
6464
https://milvus01.jfrog.io/artifactory/api/conan/default-conan-local \
6565
--insert 0 >> $LOG 2>&1 || true
6666
67-
# Perl modules needed if openssl must be built from source
68-
yum install -y perl-IPC-Cmd perl-Digest-SHA >> $LOG 2>&1 || true
69-
7067
cd /workspace/milvus-lite/python
7168
echo "==> Starting wheel build..." | tee -a $LOG
7269
python3 -m build --wheel --no-isolation >> $LOG 2>&1 \

0 commit comments

Comments
 (0)