Wheels debug #19
Workflow file for this run
This file contains 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 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}} | |
CUVERSION=${CUVERSION//.} | |
echo CUVERSION=${CUVERSION} >> $GITHUB_ENV | |
PYVERSION=${{matrix.python-version}} | |
PYVERSION=${PYVERSION//.} | |
echo PYVERSION=${PYVERSION} >> $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 CUDA_VER=${{ matrix.cuda-version }} \ | |
--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-${{ matrix.python-version }}-torch-${{matrix.pytorch-version}}+cu${{ env.CUVERSION }}-${{ matrix.cibw-arch }}" | |
path: ./wheelhouse/*.whl |