fix: model caching

This commit is contained in:
Félix Voituret
2019-11-08 19:45:38 -05:00
parent 7322b3bdea
commit d311068dfb

View File

@@ -14,6 +14,8 @@ jobs:
- python-3.6-cache-{{ .Branch }}-{{ checksum "requirements.txt" }} - python-3.6-cache-{{ .Branch }}-{{ checksum "requirements.txt" }}
- python-3.6-cache-{{ .Branch }}- - python-3.6-cache-{{ .Branch }}-
- python-3.6-cache- - python-3.6-cache-
- restore_cache:
key: models-{{ checksum "spleeter/model/__init__.py" }}
- run: - run:
name: install ffmpeg name: install ffmpeg
command: apt-get update && apt-get install -y ffmpeg command: apt-get update && apt-get install -y ffmpeg
@@ -23,12 +25,14 @@ jobs:
- save_cache: - save_cache:
key: python-3.6-cache-{{ .Branch }}-{{ checksum "requirements.txt" }} key: python-3.6-cache-{{ .Branch }}-{{ checksum "requirements.txt" }}
paths: paths:
- "pretrained_models" - "/usr"
- "/usr/local/bin"
- "/usr/local/lib/python3.6/site-packages"
- run: - run:
name: pytest name: pytest
command: pytest -W ignore::FutureWarning -W ignore::DeprecationWarning command: pytest -W ignore::FutureWarning -W ignore::DeprecationWarning
- save_cache:
key: models-{{ checksum "spleeter/model/__init__.py" }}
paths:
- "pretrained_models"
# ======================================================================================= # =======================================================================================
# Python 3.7 testing. # Python 3.7 testing.
# ======================================================================================= # =======================================================================================
@@ -43,21 +47,25 @@ jobs:
- python-3.7-cache-{{ .Branch }}-{{ checksum "requirements.txt" }} - python-3.7-cache-{{ .Branch }}-{{ checksum "requirements.txt" }}
- python-3.7-cache-{{ .Branch }}- - python-3.7-cache-{{ .Branch }}-
- python-3.7-cache- - python-3.7-cache-
- restore_cache:
key: models-{{ checksum "spleeter/model/__init__.py" }}
- run: - run:
name: install ffmpeg name: install ffmpeg
command: apt-get update && apt-get install -y ffmpeg command: apt-get update && apt-get install -y ffmpeg
- run: - run:
name: install python dependencies name: install python dependencies
command: pip install -r requirements.txt && pip install pytest command: pip install -r requirements.txt && pip install pytest
- save_cache:
key: python-3.7-cache-{{ .Branch }}-{{ checksum "requirements.txt" }}
paths:
- "/usr"
- run: - run:
name: pytest name: pytest
command: pytest -W ignore::FutureWarning -W ignore::DeprecationWarning command: pytest -W ignore::FutureWarning -W ignore::DeprecationWarning
- save_cache: - save_cache:
key: python-3.7-cache-{{ .Branch }}-{{ checksum "requirements.txt" }} key: models-{{ checksum "spleeter/model/__init__.py" }}
paths: paths:
- "pretrained_models" - "pretrained_models"
- "/usr/local/bin"
- "/usr/local/lib/python3.7/site-packages"
# ======================================================================================= # =======================================================================================
# Source distribution packaging. # Source distribution packaging.
# ======================================================================================= # =======================================================================================