chore: use gh cache for huggingface models (#1096)
* use gh cache for huggingface models Signed-off-by: Michele Dolfi <dol@zurich.ibm.com> * increase hf timeout Signed-off-by: Michele Dolfi <dol@zurich.ibm.com> * more timeout Signed-off-by: Michele Dolfi <dol@zurich.ibm.com> * use different cache key in each job Signed-off-by: Michele Dolfi <dol@zurich.ibm.com> --------- Signed-off-by: Michele Dolfi <dol@zurich.ibm.com>
This commit is contained in:
parent
8dc0562542
commit
0c1e9391de
9
.github/workflows/checks.yml
vendored
9
.github/workflows/checks.yml
vendored
@ -1,6 +1,10 @@
|
|||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
|
|
||||||
|
env:
|
||||||
|
HF_HUB_DOWNLOAD_TIMEOUT: "60"
|
||||||
|
HF_HUB_ETAG_TIMEOUT: "60"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run-checks:
|
run-checks:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@ -14,6 +18,11 @@ jobs:
|
|||||||
- name: Set TESSDATA_PREFIX
|
- name: Set TESSDATA_PREFIX
|
||||||
run: |
|
run: |
|
||||||
echo "TESSDATA_PREFIX=$(dpkg -L tesseract-ocr-eng | grep tessdata$)" >> "$GITHUB_ENV"
|
echo "TESSDATA_PREFIX=$(dpkg -L tesseract-ocr-eng | grep tessdata$)" >> "$GITHUB_ENV"
|
||||||
|
- name: Cache Hugging Face models
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: ~/.cache/huggingface
|
||||||
|
key: huggingface-cache-py${{ matrix.python-version }}
|
||||||
- uses: ./.github/actions/setup-poetry
|
- uses: ./.github/actions/setup-poetry
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python-version }}
|
||||||
|
Loading…
Reference in New Issue
Block a user