Skip to content

Commit

Permalink
[Actions] Don't use pip when installing requirements (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
bdvllrs authored Apr 11, 2024
1 parent 19a3533 commit f65d962
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 226 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/docs-new-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,10 @@ jobs:
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: |
poetry install --with test,dev,docs --without torch
poetry run pip install torch --index-url https://download.pytorch.org/whl/cpu
poetry run pip install lightning
poetry source add torch-cpu --priority=explicit https://download.pytorch.org/whl/cpu
torch_version=$(poetry show torch --no-ansi | sed -n 2p | sed 's/^\(\s*\)version\(\s*\):\(\s*\)\([0-9\.\+a-zA-Z]*\)\(.*\)$/\4/')
poetry add --source torch-cpu "torch@$torch_version"
poetry install --with test,dev,docs
- name: Create new branch
run: |
git config user.name "github-actions"
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@ jobs:
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: |
poetry install --with test,dev,docs --without torch
poetry run pip install torch --index-url https://download.pytorch.org/whl/cpu
poetry run pip install lightning
poetry source add torch-cpu --priority=explicit https://download.pytorch.org/whl/cpu
torch_version=$(poetry show torch --no-ansi | sed -n 2p | sed 's/^\(\s*\)version\(\s*\):\(\s*\)\([0-9\.\+a-zA-Z]*\)\(.*\)$/\4/')
poetry add --source torch-cpu "torch@$torch_version"
poetry install --with test,dev,docs
- run: poetry run python ./docs/make.py
- uses: actions/upload-pages-artifact@v3
with:
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,10 @@ jobs:
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: |
poetry install --with test,dev,docs --without torch
poetry run pip install torch --index-url https://download.pytorch.org/whl/cpu
poetry run pip install lightning
poetry source add torch-cpu --priority=explicit https://download.pytorch.org/whl/cpu
torch_version=$(poetry show torch --no-ansi | sed -n 2p | sed 's/^\(\s*\)version\(\s*\):\(\s*\)\([0-9\.\+a-zA-Z]*\)\(.*\)$/\4/')
poetry add --source torch-cpu "torch@$torch_version"
poetry install --with test,dev,docs
- name: Ruff Formatting
run: poetry run ruff format --check
- name: Ruff Linter
Expand Down
238 changes: 24 additions & 214 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,8 @@ pandas = "^2.0.2"
matplotlib = "^3.7.1"
migrate-ckpt = {git = "https://github.com/bdvllrs/migrate-ckpt.git", rev = "main"}
click = "^8.1.7"

[tool.poetry.group.torch.dependencies]
torch = "^2.0.1"
lightning = "^2.1.0"
torch = "^2.0.1"

[tool.poetry.group.dev.dependencies]
types-tqdm = "^4.65.0.1"
Expand Down

0 comments on commit f65d962

Please sign in to comment.