-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow for (local) building of manylinux2014 wheels
- Loading branch information
Showing
2 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/bin/bash | ||
set -e -u -x | ||
# Build manylinux compatible wheel files using docker... | ||
|
||
DIRECTORY=/io/accelerate | ||
DIST=${DIRECTORY}/manylinux-dist | ||
|
||
function repair_wheel { | ||
wheel="$1" | ||
if ! auditwheel show "$wheel"; then | ||
echo "Skipping non-platform wheel $wheel" | ||
else | ||
auditwheel repair "$wheel" --plat "$PLAT" -w ${DIST} | ||
fi | ||
} | ||
|
||
|
||
# Install a system package required by our library | ||
# yum install -y atlas-devel | ||
|
||
# Compile wheels | ||
cd ${DIRECTORY} | ||
|
||
for PYBIN in /opt/python/*/bin; do | ||
"${PYBIN}/pip" install -r ${DIRECTORY}/dev-requirements.txt | ||
PIP_PLATFORM=${PLAT} "${PYBIN}/pip" wheel ${DIRECTORY} --no-deps -w ${DIST} | ||
done | ||
|
||
# Bundle external shared libraries into the wheels | ||
for whl in ${DIST}/*.whl; do | ||
repair_wheel "$whl" | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#! /bin/bash | ||
|
||
docker run \ | ||
-it \ | ||
-v`pwd`:/io \ | ||
-ephemeral \ | ||
-ePLAT=manylinux2014_x86_64 \ | ||
--rm \ | ||
quay.io/pypa/manylinux2014_x86_64 \ | ||
/io/accelerate/_build-manylinux.sh |