Install from `pytorch-cpu` when on Windows

This commit is contained in:
slashtechno 2024-03-09 19:38:05 -06:00
parent a4d11cddd0
commit ee66a2f428
Signed by: slashtechno
GPG Key ID: 8EC1D9D9286C2B17
2 changed files with 6 additions and 5 deletions

4
poetry.lock generated
View File

@ -2096,8 +2096,8 @@ files = [
[package.dependencies] [package.dependencies]
numpy = [ numpy = [
{version = ">=1.23.5", markers = "python_version >= \"3.11\""}, {version = ">=1.23.5", markers = "python_version >= \"3.11\""},
{version = ">=1.21.4", markers = "python_version >= \"3.10\" and platform_system == \"Darwin\" and python_version < \"3.11\""},
{version = ">=1.21.2", markers = "platform_system != \"Darwin\" and python_version >= \"3.10\" and python_version < \"3.11\""}, {version = ">=1.21.2", markers = "platform_system != \"Darwin\" and python_version >= \"3.10\" and python_version < \"3.11\""},
{version = ">=1.21.4", markers = "python_version >= \"3.10\" and platform_system == \"Darwin\" and python_version < \"3.11\""},
] ]
[[package]] [[package]]
@ -3855,4 +3855,4 @@ cuda = []
[metadata] [metadata]
lock-version = "2.0" lock-version = "2.0"
python-versions = ">=3.10, <3.12" python-versions = ">=3.10, <3.12"
content-hash = "e40609bfdd173f240b5e5bcca80d0ee27a573bad0340d8790a1c9ae1272e55d8" content-hash = "9ac2036a11ad1ed50d37b455539316efdeed714e6d5e8b9b001a85a2f753b37b"

View File

@ -24,9 +24,10 @@ numpy = "^1.23.2"
# https://github.com/python-poetry/poetry/issues/6409#issuecomment-1911735833 # 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 # 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. # 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 = [
#torch = {version = "^2.2.1", source = "pytorch-cpu", markers = "extra!='cuda'" } {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://stackoverflow.com/a/76477590/18270659
# https://discfuss.tensorflow.org/t/tensorflow-io-gcs-filesystem-with-windows/18849/4 # https://discfuss.tensorflow.org/t/tensorflow-io-gcs-filesystem-with-windows/18849/4
# https://github.com/python-poetry/poetry/issues/8271#issuecomment-1712020965 # https://github.com/python-poetry/poetry/issues/8271#issuecomment-1712020965