Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into onnxruntime
Browse files Browse the repository at this point in the history
  • Loading branch information
bjia56 committed Jun 6, 2024
2 parents 9c1d4b7 + 1552c6f commit bc25387
Show file tree
Hide file tree
Showing 14 changed files with 536 additions and 9 deletions.
28 changes: 19 additions & 9 deletions .github/workflows/build_wheel_dockerfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,11 @@ jobs:
with:
driver-opts: network=host

- name: Create scoped tmpdir
run: |
mkdir -p /tmp/gha-run-${{ github.run_id }}-${{ github.run_attempt }}
echo "GHA_TMPDIR=/tmp/gha-run-${{ github.run_id }}-${{ github.run_attempt }}" >> $GITHUB_ENV
- name: Calculate previous build number
if: ${{ matrix.build_params['key'] != 1 }}
run: |
Expand All @@ -103,14 +108,14 @@ jobs:
if: ${{ matrix.build_params['key'] != 1 }}
with:
name: ${{ inputs.package }}-${{ inputs.version }}-cpython${{ inputs.python_version }}-dockerstage${{ env.PREVIOUS }}
path: /tmp
path: ${{ env.GHA_TMPDIR }}

- name: Load image
if: ${{ matrix.build_params['key'] != 1 }}
run: |
docker load --input /tmp/stage.tar
docker load --input ${{ env.GHA_TMPDIR }}/stage.tar
docker image ls -a
rm /tmp/stage.tar
rm ${{ env.GHA_TMPDIR }}/stage.tar
- name: Push image to local registry
if: ${{ matrix.build_params['key'] != 1 }}
Expand Down Expand Up @@ -145,30 +150,35 @@ jobs:
tags: armv7l:latest
cache-from: type=gha,scope=${{ env.CACHE_TAG }}
cache-to: type=gha,mode=max,scope=${{ env.CACHE_TAG }}
outputs: type=docker,dest=/tmp/stage.tar
outputs: type=docker,dest=${{ env.GHA_TMPDIR }}/stage.tar

- name: Upload artifact
uses: actions/upload-artifact@v4
if: ${{ matrix.build_params['key'] != fromJSON(needs.calculate_matrix.outputs.build_matrix_last) }}
with:
name: ${{ inputs.package }}-${{ inputs.version }}-cpython${{ inputs.python_version }}-dockerstage${{ matrix.build_params['key'] }}
path: /tmp/stage.tar
path: ${{ env.GHA_TMPDIR }}/stage.tar

- name: Load image
if: ${{ matrix.build_params['key'] == fromJSON(needs.calculate_matrix.outputs.build_matrix_last) }}
run: |
docker load --input /tmp/stage.tar
docker load --input ${{ env.GHA_TMPDIR }}/stage.tar
docker image ls -a
rm /tmp/stage.tar
rm ${{ env.GHA_TMPDIR }}/stage.tar
- name: Extract output
if: ${{ matrix.build_params['key'] == fromJSON(needs.calculate_matrix.outputs.build_matrix_last) }}
run: |
docker run -v /tmp/output:/host armv7l:latest bash -c "cp /export/* /host/"
docker run -v ${{ env.GHA_TMPDIR }}/output:/host armv7l:latest bash -c "cp /export/* /host/"
- name: Upload Artifacts
uses: actions/upload-artifact@v4
if: ${{ matrix.build_params['key'] == fromJSON(needs.calculate_matrix.outputs.build_matrix_last) }}
with:
name: ${{ inputs.package }}-${{ inputs.version }}-cpython${{ inputs.python_version }}
path: /tmp/output/*.whl
path: ${{ env.GHA_TMPDIR }}/output/*.whl

- name: Remove scoped tmpdir
if: ${{ always() }}
run: |
sudo rm -rf ${{ env.GHA_TMPDIR }}
24 changes: 24 additions & 0 deletions packages/lap/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
FROM ghcr.io/bjia56/armv7l-wheel-builder:main
ARG PYTHON_VERSION
ARG VERSION
ARG OUTPUT_DIR

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
ENV PATH=/opt/rh/devtoolset-10/root/usr/bin:$PATH

WORKDIR /
RUN select_python ${PYTHON_VERSION}
RUN python3 -m pip install numpy --extra-index-url https://bjia56.github.io/armv7l-wheels/ --prefer-binary
RUN mkdir lap
WORKDIR lap
RUN python3 -m pip install lap==${VERSION}
RUN cp $(pip cache list lap --format=abspath) .
RUN auditwheel repair lap-*.whl && \
pip3 install ./wheelhouse/lap-*manylinux*armv7l.whl --extra-index-url https://bjia56.github.io/armv7l-wheels/ --prefer-binary && \
python3 -c "import lap; print(lap)"

RUN mkdir -p ${OUTPUT_DIR} && \
cp ./wheelhouse/lap-*manylinux*armv7l.whl ${OUTPUT_DIR}
13 changes: 13 additions & 0 deletions packages/lap/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
strategy: dockerfile
source:
- file: ./Dockerfile

python:
versions:
- "3.7"
- "3.8"
- "3.9"
- "3.10"

package:
versions: latest
22 changes: 22 additions & 0 deletions packages/lapx/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM ghcr.io/bjia56/armv7l-wheel-builder:main
ARG PYTHON_VERSION
ARG VERSION
ARG OUTPUT_DIR

COPY . /repo

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
ENV PATH=/opt/rh/devtoolset-10/root/usr/bin:$PATH

WORKDIR /
RUN select_python ${PYTHON_VERSION}
RUN python3 -m pip install numpy --extra-index-url https://bjia56.github.io/armv7l-wheels/ --prefer-binary
RUN mkdir lapx
WORKDIR lapx
RUN /repo/armv7l_build_wheels.sh ${PYTHON_VERSION} ${VERSION}

RUN mkdir -p ${OUTPUT_DIR} && \
cp build${PYTHON_VERSION}/wheelhouse/lapx*manylinux*armv7l.whl ${OUTPUT_DIR}
31 changes: 31 additions & 0 deletions packages/lapx/armv7l_build_wheels.sh
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 lapx==$VER
)

test_wheel() (
PY_VER=$1
cd build$PY_VER
pip$PY_VER install wheelhouse/lapx*manylinux*armv7l.whl
python$PY_VER -c "import lap; print(lap)"
)

repair_wheel() (
PY_VER=$1
cd build$PY_VER
auditwheel repair lapx*armv7l.whl
)

build_wheel $PYTHON3_VERSION $PACKAGE_VERSION
repair_wheel $PYTHON3_VERSION
test_wheel $PYTHON3_VERSION
15 changes: 15 additions & 0 deletions packages/lapx/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
strategy: dockerfile
source:
- file: ./Dockerfile

python:
versions:
- "3.7"
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"

package:
versions: latest
11 changes: 11 additions & 0 deletions packages/pandas/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
strategy: pypi

python:
versions:
- "3.9"
- "3.10"
- "3.11"
- "3.12"

package:
versions: latest
20 changes: 20 additions & 0 deletions pypi/av/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,26 @@
<a href="https://github.com/bjia56/armv7l-wheels/releases/download/av-12.0.0-cpython3.12/av-12.0.0-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl">
av-12.0.0-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
</a>
<br/>
<a href="https://github.com/bjia56/armv7l-wheels/releases/download/av-12.1.0-cpython3.8/av-12.1.0-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl">
av-12.1.0-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
</a>
<br/>
<a href="https://github.com/bjia56/armv7l-wheels/releases/download/av-12.1.0-cpython3.9/av-12.1.0-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl">
av-12.1.0-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
</a>
<br/>
<a href="https://github.com/bjia56/armv7l-wheels/releases/download/av-12.1.0-cpython3.10/av-12.1.0-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl">
av-12.1.0-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
</a>
<br/>
<a href="https://github.com/bjia56/armv7l-wheels/releases/download/av-12.1.0-cpython3.11/av-12.1.0-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl">
av-12.1.0-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
</a>
<br/>
<a href="https://github.com/bjia56/armv7l-wheels/releases/download/av-12.1.0-cpython3.12/av-12.1.0-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl">
av-12.1.0-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
</a>
<hr/>
</div>
</body>
Expand Down
24 changes: 24 additions & 0 deletions pypi/cryptography/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,30 @@
<a href="https://github.com/bjia56/armv7l-wheels/releases/download/cryptography-42.0.7-cpython3.12/cryptography-42.0.7-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl">
cryptography-42.0.7-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
</a>
<br/>
<a href="https://github.com/bjia56/armv7l-wheels/releases/download/cryptography-42.0.8-cpython3.7/cryptography-42.0.8-cp37-cp37m-manylinux_2_17_armv7l.manylinux2014_armv7l.whl">
cryptography-42.0.8-cp37-cp37m-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
</a>
<br/>
<a href="https://github.com/bjia56/armv7l-wheels/releases/download/cryptography-42.0.8-cpython3.8/cryptography-42.0.8-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl">
cryptography-42.0.8-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
</a>
<br/>
<a href="https://github.com/bjia56/armv7l-wheels/releases/download/cryptography-42.0.8-cpython3.9/cryptography-42.0.8-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl">
cryptography-42.0.8-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
</a>
<br/>
<a href="https://github.com/bjia56/armv7l-wheels/releases/download/cryptography-42.0.8-cpython3.10/cryptography-42.0.8-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl">
cryptography-42.0.8-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
</a>
<br/>
<a href="https://github.com/bjia56/armv7l-wheels/releases/download/cryptography-42.0.8-cpython3.11/cryptography-42.0.8-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl">
cryptography-42.0.8-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
</a>
<br/>
<a href="https://github.com/bjia56/armv7l-wheels/releases/download/cryptography-42.0.8-cpython3.12/cryptography-42.0.8-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl">
cryptography-42.0.8-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
</a>
<hr/>
</div>
</body>
Expand Down
25 changes: 25 additions & 0 deletions pypi/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,19 @@
<link crossorigin="anonymous" href="https://cdnjs.cloudflare.com/ajax/libs/skeleton/2.0.4/skeleton.min.css" rel="stylesheet"/>
<!-- Font -->
<link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;600&amp;display=swap" rel="stylesheet" type="text/css"/>
<script>
document.addEventListener('DOMContentLoaded', function() {
function sortCards() {
const cards = Array.from(document.querySelectorAll('a.card'));
cards.sort((a, b) => a.textContent.localeCompare(b.textContent));
const parent = cards[0].parentNode;
cards.forEach(card => parent.removeChild(card));
cards.forEach(card => parent.appendChild(card));
}

sortCards();
});
</script>
<style>
body { font-family: "Montserrat"; }
code {
Expand Down Expand Up @@ -146,6 +159,18 @@ <h6 class="text-header">
<a class="card" href="zeroconf/">
zeroconf
</a>
<a class="card" href="matplotlib/">
matplotlib
</a>
<a class="card" href="openvino/">
openvino
</a>
<a class="card" href="lap/">
lap
</a>
<a class="card" href="lapx/">
lapx
</a>
</div>
</body>
</html>
81 changes: 81 additions & 0 deletions pypi/lap/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8"/>
<meta content="width=device-width, initial-scale=1, shrink-to-fit=no" name="viewport"/>
<!-- Skeleton CSS -->
<link crossorigin="anonymous" href="https://cdnjs.cloudflare.com/ajax/libs/skeleton/2.0.4/skeleton.min.css" rel="stylesheet"/>
<!-- Font -->
<link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;600&amp;display=swap" rel="stylesheet" type="text/css"/>
<style>
body { font-family: "Montserrat"; }
code {
font-size: 100%;
display: inline-block !important;
font-size: 1.4rem; }
.header {
margin-top: 15rem;
font-size: 3.6rem;
font-weight: 400;
letter-spacing: -.1rem; }
.text-header {
text-transform: uppercase;
font-size: 1.4rem;
letter-spacing: .2rem;
font-weight: 600; }
.version {
font-size: 2.3rem;
font-style: italic;
font-weight: 300; }
.elem { margin: 1rem 0rem; }
</style>
<title>
PyPI - Python Wheels for armv7l
</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.4/jquery.min.js">
</script>
<script>
function annotateDownloadCount(releaseTag, anchorElement) {
fetch("https://api.github.com/repos/bjia56/armv7l-wheels/releases/tags/" + releaseTag)
.then(async resp => {
let release = await resp.json();
let downloadCount = release.assets[0].download_count;
anchorElement.innerText = anchorElement.innerText + " (" + downloadCount + " downloads)";
})
.catch(e => console.log(e));
}

function annotateAll() {
Array.from(document.links).forEach(anchor => annotateDownloadCount(anchor.href.split("/")[7], anchor));
}

$(document).ready(annotateAll);
</script>
</head>
<body>
<div class="container">
<section class="header">
lap
</section>
<pre><code>pip install lap --extra-index-url https://bjia56.github.io/armv7l-wheels/</code></pre>
<br/>
<a href="https://github.com/bjia56/armv7l-wheels/releases/download/lap-0.4.0-cpython3.7/lap-0.4.0-cp37-cp37m-manylinux_2_17_armv7l.manylinux2014_armv7l.whl">
lap-0.4.0-cp37-cp37m-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
</a>
<br/>
<a href="https://github.com/bjia56/armv7l-wheels/releases/download/lap-0.4.0-cpython3.8/lap-0.4.0-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl">
lap-0.4.0-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
</a>
<br/>
<a href="https://github.com/bjia56/armv7l-wheels/releases/download/lap-0.4.0-cpython3.9/lap-0.4.0-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl">
lap-0.4.0-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
</a>
<br/>
<a href="https://github.com/bjia56/armv7l-wheels/releases/download/lap-0.4.0-cpython3.10/lap-0.4.0-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl">
lap-0.4.0-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
</a>
<hr/>
</div>
</body>
</html>
Loading

0 comments on commit bc25387

Please sign in to comment.