Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion docker/gpu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ COPY --chown=appuser:appuser pyproject.toml ./pyproject.toml

# Install dependencies with GPU extras
RUN uv venv --python 3.10 && \
uv sync --extra gpu --no-cache
if [ "$(uname -m)" = "aarch64" ]; then \
uv pip install --python .venv/bin/python --no-cache -e ".[gpu-arm64]" --prerelease=allow; \
else \
uv sync --extra gpu --no-cache; \
fi

# Copy project files including models
COPY --chown=appuser:appuser api ./api
Expand Down
9 changes: 8 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ dependencies = [

[project.optional-dependencies]
gpu = ["torch==2.8.0+cu129"]
gpu-arm64 = ["torch"]
cpu = ["torch==2.8.0"]
test = [
"pytest==8.3.5",
Expand All @@ -55,12 +56,13 @@ test = [
]

[tool.uv]
conflicts = [[{ extra = "cpu" }, { extra = "gpu" }]]
conflicts = [[{ extra = "cpu" }, { extra = "gpu" }, { extra = "gpu-arm64" }]]

[tool.uv.sources]
torch = [
{ index = "pytorch-cpu", extra = "cpu" },
{ index = "pytorch-cuda", extra = "gpu" },
{ index = "pytorch-nightly", extra = "gpu-arm64" },
]

[[tool.uv.index]]
Expand All @@ -73,6 +75,11 @@ name = "pytorch-cuda"
url = "https://download.pytorch.org/whl/cu129"
explicit = true

[[tool.uv.index]]
name = "pytorch-nightly"
url = "https://download.pytorch.org/whl/nightly/cu126"
explicit = true

[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"
Expand Down