From 51ed48b6fb22686560e31eb88431c7c6f877e1f1 Mon Sep 17 00:00:00 2001 From: Junya Morioka Date: Thu, 11 Dec 2025 02:37:17 +0900 Subject: [PATCH] ci: add manylinux wheel generation and upload in Linux self-hosted build - Add auditwheel repair step to generate manylinux-compatible wheels - Verify manylinux wheel installation and package imports - Upload repaired wheels to GitHub release with --clobber flag --- .github/workflows/_build_linux_self_host.yml | 28 ++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/.github/workflows/_build_linux_self_host.yml b/.github/workflows/_build_linux_self_host.yml index 1115483..3112c5d 100644 --- a/.github/workflows/_build_linux_self_host.yml +++ b/.github/workflows/_build_linux_self_host.yml @@ -148,6 +148,34 @@ jobs: # Upload the release asset using GitHub CLI gh release upload "$tag_name" "$wheel_path" --clobber + - name: Apply auditwheel repair + continue-on-error: true + run: | + pip install auditwheel + auditwheel show flash-attention/dist/${{ steps.build_wheels.outputs.WHEEL_NAME }} + auditwheel repair flash-attention/dist/${{ steps.build_wheels.outputs.WHEEL_NAME }} -w flash-attention/dist_manylinux + wheel_name=$(basename $(ls flash-attention/dist_manylinux/*.whl | head -n 1)) + echo "WHEEL_NAME_MANYLINUX=$wheel_name" >> $GITHUB_OUTPUT + + - name: Apply auditwheel repair + if: ${{ inputs.is-upload }} + continue-on-error: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + pip uninstall -y flash-attn > /dev/null 2>&1 + pip install --no-cache-dir flash-attention/dist_manylinux/${{ steps.build_wheels.outputs.WHEEL_NAME_MANYLINUX }} + python -c "import flash_attn; print(flash_attn.__version__)" + + wheel_path_manylinux="flash-attention/dist_manylinux/${{ steps.build_wheels.outputs.WHEEL_NAME_MANYLINUX }}" + if [ ! -f "$wheel_path_manylinux" ]; then + echo "Error: Wheel file not found at $wheel_path_manylinux" + exit 1 + fi + + # Upload the release asset using GitHub CLI + gh release upload "$tag_name" "$wheel_path_manylinux" --clobber + - name: Clean up shell: bash if: always()