Skip to content

feat: uv-based installer with locked, reproducible dependencies#2

Open
semx2a wants to merge 2 commits into
Code2Collapse:mainfrom
semx2a:studio/02-uv-installer
Open

feat: uv-based installer with locked, reproducible dependencies#2
semx2a wants to merge 2 commits into
Code2Collapse:mainfrom
semx2a:studio/02-uv-installer

Conversation

@semx2a

@semx2a semx2a commented Jul 2, 2026

Copy link
Copy Markdown

Part 2 of the series — builds on #1 (review the last commit only; the diff will shrink once part 1 is merged).

Replaces the pip installer, which fails on the sam2/sam3 source builds (--no-build-isolation requires setuptools/wheel preinstalled → invalid command 'bdist_wheel' / No module named 'setuptools'), with uv:

  • pyproject.toml declares the full dependency set; torch/torchvision pinned to the CUDA 12.6 wheel index; sam2/sam3 build via [tool.uv.extra-build-dependencies]; triton-windows satisfies sam3's import triton on Windows.
  • uv.lock committed for byte-identical installs across machines.
  • install.py becomes a thin uv sync driver with --venv for machine-local envs (faster torch import when the plugin lives on a network share).

semx2a added 2 commits July 2, 2026 17:34
The package had no Nuke-level init.py, so ./gizmos was never added to the
plugin path (H2_SamViT: "Unknown command") and the H2_SamViT_Gizmo package
itself was not importable from gizmo knob callbacks. Add an init.py that
registers ./gizmos and puts the package's parent on the plugin path (which
Nuke also adds to sys.path).

Also ignore .codegraph/ tool artifacts.
Replace the ad-hoc pip installer (which failed on sam2/sam3 source builds:
missing setuptools/bdist_wheel under --no-build-isolation) with uv:

- pyproject.toml declares the full dependency set; torch/torchvision pinned
  to the CUDA 12.6 wheel index; sam2/sam3 build via
  [tool.uv.extra-build-dependencies] (setuptools/wheel injected into their
  isolated builds); triton-windows for sam3's `import triton` on Windows.
- uv.lock committed for byte-identical installs across machines.
- install.py becomes a thin driver: bootstraps uv, runs `uv sync`,
  records the venv in env_config.json, verifies imports.
- --venv <path> installs a machine-local env (faster cold starts);
  the shared ./venv next to the plugin remains the zero-setup default.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant