Skip to content

Commit 97b5561

Browse files
committed
extract version from pyproject
Signed-off-by: Maanu Grover <maanug@nvidia.com>
1 parent c805fc3 commit 97b5561

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

.github/workflows/cache-hf-model.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,13 @@ jobs:
3535
with:
3636
python-version: "3.12"
3737

38+
- name: Checkout repository
39+
uses: actions/checkout@v4
40+
3841
- name: Install dependencies
3942
run: |
40-
pip install torch "huggingface_hub[cli]"
41-
pip install -U transformers
43+
TRANSFORMERS_VERSION=$(grep -E 'transformers[[:space:]]*[=><!~]+' pyproject.toml | sed -E 's/.*transformers[[:space:]]*([=><!~]+)[[:space:]]*"?([0-9a-zA-Z\.\-\*]+)"?.*/\1\2/')
44+
pip install torch transformers${TRANSFORMERS_VERSION} "huggingface_hub[cli]"
4245
4346
- name: Log in to HuggingFace
4447
env:

0 commit comments

Comments
 (0)