Skip to content

Commit

Permalink
Fix Linux aarch64 CI failure due to the latest pytest: use old qemu d…
Browse files Browse the repository at this point in the history
…ocker (#3736) (#3773)

Co-authored-by: Chun-Wei Chen <jacky82226@gmail.com>
Co-authored-by: Ashwini Khade <askhade@microsoft.com>
  • Loading branch information
3 people authored Oct 22, 2021
1 parent 8a882d8 commit 87435aa
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/manylinux/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ cd $ONNX_PATH
# Compile wheels
# Need to be updated if there is a new Python Version
if [ `uname -m` == 'aarch64' ]; then
PIP_COMMAND="$PY_VERSION -m pip install --no-cache-dir"
PIP_COMMAND="$PY_VERSION -m pip install --no-cache-dir -q"
PYTHON_COMMAND="$PY_VERSION"
else
declare -A python_map=( ["3.6"]="cp36-cp36m" ["3.7"]="cp37-cp37m" ["3.8"]="cp38-cp38" ["3.9"]="cp39-cp39")
declare -A python_include=( ["3.6"]="3.6m" ["3.7"]="3.7m" ["3.8"]="3.8" ["3.9"]="3.9")
PY_VER=${python_map[$PY_VERSION]}
PIP_COMMAND="/opt/python/${PY_VER}/bin/pip install --no-cache-dir"
PIP_COMMAND="/opt/python/${PY_VER}/bin/pip install --no-cache-dir -q"
PYTHON_COMMAND="/opt/python/"${PY_VER}"/bin/python"
fi

Expand Down
26 changes: 20 additions & 6 deletions .github/workflows/release_linux_aarch64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ jobs:
# setting up qemu for enabling aarch64 binary execution on x86 machine
- uses: docker/setup-qemu-action@v1
with:
# TODO: freeze version for now since the latest one cannot use jupyter
image: tonistiigi/binfmt:qemu-v6.0.0-12

# Creating a virtual environment on machine with the help of docker container \
# and installing the dependencies inside that \
Expand All @@ -42,7 +45,7 @@ jobs:
run: |
docker run --rm -v ${{ github.workspace }}:/ws:rw --workdir=/ws \
${{ env.img }} \
bash -exc '${{ env.py }} -m pip install virtualenv && ${{ env.py }} -m venv .env && \
bash -exc '${{ env.py }} -m pip install -q virtualenv && ${{ env.py }} -m venv .env && \
source .env/bin/activate && \
${{ env.py }} -m pip install -U numpy protobuf==3.16.0 && \
yum install -y protobuf-compiler protobuf-devel
Expand All @@ -67,9 +70,9 @@ jobs:
${{ env.img }} \
bash -exc '\
source .env/bin/activate && \
python -m pip install --upgrade pip && \
python -m pip install -q --upgrade pip && \
python -m pip install -q -r requirements-release.txt && \
pip install dist/*manylinux2014_aarch64.whl && \
pip install pytest nbval ipython==7.16.1 && \
pytest && \
deactivate'
Expand Down Expand Up @@ -104,9 +107,20 @@ jobs:
${{ env.img }} \
bash -exc '\
source .env/bin/activate && \
python -m pip uninstall -y numpy onnx && python -m pip install numpy && \
python -m pip uninstall -y numpy onnx protobuf && python -m pip install numpy protobuf && \
python -m pip install dist/*manylinux2014_aarch64.whl && \
pytest && \
deactivate'
- name: Verify ONNX with the minimum supported protobuf (from requirements.txt)
if: ${{ always() }}
run: |
docker run --rm -v ${{ github.workspace }}:/ws:rw --workdir=/ws \
${{ env.img }} \
bash -exc '\
source .env/bin/activate && \
python -m pip uninstall -y onnx && python -m pip install protobuf==3.12.2 && \
python -m pip install dist/*manylinux2014_aarch64.whl && \
python -m pip install pytest && \
pytest && \
deactivate'
Expand All @@ -117,7 +131,7 @@ jobs:
${{ env.img }} \
bash -exc '\
source .env/bin/activate && \
python -m pip install flatbuffers && \
python -m pip install -q flatbuffers && \
python -m pip install -i https://test.pypi.org/simple/ ort-nightly && \
python onnx/test/test_with_ort.py && \
deactivate'
4 changes: 2 additions & 2 deletions requirements-release.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
numpy == 1.16.6
protobuf == 3.16.0
pytest == 5.4.3
pytest
nbval
ipython == 7.16.1
ipython
wheel
setuptools
twine

0 comments on commit 87435aa

Please sign in to comment.