-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
81 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,10 @@ | ||
FROM ghcr.io/bjia56/armv7l-wheel-builder:main | ||
|
||
WORKDIR / | ||
RUN wget -q https://github.com/OpenMathLib/OpenBLAS/releases/download/v0.3.23/OpenBLAS-0.3.23.tar.gz && \ | ||
tar xf OpenBLAS-0.3.23.tar.gz && \ | ||
cd OpenBLAS-0.3.23 && \ | ||
mkdir -p /tmp/vendor && \ | ||
make PREFIX=/tmp/vendor TARGET=ARMV7 -j4 && \ | ||
make PREFIX=/tmp/vendor TARGET=ARMV7 install | ||
|
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,25 @@ | ||
FROM base | ||
ARG PYTHON_VERSION | ||
ARG VERSION | ||
ARG OUTPUT_DIR | ||
|
||
ENV CFLAGS='-I/usr/local/ssl/include -I/tmp/vendor/include' | ||
ENV LDFLAGS='-L/usr/local/ssl/lib -L/tmp/vendor/lib' | ||
ENV LD_LIBRARY_PATH=/tmp/vendor/lib:/usr/local/ssl/lib:$LD_LIBRARY_PATH | ||
ENV PKG_CONFIG_PATH=/tmp/vendor/lib/pkgconfig:/usr/local/ssl/lib/pkgconfig | ||
|
||
ENV CC=/opt/rh/devtoolset-10/root/usr/bin/gcc | ||
ENV FC=/opt/rh/devtoolset-10/root/usr/bin/gfortran5 | ||
ENV CXX=/opt/rh/devtoolset-10/root/usr/bin/g++ | ||
ENV LD=/opt/rh/devtoolset-10/root/usr/bin/ld | ||
|
||
COPY . /repo | ||
|
||
RUN mkdir /scipy | ||
WORKDIR /scipy | ||
RUN select_python ${PYTHON_VERSION} | ||
RUN pip3 install setuptools==49.2.0 | ||
RUN export OPENBLAS=/tmp/vendor && /repo/armv7l_build_wheels.sh ${PYTHON_VERSION} ${VERSION} | ||
|
||
RUN mkdir -p ${OUTPUT_DIR} && \ | ||
cp build${PYTHON_VERSION}/wheelhouse/scipy*manylinux*armv7l.whl ${OUTPUT_DIR} |
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,31 @@ | ||
#!/bin/bash | ||
|
||
PYTHON3_VERSION=$1 | ||
PACKAGE_VERSION=$2 | ||
|
||
set -e | ||
|
||
build_wheel() ( | ||
PY_VER=$1 | ||
VER=$2 | ||
mkdir build$PY_VER | ||
cd build$PY_VER | ||
pip$PY_VER wheel --no-deps scipy==$VER | ||
) | ||
|
||
test_wheel() ( | ||
PY_VER=$1 | ||
cd build$PY_VER | ||
pip$PY_VER install wheelhouse/scipy*manylinux*armv7l.whl | ||
python$PY_VER -c "import scipy; print(scipy)" | ||
) | ||
|
||
repair_wheel() ( | ||
PY_VER=$1 | ||
cd build$PY_VER | ||
auditwheel repair scipy*armv7l.whl | ||
) | ||
|
||
build_wheel $PYTHON3_VERSION $PACKAGE_VERSION | ||
repair_wheel $PYTHON3_VERSION | ||
test_wheel $PYTHON3_VERSION |
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,15 @@ | ||
strategy: dockerfile | ||
source: | ||
- file: ./Dockerfile.stage1 | ||
common: true | ||
- file: ./Dockerfile.stage2 | ||
|
||
python: | ||
versions: | ||
- "3.9" | ||
- "3.10" | ||
- "3.11" | ||
- "3.12" | ||
|
||
package: | ||
versions: latest |