Skip to content

Wheels debug

Wheels debug #22

Workflow file for this run

name: Build PyTorch Wheels
on:
push:
branches:
- main
pull_request:
jobs:
build-wheels:
runs-on: ubuntu-latest
strategy:
matrix:
cibw-arch: ["x86_64"]
cibw-python: ['cp310-*', 'cp311-*', 'cp312-*']
python-version: [3.10, 3.11]
pytorch-version: [2.4.0, 2.5.0]
cuda-version: [12.1, 12.4]
cuversion: [121, 124]
env:
CIBW_SKIP: cp36-* cp37-* cp38-* cp39-*
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Github Actions Envs Setup
run: |
CUVERSION=${{matrix.cuda-version}}
PYTHONVERSION=${{matrix.python-version}}
CU_VERSION_NO_DOT=${CUVERSION//./}
echo CU_VERSION_NO_DOT=${CU_VERSION_NO_DOT} >> $GITHUB_ENV
CU_VERSION_DASH=${CUVERSION//./-}
echo CU_VERSION_DASH=${CU_VERSION_DASH} >> $GITHUB_ENV
PYTHON_VER_NO_DOT=${PYTHONVERSION//./}
echo PYTHON_VER_NO_DOT=${PYTHON_VER_NO_DOT} >> $GITHUB_ENV
# Build the custom Manylinux Docker image
- name: Build Manylinux Docker Image
run: |
docker build --no-cache \
-t manylinux2014_${{ matrix.cibw-arch }} \
--build-arg PYTHON_VER=${{ matrix.python-version }} \
--build-arg PYTHON_VER_NO_DOT=${{ env.PYTHON_VER_NO_DOT }} \
--build-arg CUDA_VER=${{ matrix.cuda-version }} \
--build-arg CUDA_VER_NO_DOT=${{ env.CU_VERSION_NO_DOT }} \
--build-arg CUDA_VER_DASH=${{ env.CU_VERSION_DASH }} \
--build-arg PYTORCH_VERSION=${{ matrix.pytorch-version }} \
scripts/manylinux2014_${{ matrix.cibw-arch }}
# Set up Python environment
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
# Install cibuildwheel and other required tools
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
python -m pip install cibuildwheel build
- name: Build wheels
uses: pypa/cibuildwheel@v2.22.0
env:
CUDA_HOME: /usr/local/cuda
PIP_EXTRA_INDEX_URL: https://download.pytorch.org/whl/cu${{ env.CUVERSION }}
CIBW_BUILD_VERBOSITY: 3
CIBW_BUILD: ${{ matrix.cibw-python }}
CIBW_BUILD_FRONTEND: "pip; args: --no-build-isolation"
CIBW_SKIP: "*-musllinux* *-win32 *-manylinux_i686"
CIBW_ARCHS: ${{ matrix.cibw-arch }}
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014_${{ matrix.cibw-arch }}
#CIBW_ENVIRONMENT: >
# CUDA_HOME=/usr/local/cuda
# PIP_EXTRA_INDEX_URL=https://download.pytorch.org/whl/cu${{ matrix.cuda-version.replace('.', '') }}
CIBW_REPAIR_WHEEL_COMMAND_LINUX: |
auditwheel repair --exclude libcuda.so --exclude libcuda.so.1 --exclude libc10.so --exclude libtorch.so --exclude libtorch_cpu.so --exclude libtorch_cuda.so --exclude libc10_cuda.so --exclude libcudart.so --exclude libnvToolsExt.so --exclude libnvrtc.so --exclude libnvrtc.so.12 -w {dest_dir} {wheel}
- uses: actions/upload-artifact@v4
with:
name: "cuda_mace-py-${{ env.PYTHON_VER_NO_DOT }}-torch-${{matrix.pytorch-version}}+cu${{ env.CU_VERSION_NO_DOT }}-${{ matrix.cibw-arch }}"
path: ./wheelhouse/*.whl