Unverified Commit 6984848e authored by Joao Gante's avatar Joao Gante Committed by GitHub
Browse files

Create empty venv on cache miss (#16816)

parent 43814483
......@@ -29,10 +29,15 @@ jobs:
path: ~/venv/
key: v1-torch_hub-${{ hashFiles('setup.py') }}
- name: Create virtual environment on cache miss
if: steps.cache.outputs.cache-hit != 'true'
run: |
python -m venv ~/venv && . ~/venv/bin/activate
pip install --upgrade pip
- 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]
# no longer needed
......
......@@ -23,6 +23,12 @@ jobs:
path: ~/venv/
key: v2-metadata-${{ hashFiles('setup.py') }}
- name: Create virtual environment on cache miss
if: steps.cache.outputs.cache-hit != 'true'
run: |
python -m venv ~/venv && . ~/venv/bin/activate
pip install --upgrade pip
- name: Setup environment
run: |
. ~/venv/bin/activate
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment