Skip to content

Add Linux AArch64 wheel build support - #18

Closed
odidev wants to merge 1 commit into
osqp:masterfrom
odidev:odidev_aarch64
Closed

odidev wants to merge 1 commit into
osqp:masterfrom
odidev:odidev_aarch64

Conversation

@odidev

@odidev odidev commented Dec 27, 2021

Copy link
Copy Markdown

Added linux aarch64 wheel build support.
Related to #17, @bstellato Could you please review this PR?

Signed-off-by: odidev <odidev@puresoftware.com>
@CLAassistant

CLAassistant commented Dec 27, 2021 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@nrontsis

nrontsis commented Dec 9, 2022

Copy link
Copy Markdown

+1

1 similar comment
@mmiller-max

Copy link
Copy Markdown

+1

@nrontsis

nrontsis commented Feb 20, 2023 •

Copy link
Copy Markdown

Until this gets merged, here's how I generate wheels locally:

Save the following as build-qdldl-wheel.sh in an empty folder

#!/bin/bash
# Builds a wheel for qdldl
set -eu  # Stop script if a line fails
QDLDL_VERSION=${1}
echo "Building qdldl==$QDLDL_VERSION"

# numpy is in "install_requires" of qdldl - perhaps we don't need to install oldest-supported-numpy that is typically
# recommended for build requirements. https://numpy.org/devdocs/dev/depending_on_numpy.html#build-time-dependency
# However we install it here to be conservative, instead of just relying on the latest version.
python3 -m pip install oldest-supported-numpy

git clone --recurse-submodules https://github.com/osqp/qdldl-python --depth=1 --branch v$QDLDL_VERSION
pushd qdldl-python
mkdir dist
# Using constraints.txt might not be necessary if the package specifies build requirements correctly
# However, I prefer to be conservative here and end up with loud errors, rather than generate packages
# that have compatibility issues.
python3 -m pip freeze > constraints.txt
python3 -m pip wheel --constraint constraints.txt --wheel-dir=./dist .
for wheel in dist/qdldl*; do
    auditwheel repair $wheel  # Inject solver's shared libraries to wheel
done
for wheel in wheelhouse/*.whl; do
    cp -rf $wheel /wheels/ # Copy repaired wheel to shared volume
done
popd

popd

and then run from within that folder:

export PYTHON_BIN=/opt/python/cp311-cp311/bin/python
export QDLDL_VERSION=0.1.5.post3
docker run -v $(pwd):/wheels --rm --platform=linux/aarch64 quay.io/pypa/manylinux_2_28_aarch64 /bin/bash -c "\
    ln -s ${PYTHON_BIN} /bin/python3 && \
    bash /wheels/build-qdldl-wheel.sh ${QDLDL_VERSION}"

The generated wheel should appear in the folder the above command was executed from.

@imciner2

Copy link
Copy Markdown
Member

aarch64 linux wheels are now available on PyPi after the recent refactor of the CI pipelines.

@imciner2 imciner2 closed this Jun 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants