Skip to content

Commit

Permalink
Add special version of torch for ci
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentMagn committed Nov 22, 2023
1 parent 1d7ccc0 commit 29b9e90
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ jobs:
- name: Install dependency manager
uses: snok/install-poetry@v1

- name: Install dependencies
run: make install-ci-dependencies

- name: Install dependencies
run: make install-dependencies

Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ install-dependencies:
poetry install --with dev
poetry run pre-commit install

install-ci-dependencies:
@echo "Installing with option dev packages..."
poetry install --only ci

activate:
@echo "Activating virtual environment"
poetry shell
Expand Down
8 changes: 8 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ black = "^23.7.0"
nbmake = "^1.4.6"
pytest-xdist = "^3.5.0"

[tool.poetry.group.ci]
optional = true

[tool.poetry.group.ci.dependencies]
python = "^3.10"
torch = { version = "^2.0.1+cpu", markers = "cpu" }
torchvision = { version = "^2.0.1+cpu", markers = "cpu" }

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
Expand Down

0 comments on commit 29b9e90

Please sign in to comment.