Files
openvino/.github/workflows/cleanup_pip_cache.yml
Mikhail Ryzhov f85a276782 [GHA] Azure pip cache (#20029)
* switched PyTorch_Models

* fixed root issue

* upgrade pip

* set bash environments

* install pip deps

* added git installation

* added g++ deps

* added python-dev package

* get particular python-dev package

* fixed package name

* removed python-dev

* cython dep

* debug

* fixed inlude path

* test cache

* set home dir

* changed disk space calculation

* crosspipeline pip cache

* added tag for source builded deps

* immutable deps

* use commit id instead of tag

* Update .github/workflows/linux.yml

Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com>

* fixed logs upload condition

* removed pip upgrade

* changed  detectotron version

* Update tests/model_hub_tests/torch_tests/requirements_secondary.txt

Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com>

* changed wheel installation way

* reset onednn

* added cleanup workload

* cleanup test

* fixed reqs install

* test cache depending on pip version

* syntax fix

* env overwriting test

* test env output

* fixed set env step

* move pip cahc initialization to step

* changed pip ver regexp

* set custom pip cahce for each step

* cleanup code and enabled test cleanup job

* test cleanup 2

* speedup removal

* check existed dir

* Enabled cache for samples job

* removed debug job

* changed way how to get pip ver

* improved pip version extration

* revert omz

* switched PyTorch_Models

* fixed root issue

* upgrade pip

* set bash environments

* install pip deps

* added git installation

* added g++ deps

* added python-dev package

* get particular python-dev package

* fixed package name

* removed python-dev

* cython dep

* debug

* fixed inlude path

* test cache

* set home dir

* changed disk space calculation

* crosspipeline pip cache

* added tag for source builded deps

* immutable deps

* use commit id instead of tag

* Update .github/workflows/linux.yml

Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com>

* fixed logs upload condition

* removed pip upgrade

* changed  detectotron version

* Update tests/model_hub_tests/torch_tests/requirements_secondary.txt

Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com>

* changed wheel installation way

* added cleanup workload

* reset onednn

* cleanup test

* fixed reqs install

* test cache depending on pip version

* syntax fix

* env overwriting test

* test env output

* fixed set env step

* move pip cahc initialization to step

* changed pip ver regexp

* set custom pip cahce for each step

* cleanup code and enabled test cleanup job

* test cleanup 2

* speedup removal

* check existed dir

* Enabled cache for samples job

* removed debug job

* changed way how to get pip ver

* improved pip version extration

* revert omz

* review fixes

* remove  cache files using atime

* mtime->atime

---------

Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com>
2023-09-28 22:21:32 +04:00

32 lines
833 B
YAML

name: Cleanup PIP caches
on:
schedule:
# at 00:00 on the 1st day of every month
- cron: '0 0 1 * *'
jobs:
Cleanup_PIP_Caches:
runs-on: aks-linux-2-cores
container:
image: openvinogithubactions.azurecr.io/dockerhub/ubuntu:20.04
volumes:
- /mount/caches:/mount/caches
env:
PIP_CACHE_PATH: /mount/caches/pip
steps:
- name: Pre-Collecting Cache Info
run: |
echo "Cache info: "
du -h -d2 ${PIP_CACHE_PATH}
- name: Cleanup cache
run: |
echo "Delete cache files if they have not been used in over 30 days"
[ ! -z "${PIP_CACHE_PATH}" ] && find ${PIP_CACHE_PATH} ! -type d -atime +30 -delete
- name: Post-Collecting Cache Info
run: |
echo "Cache info: "
du -h -d2 ${PIP_CACHE_PATH}