Skip to content

Merge pull request #10 from ZendarInc/mk/v2.1.0 #26

Merge pull request #10 from ZendarInc/mk/v2.1.0

Merge pull request #10 from ZendarInc/mk/v2.1.0 #26

Workflow file for this run

name: Torchsparse Post-Commit
on:
push:
branches:
- zendar-main
workflow_dispatch:
workflow_call:
jobs:
build:
name: Build Wheel for Torchsparse
runs-on:
- self-hosted
- amd_2004_runner_v3
timeout-minutes: 30
outputs:
wheel: "${{ steps.build.wheelfile }}"
env:
PDM_DIR: __pdm
PDM: __pdm/bin/pdm
steps:
- uses: actions/checkout@v3
- name: Install CUDA 12.1.1
shell: bash
run: |
pushd ..
INSTALLER=cuda_12.1.1_530.30.02_linux.run
VERSION=12.1.1
BASE=https://developer.download.nvidia.com/compute/cuda
SHASUM=d74022d41d80105319dfa21beea39b77a5b9919539c0487a05caaf2446d6a70e
if sha256sum ${INSTALLER} \
| awk '/^'"${SHASUM}"' *'"${INSTALLER}"'$/'
then
echo "Already downloaded the installer, reusing"
else
wget ${BASE}/${VERSION}/local_installers/${INSTALLER}
fi
chmod +x ./${INSTALLER}
echo "running installer $(pwd)/${INSTALLER}; unpacking in $(pwd)/cuda"
mkdir -p cuda
./${INSTALLER} --toolkit --silent --installpath=$(pwd)/cuda
popd
- name: Install PDM
shell: bash
run: |
curl \
-sSL \
-o install-pdm.py \
https://raw.githubusercontent.com/pdm-project/pdm/2.5.3/install-pdm.py
python3 install-pdm.py --path "${PDM_DIR}"
- name: PDM Sync
shell: bash
run: |
CUDA_PATH="$(pwd | xargs dirname)/cuda"
LD_LIBRARY_PATH="${CUDA_PATH}/lib64"
export CUDA_PATH LD_LIBRARY_PATH
export MAX_JOBS=1
"${PDM}" sync --clean
- name: Build Wheel
shell: bash
run: |
CUDA_PATH="$(pwd | xargs dirname)/cuda"
LD_LIBRARY_PATH="${CUDA_PATH}/lib64"
export CUDA_PATH LD_LIBRARY_PATH
export MAX_JOBS=1
"${PDM}" build
- name: Locate Wheel
id: locate
shell: bash
run: |
find dist -mindepth 1 -name '*.whl' \
| xargs printf "wheel=%s\n" \
>> "${GITHUB_OUTPUT}"
find dist -mindepth 1 -name '*.whl' \
| xargs basename \
| xargs printf "name=%s\n" \
>> "${GITHUB_OUTPUT}"
- name: Archive Wheel
uses: actions/upload-artifact@v3
with:
name: ${{ steps.locate.outputs.name }}
path: ${{ steps.locate.outputs.wheel }}