- Use manylinux_2_35 (GLIBC 2.35) instead of manylinux2014 (GLIBC 2.17) - Still compatible with Google Colab (requires ≤2.35) - Benefits: newer toolchain, better performance, modern C++ features - Switch from yum to dnf package manager - Remove pyzmq version cap as manylinux_2_35 has newer ZeroMQ - Update documentation to reflect the change
1.9 KiB
1.9 KiB
Manylinux Build Strategy
Problem
Google Colab requires wheels compatible with manylinux_2_35_x86_64 or earlier. Our previous builds were producing manylinux_2_39_x86_64 wheels, which are incompatible.
Solution
We're using cibuildwheel with manylinux_2_35 images to build wheels that are compatible with Google Colab while maintaining modern toolchain features.
Key Changes
-
cibuildwheel Configuration
- Using
manylinux2014images (providesmanylinux_2_17compatibility) - Using
yumpackage manager (CentOS 7 based) - Installing
cmake3and creating symlink for compatibility
- Using
-
Build Matrix
- Python versions: 3.9, 3.10, 3.11, 3.12, 3.13
- Platforms: Linux (x86_64), macOS
- No Windows support (not required)
-
Dependencies
- Linux: gcc-c++, boost-devel, zeromq-devel, openblas-devel, cmake3
- macOS: boost, zeromq, openblas, cmake (via Homebrew)
-
Environment Variables
CMAKE_BUILD_PARALLEL_LEVEL=8: Speed up buildsPython_FIND_VIRTUALENV=ONLY: Help CMake find Python in cibuildwheel envPython3_FIND_VIRTUALENV=ONLY: Alternative variable for compatibility
Testing Strategy
-
CI Pipeline:
test-manylinux.yml- Triggers on PR to main, manual dispatch, or push to
fix/manylinux-*branches - Builds wheels using cibuildwheel
- Tests installation on Ubuntu 22.04 (simulating Colab)
- Triggers on PR to main, manual dispatch, or push to
-
Local Testing
# Download built wheels # Test in fresh environment python -m venv test_env source test_env/bin/activate pip install leann_core-*.whl leann_backend_hnsw-*manylinux*.whl leann-*.whl python -c "from leann import LeannBuilder; print('Success!')"