Fangjun Kuang
Committed by GitHub

publish all pre-built wheels to huggingface (#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)
@@ -81,7 +81,6 @@ jobs: @@ -81,7 +81,6 @@ jobs:
81 mv ./wheels ./wheelhouse 81 mv ./wheels ./wheelhouse
82 82
83 - name: Publish to huggingface 83 - name: Publish to huggingface
84 - if: (matrix.python-version == 'cp38' || matrix.python-version == 'cp39' ) && matrix.manylinux == 'manylinux2014'  
85 env: 84 env:
86 HF_TOKEN: ${{ secrets.HF_TOKEN }} 85 HF_TOKEN: ${{ secrets.HF_TOKEN }}
87 uses: nick-fields/retry@v3 86 uses: nick-fields/retry@v3
@@ -97,13 +96,20 @@ jobs: @@ -97,13 +96,20 @@ jobs:
97 export GIT_LFS_SKIP_SMUDGE=1 96 export GIT_LFS_SKIP_SMUDGE=1
98 export GIT_CLONE_PROTECTION_ACTIVE=false 97 export GIT_CLONE_PROTECTION_ACTIVE=false
99 98
  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 +
100 git clone https://huggingface.co/csukuangfj/sherpa-onnx-wheels huggingface 104 git clone https://huggingface.co/csukuangfj/sherpa-onnx-wheels huggingface
101 cd huggingface 105 cd huggingface
102 git fetch 106 git fetch
103 git pull 107 git pull
104 git merge -m "merge remote" --ff origin main 108 git merge -m "merge remote" --ff origin main
105 109
106 - cp -v ../wheelhouse/*.whl . 110 + mkdir -p $d
  111 +
  112 + cp -v ../wheelhouse/*.whl $d/
107 113
108 git status 114 git status
109 git add . 115 git add .
@@ -84,7 +84,6 @@ jobs: @@ -84,7 +84,6 @@ jobs:
84 ls -lh ./wheelhouse/ 84 ls -lh ./wheelhouse/
85 85
86 - name: Publish to huggingface 86 - name: Publish to huggingface
87 - if: matrix.python-version == '3.8'  
88 env: 87 env:
89 HF_TOKEN: ${{ secrets.HF_TOKEN }} 88 HF_TOKEN: ${{ secrets.HF_TOKEN }}
90 uses: nick-fields/retry@v3 89 uses: nick-fields/retry@v3
@@ -100,13 +99,20 @@ jobs: @@ -100,13 +99,20 @@ jobs:
100 export GIT_LFS_SKIP_SMUDGE=1 99 export GIT_LFS_SKIP_SMUDGE=1
101 export GIT_CLONE_PROTECTION_ACTIVE=false 100 export GIT_CLONE_PROTECTION_ACTIVE=false
102 101
  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 +
103 git clone https://huggingface.co/csukuangfj/sherpa-onnx-wheels huggingface 107 git clone https://huggingface.co/csukuangfj/sherpa-onnx-wheels huggingface
104 cd huggingface 108 cd huggingface
105 git fetch 109 git fetch
106 git pull 110 git pull
107 git merge -m "merge remote" --ff origin main 111 git merge -m "merge remote" --ff origin main
108 112
109 - cp -v ../wheelhouse/*.whl . 113 + mkdir -p $d
  114 +
  115 + cp -v ../wheelhouse/*.whl $d/
110 116
111 git status 117 git status
112 git add . 118 git add .
@@ -80,7 +80,6 @@ jobs: @@ -80,7 +80,6 @@ jobs:
80 path: ./wheelhouse/*.whl 80 path: ./wheelhouse/*.whl
81 81
82 - name: Publish to huggingface 82 - name: Publish to huggingface
83 - if: matrix.python-version == 'cp38'  
84 env: 83 env:
85 HF_TOKEN: ${{ secrets.HF_TOKEN }} 84 HF_TOKEN: ${{ secrets.HF_TOKEN }}
86 uses: nick-fields/retry@v3 85 uses: nick-fields/retry@v3
@@ -96,13 +95,20 @@ jobs: @@ -96,13 +95,20 @@ jobs:
96 export GIT_LFS_SKIP_SMUDGE=1 95 export GIT_LFS_SKIP_SMUDGE=1
97 export GIT_CLONE_PROTECTION_ACTIVE=false 96 export GIT_CLONE_PROTECTION_ACTIVE=false
98 97
  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 +
99 git clone https://huggingface.co/csukuangfj/sherpa-onnx-wheels huggingface 103 git clone https://huggingface.co/csukuangfj/sherpa-onnx-wheels huggingface
100 cd huggingface 104 cd huggingface
101 git fetch 105 git fetch
102 git pull 106 git pull
103 git merge -m "merge remote" --ff origin main 107 git merge -m "merge remote" --ff origin main
104 108
105 - cp -v ../wheelhouse/*.whl . 109 + mkdir -p $d
  110 +
  111 + cp -v ../wheelhouse/*.whl $d/
106 112
107 git status 113 git status
108 git add . 114 git add .
@@ -50,7 +50,6 @@ jobs: @@ -50,7 +50,6 @@ jobs:
50 path: ./wheelhouse/*.whl 50 path: ./wheelhouse/*.whl
51 51
52 - name: Publish to huggingface 52 - name: Publish to huggingface
53 - if: matrix.python-version == 'cp39'  
54 env: 53 env:
55 HF_TOKEN: ${{ secrets.HF_TOKEN }} 54 HF_TOKEN: ${{ secrets.HF_TOKEN }}
56 uses: nick-fields/retry@v3 55 uses: nick-fields/retry@v3
@@ -66,13 +65,20 @@ jobs: @@ -66,13 +65,20 @@ jobs:
66 export GIT_LFS_SKIP_SMUDGE=1 65 export GIT_LFS_SKIP_SMUDGE=1
67 export GIT_CLONE_PROTECTION_ACTIVE=false 66 export GIT_CLONE_PROTECTION_ACTIVE=false
68 67
  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 +
69 git clone https://huggingface.co/csukuangfj/sherpa-onnx-wheels huggingface 73 git clone https://huggingface.co/csukuangfj/sherpa-onnx-wheels huggingface
70 cd huggingface 74 cd huggingface
71 git fetch 75 git fetch
72 git pull 76 git pull
73 git merge -m "merge remote" --ff origin main 77 git merge -m "merge remote" --ff origin main
74 78
75 - cp -v ../wheelhouse/*.whl . 79 + mkdir -p $d
  80 +
  81 + cp -v ../wheelhouse/*.whl $d/
76 82
77 git status 83 git status
78 git add . 84 git add .
@@ -50,7 +50,6 @@ jobs: @@ -50,7 +50,6 @@ jobs:
50 path: ./wheelhouse/*.whl 50 path: ./wheelhouse/*.whl
51 51
52 - name: Publish to huggingface 52 - name: Publish to huggingface
53 - if: matrix.python-version == 'cp39'  
54 env: 53 env:
55 HF_TOKEN: ${{ secrets.HF_TOKEN }} 54 HF_TOKEN: ${{ secrets.HF_TOKEN }}
56 uses: nick-fields/retry@v3 55 uses: nick-fields/retry@v3
@@ -66,13 +65,20 @@ jobs: @@ -66,13 +65,20 @@ jobs:
66 export GIT_LFS_SKIP_SMUDGE=1 65 export GIT_LFS_SKIP_SMUDGE=1
67 export GIT_CLONE_PROTECTION_ACTIVE=false 66 export GIT_CLONE_PROTECTION_ACTIVE=false
68 67
  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 +
69 git clone https://huggingface.co/csukuangfj/sherpa-onnx-wheels huggingface 73 git clone https://huggingface.co/csukuangfj/sherpa-onnx-wheels huggingface
70 cd huggingface 74 cd huggingface
71 git fetch 75 git fetch
72 git pull 76 git pull
73 git merge -m "merge remote" --ff origin main 77 git merge -m "merge remote" --ff origin main
74 78
75 - cp -v ../wheelhouse/*.whl . 79 + mkdir -p $d
  80 +
  81 + cp -v ../wheelhouse/*.whl $d/
76 82
77 git status 83 git status
78 git add . 84 git add .
@@ -65,7 +65,6 @@ jobs: @@ -65,7 +65,6 @@ jobs:
65 path: ./wheelhouse/*.whl 65 path: ./wheelhouse/*.whl
66 66
67 - name: Publish to huggingface 67 - name: Publish to huggingface
68 - if: matrix.python-version == 'cp39'  
69 env: 68 env:
70 HF_TOKEN: ${{ secrets.HF_TOKEN }} 69 HF_TOKEN: ${{ secrets.HF_TOKEN }}
71 uses: nick-fields/retry@v3 70 uses: nick-fields/retry@v3
@@ -81,13 +80,20 @@ jobs: @@ -81,13 +80,20 @@ jobs:
81 export GIT_LFS_SKIP_SMUDGE=1 80 export GIT_LFS_SKIP_SMUDGE=1
82 export GIT_CLONE_PROTECTION_ACTIVE=false 81 export GIT_CLONE_PROTECTION_ACTIVE=false
83 82
  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 +
84 git clone https://huggingface.co/csukuangfj/sherpa-onnx-wheels huggingface 88 git clone https://huggingface.co/csukuangfj/sherpa-onnx-wheels huggingface
85 cd huggingface 89 cd huggingface
86 git fetch 90 git fetch
87 git pull 91 git pull
88 git merge -m "merge remote" --ff origin main 92 git merge -m "merge remote" --ff origin main
89 93
90 - cp -v ../wheelhouse/*.whl . 94 + mkdir -p $d
  95 +
  96 + cp -v ../wheelhouse/*.whl $d/
91 97
92 git status 98 git status
93 git add . 99 git add .
@@ -49,7 +49,6 @@ jobs: @@ -49,7 +49,6 @@ jobs:
49 path: ./wheelhouse/*.whl 49 path: ./wheelhouse/*.whl
50 50
51 - name: Publish to huggingface 51 - name: Publish to huggingface
52 - if: matrix.python-version == 'cp38'  
53 env: 52 env:
54 HF_TOKEN: ${{ secrets.HF_TOKEN }} 53 HF_TOKEN: ${{ secrets.HF_TOKEN }}
55 uses: nick-fields/retry@v3 54 uses: nick-fields/retry@v3
@@ -65,13 +64,20 @@ jobs: @@ -65,13 +64,20 @@ jobs:
65 export GIT_LFS_SKIP_SMUDGE=1 64 export GIT_LFS_SKIP_SMUDGE=1
66 export GIT_CLONE_PROTECTION_ACTIVE=false 65 export GIT_CLONE_PROTECTION_ACTIVE=false
67 66
  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 +
68 git clone https://huggingface.co/csukuangfj/sherpa-onnx-wheels huggingface 72 git clone https://huggingface.co/csukuangfj/sherpa-onnx-wheels huggingface
69 cd huggingface 73 cd huggingface
70 git fetch 74 git fetch
71 git pull 75 git pull
72 git merge -m "merge remote" --ff origin main 76 git merge -m "merge remote" --ff origin main
73 77
74 - cp -v ../wheelhouse/*.whl . 78 + mkdir -p $d
  79 +
  80 + cp -v ../wheelhouse/*.whl $d/
75 81
76 git status 82 git status
77 git add . 83 git add .
@@ -70,13 +70,20 @@ jobs: @@ -70,13 +70,20 @@ jobs:
70 export GIT_LFS_SKIP_SMUDGE=1 70 export GIT_LFS_SKIP_SMUDGE=1
71 export GIT_CLONE_PROTECTION_ACTIVE=false 71 export GIT_CLONE_PROTECTION_ACTIVE=false
72 72
  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 +
73 git clone https://huggingface.co/csukuangfj/sherpa-onnx-wheels huggingface 78 git clone https://huggingface.co/csukuangfj/sherpa-onnx-wheels huggingface
74 cd huggingface 79 cd huggingface
75 git fetch 80 git fetch
76 git pull 81 git pull
77 git merge -m "merge remote" --ff origin main 82 git merge -m "merge remote" --ff origin main
78 83
79 - cp -v ../wheelhouse/*.whl . 84 + mkdir -p $d
  85 +
  86 + cp -v ../wheelhouse/*.whl $d/
80 87
81 git status 88 git status
82 git add . 89 git add .