Skip to content

OpenVINO™ is an open source toolkit for optimizing and deploying AI inference

[CI] [GHA] Add periodic cleanup for hf cache (#29187)

Andrei Kashchikhin89b48ab623eb
diff --git a/.github/workflows/cleanup_caches.yml b/.github/workflows/cleanup_caches.yml
index c3aac30ccd4..c7b5ba9fdd3 100644
--- a/.github/workflows/cleanup_caches.yml
+++ b/.github/workflows/cleanup_caches.yml
@@ -35,6 +35,33 @@ jobs:
echo "Cache info: "
du -h -d2 ${PIP_CACHE_PATH}
+ Cleanup_HF_Cache:
+ name: Cleanup HuggingFace cache
+ runs-on: aks-linux-4-cores-16gb
+ if: ${{ github.repository_owner == 'openvinotoolkit' }}
+ container:
+ image: openvinogithubactions.azurecr.io/dockerhub/ubuntu:20.04
+ volumes:
+ - /mount:/mount
+ env:
+ HF_CACHE_PATH: /mount/caches/huggingface
+
+ steps:
+ - name: Checkout cache action
+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
+ timeout-minutes: 15
+ with:
+ sparse-checkout: .github/actions/cache
+
+ - name: Cleanup HF cache
+ uses: ./.github/actions/cache/cleanup
+ with:
+ cache-size: 1700
+ max-cache-size: 2000
+ cache-path: ${{ env.HF_CACHE_PATH }}
+ recursive: true
+ key: '.'
+
Cleanup_ccache_lin:
name: Cleanup Linux ccache
runs-on: aks-linux-2-cores-8gb
@@ -47,7 +74,7 @@ jobs:
CCACHE_PATH: /mount/caches/ccache
steps:
- - name: Checkout cach action
+ - name: Checkout cache action
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
timeout-minutes: 15
with:
@@ -70,7 +97,7 @@ jobs:
CCACHE_PATH: C:\\mount\\caches\\ccache
steps:
- - name: Checkout cach action
+ - name: Checkout cache action
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
timeout-minutes: 15
with: