From 243d1c802a2664ff819cd19f21df964b9657d016 Mon Sep 17 00:00:00 2001 From: Jianqi Pan Date: Fri, 21 Feb 2025 15:07:59 +0900 Subject: [PATCH] feat(uv): add cuda11 and cuda12 support --- pyproject.toml | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 96ae8f2..c0376ff 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,18 +39,29 @@ ignore = [ [tool.pyright] [tool.uv] -conflicts = [[{ extra = "cpu" }, { extra = "gpu" }]] +conflicts = [ + [ + { extra = "cpu" }, + { extra = "gpu" }, + { extra = "cuda11" }, + { extra = "cuda12" }, + ], +] package = true [tool.uv.sources] torch = [ { index = "torch-cpu", extra = "cpu" }, { index = "torch-gpu", extra = "gpu" }, + { index = "torch-cuda11", extra = "cuda11" }, + { index = "torch-cuda12", extra = "cuda12" }, ] torchvision = [ { index = "torch-cpu", extra = "cpu" }, { index = "torch-gpu", extra = "gpu" }, + { index = "torch-cuda11", extra = "cuda11" }, + { index = "torch-cuda12", extra = "cuda12" }, ] [[tool.uv.index]] @@ -63,6 +74,16 @@ name = "torch-gpu" url = "https://download.pytorch.org/whl/cu124" explicit = true +[[tool.uv.index]] +name = "torch-cuda11" +url = "https://download.pytorch.org/whl/cu118" +explicit = true + +[[tool.uv.index]] +name = "torch-cuda12" +url = "https://download.pytorch.org/whl/cu124" +explicit = true + [build-system] requires = ["hatchling"] build-backend = "hatchling.build"