Wheels debug #31
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"] | |
python-version: ["3.10", "3.11"] | |
pytorch-version: ["2.4.0", "2.5.0"] | |
cuda-version: ["12.1", "12.4"] | |
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 }}" | |
- 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_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${{ env.CUVERSION }}" | |
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 |