CI: non-remote GH Actions now use a python venv (#16789)

This commit is contained in:
Joao Gante
2022-04-18 09:47:38 +01:00
committed by GitHub
parent dee6f01636
commit 02de7a8e7f
4 changed files with 36 additions and 17 deletions

View File

@@ -22,15 +22,16 @@ jobs:
with:
python-version: 3.7
- name: Loading cache
- name: Load cached virtual environment
uses: actions/cache@v2
id: cache
with:
path: ~/.cache/pip
key: v0-torch_hub-${{ hashFiles('setup.py') }}
path: ~/venv/
key: v1-torch_hub-${{ hashFiles('setup.py') }}
- name: Install dependencies
run: |
. ~/venv/bin/activate
pip install --upgrade pip
# install torch-hub specific dependencies
pip install -e git+https://github.com/huggingface/transformers.git#egg=transformers[torchhub]