Skip to content

Commit

Permalink
Install from pytorch-cpu when on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
slashtechno committed Mar 10, 2024
1 parent a4d11cd commit ee66a2f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions poetry.lock

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

7 changes: 4 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@ numpy = "^1.23.2"
# https://github.com/python-poetry/poetry/issues/6409#issuecomment-1911735833
# If GPU support doesn't work, `poetry install -E cuda --with gpu` will force it to be installed from the GPU PyTorch repo
# However, PyPi's `torch` has CUDA 12.1 support by default on Linux, so in that case it should not be needed.
torch = "^2.2.1"
#torch = {version = "^2.2.1", source = "pytorch-cpu", markers = "extra!='cuda'" }

torch = [
{version = "^2.2.1", markers = "extra!='cuda' and platform_system=='Linux'"},
{version = "^2.2.1", source = "pytorch-cpu", markers = "extra!='cuda' and platform_system!='Linux'"},
]
# https://stackoverflow.com/a/76477590/18270659
# https://discfuss.tensorflow.org/t/tensorflow-io-gcs-filesystem-with-windows/18849/4
# https://github.com/python-poetry/poetry/issues/8271#issuecomment-1712020965
Expand Down

0 comments on commit ee66a2f

Please sign in to comment.