mirror of
https://github.com/huggingface/transformers.git
synced 2025-07-31 02:02:21 +06:00
Create empty venv on cache miss (#16816)
This commit is contained in:
parent
438144832e
commit
6984848ed0
7
.github/workflows/github-torch-hub.yml
vendored
7
.github/workflows/github-torch-hub.yml
vendored
@ -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
|
||||
|
6
.github/workflows/update_metdata.yml
vendored
6
.github/workflows/update_metdata.yml
vendored
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user