Skip to content

Commit

Permalink
Added dependency markers for MacOS
Browse files Browse the repository at this point in the history
  • Loading branch information
slashtechno committed Mar 25, 2024
1 parent 2a78641 commit 2e021fe
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 8 deletions.
66 changes: 62 additions & 4 deletions poetry.lock

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

9 changes: 5 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ numpy = "^1.23.2"
# 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 = [
{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'"},
{version = "^2.2.1", source = "pypi", markers = "extra!='cuda' and (platform_system=='Linux' or platform_system=='Darwin')"},
{version = "^2.2.1", source = "pytorch-cpu", markers = "extra!='cuda' and platform_system=='Windows'"},
]
# https://stackoverflow.com/a/76477590/18270659
# https://discfuss.tensorflow.org/t/tensorflow-io-gcs-filesystem-with-windows/18849/4
Expand All @@ -39,6 +39,7 @@ torch = [
# Installed from Nvidia website - nvidia-cuda-toolkit is not installed, but default PopOS drivers are installed
absl-py = "^2.1.0"
tensorflow = {version = "^2.13.0", markers = "extra!='cuda'"}
# TODO: Change platform to markers
tensorflow-macos = { version = "^2.13.0", platform = "darwin", markers = "platform_machine=='arm64'" }
tensorflow-intel = { version = "^2.13.0", platform = "win32" }
tensorflow-io-gcs-filesystem = [
Expand All @@ -55,7 +56,7 @@ optional = true

[tool.poetry.group.gpu.dependencies]
torch = {version = "^2.2.1", source = "pytorch-cu121", markers = "extra=='cuda'"}
tensorflow = {version = "^2.14.0", extras = ["and-cuda"], markers = "extra=='cuda'"}
tensorflow = {version = "^2.14.0", extras = ["and-cuda"], markers = "extra=='cuda' and platform_system == 'Linux'"}

[tool.poetry.extras]
# Might be better to rename this to nocpu since it's more accurate
Expand Down Expand Up @@ -91,4 +92,4 @@ line-length = 135
extend-select= ["FIX002"]

[tool.poetry.scripts]
wyzely-detect = "wyzely_detect.__main__:main"
wyzely-detect = "wyzely_detect.__main__:main"

0 comments on commit 2e021fe

Please sign in to comment.