- Switch from manylinux_2_28 to manylinux2014 (provides manylinux_2_17) - This should produce wheels compatible with manylinux_2_35_x86_64 requirement - Update package manager from dnf to yum for CentOS 7 - Use cmake3 with symlink for compatibility
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 manylinux2014 images to build wheels that are compatible with a wide range of Linux distributions, including Google Colab.
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!')"