improve + cu129, cu130 #28
This file contains hidden or 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
| name: Build Wheels for Linux | |
| on: # yamllint disable-line rule:truthy | |
| push: | |
| branches: | |
| - aki/manylinux0 | |
| workflow_dispatch: | |
| schedule: | |
| - cron: "0 4 * * *" # Everyday at 4:00am UTC/8:00pm PST | |
| concurrency: | |
| group: aki_sunday | |
| cancel-in-progress: true | |
| defaults: | |
| run: | |
| shell: bash | |
| jobs: | |
| wheel: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| # TODO: Use native manylinux image for cpu. | |
| - {torch-version: 2.7.0, cuda-version: cu128} | |
| - {torch-version: 2.7.0, cuda-version: cu126} | |
| - {torch-version: 2.7.0, cuda-version: cu118} | |
| - {torch-version: 2.6.0, cuda-version: cu126} | |
| - {torch-version: 2.6.0, cuda-version: cu124} | |
| - {torch-version: 2.6.0, cuda-version: cu118} | |
| - {torch-version: 2.5.0, cuda-version: cu124} | |
| - {torch-version: 2.5.0, cuda-version: cu121} | |
| - {torch-version: 2.5.0, cuda-version: cu118} | |
| - {torch-version: 2.4.0, cuda-version: cu124} | |
| - {torch-version: 2.4.0, cuda-version: cu121} | |
| - {torch-version: 2.4.0, cuda-version: cu118} | |
| - {torch-version: 2.3.0, cuda-version: cu121} | |
| - {torch-version: 2.3.0, cuda-version: cu118} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Login to Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ vars.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Free up disk space | |
| if: ${{ runner.os == 'Linux' }} | |
| uses: jlumbroso/free-disk-space@v1.3.1 | |
| with: | |
| android: true | |
| dotnet: true | |
| haskell: true | |
| large-packages: true | |
| docker-images: true | |
| swap-storage: true | |
| tool-cache: true | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: 3.13 | |
| - name: Prepare for build | |
| run: | | |
| # Install dependencies: | |
| pip install --progress-bar off cibuildwheel auditwheel | |
| # Set version: | |
| VERSION=`sed -n "s/^__version__ = '\(.*\)'/\1/p" pyg_lib/__init__.py` | |
| TORCH_VERSION=`echo "pt${{ matrix.torch-version }}" | sed "s/..$//" | sed "s/\.//g"` | |
| CUDA_VERSION=`echo ${{ matrix.cuda-version }}` | |
| TODAY=`date +'%Y%m%d'` | |
| echo "New version name: $VERSION.dev$TODAY+$TORCH_VERSION$CUDA_VERSION" | |
| sed -i "s/$VERSION/$VERSION.dev$TODAY+$TORCH_VERSION$CUDA_VERSION/" setup.py | |
| sed -i "s/$VERSION/$VERSION.dev$TODAY+$TORCH_VERSION$CUDA_VERSION/" pyg_lib/__init__.py | |
| # Set torch cuda arch list: | |
| source .github/workflows/cuda/Linux-env.sh ${{ matrix.cuda-version }} | |
| echo "TORCH_CUDA_ARCH_LIST=$TORCH_CUDA_ARCH_LIST" >> $GITHUB_ENV | |
| echo $TORCH_CUDA_ARCH_LIST | |
| echo ${{ env.TORCH_CUDA_ARCH_LIST }} | |
| - name: Build wheels | |
| run: | | |
| # Build wheels: | |
| python -m cibuildwheel --output-dir dist | |
| # Show wheels: | |
| auditwheel show dist/*.whl | |
| ls -ahl dist/ | |
| env: | |
| CIBW_ENVIRONMENT: > | |
| FORCE_NINJA=1 | |
| FORCE_CUDA=1 | |
| CUDA_HOME=/usr/local/cuda | |
| TORCH_CUDA_ARCH_LIST='${{ env.TORCH_CUDA_ARCH_LIST }}' | |
| CIBW_BUILD_FRONTEND: "build; args: --no-isolation" | |
| CIBW_BUILD: "cp311-manylinux_x86_64" # TODO: Unpin Python version. | |
| CIBW_BEFORE_BUILD: > | |
| pip install --progress-bar off ninja && | |
| pip install --progress-bar off torch==${{ matrix.torch-version }} --index-url https://download.pytorch.org/whl/${{ matrix.cuda-version }} | |
| CIBW_MANYLINUX_X86_64_IMAGE: ${{ vars.DOCKERHUB_USERNAME }}/manylinux:${{ matrix.cuda-version }} | |
| CIBW_REPAIR_WHEEL_COMMAND: bash ./tools/repair_wheel.sh ${{ matrix.torch-version }} {dest_dir} {wheel} | |
| - name: Configure AWS | |
| uses: aws-actions/configure-aws-credentials@v4 | |
| with: | |
| aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| aws-region: us-west-1 | |
| - name: Upload wheel | |
| run: | | |
| aws s3 sync dist s3://data.pyg.org/whl/nightly/torch-${{ matrix.torch-version }}+${{ matrix.cuda-version }} --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers | |
| boto3: | |
| if: ${{ always() }} | |
| needs: [wheel] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: 3.9 | |
| - name: Install dependencies | |
| run: pip install boto3 | |
| - name: Upload index | |
| run: | | |
| python ./.github/workflows/aws/upload_nightly_index.py | |
| env: | |
| AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} |