Skip to content

Commit

Permalink
build: explicitly pull torch from PyPI if not on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
lars-reimann committed May 4, 2024
1 parent d4f5113 commit 072e18c
Show file tree
Hide file tree
Showing 2 changed files with 99 additions and 6 deletions.
97 changes: 94 additions & 3 deletions poetry.lock

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

8 changes: 5 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,14 @@ simple-websocket = "^1.0.0"
torch = [
# Install the CUDA version on Windows. Projects that depend on us always get their dependencies from PyPI, so
# there's no point moving this to the main dependencies section.
{ version = "^2.3.0", markers="sys_platform == 'win32'", source = "torch_cuda121" },
{ version = "^2.3.0", markers="sys_platform == 'win32'", source = "torch_cuda" },
{ version = "^2.3.0", markers="sys_platform != 'win32'", source = "pypi" },
]
torchvision = [
# Install the CUDA version on Windows. Projects that depend on us always get their dependencies from PyPI, so
# there's no point moving this to the main dependencies section.
{ version = "^0.18.0", markers="sys_platform == 'win32'", source = "torch_cuda121" },
{ version = "^0.18.0", markers="sys_platform == 'win32'", source = "torch_cuda" },
{ version = "^0.18.0", markers="sys_platform != 'win32'", source = "pypi" },
]

[tool.poetry.group.docs.dependencies]
Expand All @@ -46,7 +48,7 @@ mkdocs-glightbox = "^0.3.4"
mkdocs-material = "^9.1.17"

[[tool.poetry.source]]
name = "torch_cuda121"
name = "torch_cuda"
url = "https://download.pytorch.org/whl/cu121"
priority = "explicit"

Expand Down

0 comments on commit 072e18c

Please sign in to comment.