feat: uv-based installer with locked, reproducible dependencies#2
Open
semx2a wants to merge 2 commits into
Open
feat: uv-based installer with locked, reproducible dependencies#2semx2a wants to merge 2 commits into
semx2a wants to merge 2 commits into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-isolationrequires setuptools/wheel preinstalled →invalid command 'bdist_wheel'/No module named 'setuptools'), with uv:pyproject.tomldeclares the full dependency set; torch/torchvision pinned to the CUDA 12.6 wheel index; sam2/sam3 build via[tool.uv.extra-build-dependencies];triton-windowssatisfies sam3'simport tritonon Windows.uv.lockcommitted for byte-identical installs across machines.install.pybecomes a thinuv syncdriver with--venvfor machine-local envs (faster torch import when the plugin lives on a network share).