Skip to content

Commit e4c33be

Browse files
authored
publish all pre-built wheels to huggingface (k2-fsa#1142)
pypi.org provides only 10GB of free space for open-source projects. Each new release of sherpa-onnx occupies about 800MB, so we have to delete previous releases otherwise pypi.org refuses to accept new releases due to limited spaces. To let users install previous versions, we also publish wheels to huggingface and users can find them at https://k2-fsa.github.io/sherpa/onnx/cpu.html and https://k2-fsa.github.io/sherpa/onnx/cpu-cn.html (for users without access to huggingface.co)
1 parent f552a76 commit e4c33be

8 files changed

+64
-15
lines changed

.github/workflows/build-wheels-aarch64.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ jobs:
8181
mv ./wheels ./wheelhouse
8282
8383
- name: Publish to huggingface
84-
if: (matrix.python-version == 'cp38' || matrix.python-version == 'cp39' ) && matrix.manylinux == 'manylinux2014'
8584
env:
8685
HF_TOKEN: ${{ secrets.HF_TOKEN }}
8786
uses: nick-fields/retry@v3
@@ -97,13 +96,20 @@ jobs:
9796
export GIT_LFS_SKIP_SMUDGE=1
9897
export GIT_CLONE_PROTECTION_ACTIVE=false
9998
99+
SHERPA_ONNX_VERSION=$(grep "SHERPA_ONNX_VERSION" ./CMakeLists.txt | cut -d " " -f 2 | cut -d '"' -f 2)
100+
echo "SHERPA_ONNX_VERSION $SHERPA_ONNX_VERSION"
101+
102+
d=cpu/$SHERPA_ONNX_VERSION
103+
100104
git clone https://huggingface.co/csukuangfj/sherpa-onnx-wheels huggingface
101105
cd huggingface
102106
git fetch
103107
git pull
104108
git merge -m "merge remote" --ff origin main
105109
106-
cp -v ../wheelhouse/*.whl .
110+
mkdir -p $d
111+
112+
cp -v ../wheelhouse/*.whl $d/
107113
108114
git status
109115
git add .

.github/workflows/build-wheels-armv7l.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ jobs:
8484
ls -lh ./wheelhouse/
8585
8686
- name: Publish to huggingface
87-
if: matrix.python-version == '3.8'
8887
env:
8988
HF_TOKEN: ${{ secrets.HF_TOKEN }}
9089
uses: nick-fields/retry@v3
@@ -100,13 +99,20 @@ jobs:
10099
export GIT_LFS_SKIP_SMUDGE=1
101100
export GIT_CLONE_PROTECTION_ACTIVE=false
102101
102+
SHERPA_ONNX_VERSION=$(grep "SHERPA_ONNX_VERSION" ./CMakeLists.txt | cut -d " " -f 2 | cut -d '"' -f 2)
103+
echo "SHERPA_ONNX_VERSION $SHERPA_ONNX_VERSION"
104+
105+
d=cpu/$SHERPA_ONNX_VERSION
106+
103107
git clone https://huggingface.co/csukuangfj/sherpa-onnx-wheels huggingface
104108
cd huggingface
105109
git fetch
106110
git pull
107111
git merge -m "merge remote" --ff origin main
108112
109-
cp -v ../wheelhouse/*.whl .
113+
mkdir -p $d
114+
115+
cp -v ../wheelhouse/*.whl $d/
110116
111117
git status
112118
git add .

.github/workflows/build-wheels-linux.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ jobs:
8080
path: ./wheelhouse/*.whl
8181

8282
- name: Publish to huggingface
83-
if: matrix.python-version == 'cp38'
8483
env:
8584
HF_TOKEN: ${{ secrets.HF_TOKEN }}
8685
uses: nick-fields/retry@v3
@@ -96,13 +95,20 @@ jobs:
9695
export GIT_LFS_SKIP_SMUDGE=1
9796
export GIT_CLONE_PROTECTION_ACTIVE=false
9897
98+
SHERPA_ONNX_VERSION=$(grep "SHERPA_ONNX_VERSION" ./CMakeLists.txt | cut -d " " -f 2 | cut -d '"' -f 2)
99+
echo "SHERPA_ONNX_VERSION $SHERPA_ONNX_VERSION"
100+
101+
d=cpu/$SHERPA_ONNX_VERSION
102+
99103
git clone https://huggingface.co/csukuangfj/sherpa-onnx-wheels huggingface
100104
cd huggingface
101105
git fetch
102106
git pull
103107
git merge -m "merge remote" --ff origin main
104108
105-
cp -v ../wheelhouse/*.whl .
109+
mkdir -p $d
110+
111+
cp -v ../wheelhouse/*.whl $d/
106112
107113
git status
108114
git add .

.github/workflows/build-wheels-macos-arm64.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ jobs:
5050
path: ./wheelhouse/*.whl
5151

5252
- name: Publish to huggingface
53-
if: matrix.python-version == 'cp39'
5453
env:
5554
HF_TOKEN: ${{ secrets.HF_TOKEN }}
5655
uses: nick-fields/retry@v3
@@ -66,13 +65,20 @@ jobs:
6665
export GIT_LFS_SKIP_SMUDGE=1
6766
export GIT_CLONE_PROTECTION_ACTIVE=false
6867
68+
SHERPA_ONNX_VERSION=$(grep "SHERPA_ONNX_VERSION" ./CMakeLists.txt | cut -d " " -f 2 | cut -d '"' -f 2)
69+
echo "SHERPA_ONNX_VERSION $SHERPA_ONNX_VERSION"
70+
71+
d=cpu/$SHERPA_ONNX_VERSION
72+
6973
git clone https://huggingface.co/csukuangfj/sherpa-onnx-wheels huggingface
7074
cd huggingface
7175
git fetch
7276
git pull
7377
git merge -m "merge remote" --ff origin main
7478
75-
cp -v ../wheelhouse/*.whl .
79+
mkdir -p $d
80+
81+
cp -v ../wheelhouse/*.whl $d/
7682
7783
git status
7884
git add .

.github/workflows/build-wheels-macos-universal2.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ jobs:
5050
path: ./wheelhouse/*.whl
5151

5252
- name: Publish to huggingface
53-
if: matrix.python-version == 'cp39'
5453
env:
5554
HF_TOKEN: ${{ secrets.HF_TOKEN }}
5655
uses: nick-fields/retry@v3
@@ -66,13 +65,20 @@ jobs:
6665
export GIT_LFS_SKIP_SMUDGE=1
6766
export GIT_CLONE_PROTECTION_ACTIVE=false
6867
68+
SHERPA_ONNX_VERSION=$(grep "SHERPA_ONNX_VERSION" ./CMakeLists.txt | cut -d " " -f 2 | cut -d '"' -f 2)
69+
echo "SHERPA_ONNX_VERSION $SHERPA_ONNX_VERSION"
70+
71+
d=cpu/$SHERPA_ONNX_VERSION
72+
6973
git clone https://huggingface.co/csukuangfj/sherpa-onnx-wheels huggingface
7074
cd huggingface
7175
git fetch
7276
git pull
7377
git merge -m "merge remote" --ff origin main
7478
75-
cp -v ../wheelhouse/*.whl .
79+
mkdir -p $d
80+
81+
cp -v ../wheelhouse/*.whl $d/
7682
7783
git status
7884
git add .

.github/workflows/build-wheels-macos-x64.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ jobs:
6565
path: ./wheelhouse/*.whl
6666

6767
- name: Publish to huggingface
68-
if: matrix.python-version == 'cp39'
6968
env:
7069
HF_TOKEN: ${{ secrets.HF_TOKEN }}
7170
uses: nick-fields/retry@v3
@@ -81,13 +80,20 @@ jobs:
8180
export GIT_LFS_SKIP_SMUDGE=1
8281
export GIT_CLONE_PROTECTION_ACTIVE=false
8382
83+
SHERPA_ONNX_VERSION=$(grep "SHERPA_ONNX_VERSION" ./CMakeLists.txt | cut -d " " -f 2 | cut -d '"' -f 2)
84+
echo "SHERPA_ONNX_VERSION $SHERPA_ONNX_VERSION"
85+
86+
d=cpu/$SHERPA_ONNX_VERSION
87+
8488
git clone https://huggingface.co/csukuangfj/sherpa-onnx-wheels huggingface
8589
cd huggingface
8690
git fetch
8791
git pull
8892
git merge -m "merge remote" --ff origin main
8993
90-
cp -v ../wheelhouse/*.whl .
94+
mkdir -p $d
95+
96+
cp -v ../wheelhouse/*.whl $d/
9197
9298
git status
9399
git add .

.github/workflows/build-wheels-win32.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ jobs:
4949
path: ./wheelhouse/*.whl
5050

5151
- name: Publish to huggingface
52-
if: matrix.python-version == 'cp38'
5352
env:
5453
HF_TOKEN: ${{ secrets.HF_TOKEN }}
5554
uses: nick-fields/retry@v3
@@ -65,13 +64,20 @@ jobs:
6564
export GIT_LFS_SKIP_SMUDGE=1
6665
export GIT_CLONE_PROTECTION_ACTIVE=false
6766
67+
SHERPA_ONNX_VERSION=$(grep "SHERPA_ONNX_VERSION" ./CMakeLists.txt | cut -d " " -f 2 | cut -d '"' -f 2)
68+
echo "SHERPA_ONNX_VERSION $SHERPA_ONNX_VERSION"
69+
70+
d=cpu/$SHERPA_ONNX_VERSION
71+
6872
git clone https://huggingface.co/csukuangfj/sherpa-onnx-wheels huggingface
6973
cd huggingface
7074
git fetch
7175
git pull
7276
git merge -m "merge remote" --ff origin main
7377
74-
cp -v ../wheelhouse/*.whl .
78+
mkdir -p $d
79+
80+
cp -v ../wheelhouse/*.whl $d/
7581
7682
git status
7783
git add .

.github/workflows/build-wheels-win64.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,20 @@ jobs:
7070
export GIT_LFS_SKIP_SMUDGE=1
7171
export GIT_CLONE_PROTECTION_ACTIVE=false
7272
73+
SHERPA_ONNX_VERSION=$(grep "SHERPA_ONNX_VERSION" ./CMakeLists.txt | cut -d " " -f 2 | cut -d '"' -f 2)
74+
echo "SHERPA_ONNX_VERSION $SHERPA_ONNX_VERSION"
75+
76+
d=cpu/$SHERPA_ONNX_VERSION
77+
7378
git clone https://huggingface.co/csukuangfj/sherpa-onnx-wheels huggingface
7479
cd huggingface
7580
git fetch
7681
git pull
7782
git merge -m "merge remote" --ff origin main
7883
79-
cp -v ../wheelhouse/*.whl .
84+
mkdir -p $d
85+
86+
cp -v ../wheelhouse/*.whl $d/
8087
8188
git status
8289
git add .

0 commit comments

Comments
 (0)