build cuda

This commit is contained in:
Fangjun Kuang 2023-07-24 12:59:59 +08:00
parent 02a7c6b0f4
commit e5f793ab44
2 changed files with 12 additions and 21 deletions

View File

@ -2,8 +2,6 @@ name: build-wheels-cpu-ubuntu
on:
push:
branches:
- wheels
tags:
- '*'
workflow_dispatch:

View File

@ -2,6 +2,8 @@ name: build-wheels-cuda-ubuntu
on:
push:
branches:
- wheels
tags:
- '*'
workflow_dispatch:
@ -103,20 +105,20 @@ jobs:
# https://huggingface.co/docs/hub/spaces-github-actions
- name: Publish to huggingface
if: github.repository_owner == 'csukuangfj'
shell: bash
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
run: |
git config --global user.email "csukuangfj@gmail.com"
git config --global user.name "Fangjun Kuang"
uses: nick-fields/retry@v2
with:
max_attempts: 10
timeout_seconds: 10
shell: bash
command: |
git config --global user.email "csukuangfj@gmail.com"
git config --global user.name "Fangjun Kuang"
export GIT_LFS_SKIP_SMUDGE=1
git clone https://huggingface.co/csukuangfj/kaldifeat huggingface
cur_path=$PWD
function push_to_huggingface() {
cd $cur_path
rm -rf huggingface
export GIT_LFS_SKIP_SMUDGE=1
git clone https://huggingface.co/csukuangfj/kaldifeat huggingface
cd huggingface
git pull
@ -128,12 +130,3 @@ jobs:
git add .
git commit -m "upload ubuntu-cuda wheel for torch ${{ matrix.torch }} python ${{ matrix.python-version }}"
git push https://csukuangfj:$HF_TOKEN@huggingface.co/csukuangfj/kaldifeat main
cd ..
rm -rf huggingface
}
function retry() {
$* || (sleep 1 && $*) || (sleep 2 && $*) || (sleep 4 && $*) || (sleep 8 && $*)
}
retry push_to_huggingface