fix: cross-platform setup and missing dependencies#53
Open
Sdamirsa wants to merge 2 commits intoBIT-DataLab:mainfrom
Open
fix: cross-platform setup and missing dependencies#53Sdamirsa wants to merge 2 commits intoBIT-DataLab:mainfrom
Sdamirsa wants to merge 2 commits intoBIT-DataLab:mainfrom
Conversation
- Rewrite setup_sam3.sh for Windows (Git Bash, WSL), macOS, and Linux with automatic pip/uv detection, path conversion, and error messages - Install SAM3 with [dev,notebooks] extras to include einops, pycocotools and other transitive deps missing from SAM3 core requirements - Patch triton import (Linux-only) to be conditional so SAM3 loads on all platforms - Add verification step at end of setup script (green/red status) - Patch SAM3 fused BFloat16 MLP kernel (addmm_act) that causes dtype mismatch on consumer GPUs (RTX 3080/4090 etc.) - Add python-multipart, modelscope, einops to requirements.txt - Add .gitattributes rule to keep .sh files with LF line endings Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Issues found during setup on Windows (RTX 3080 Ti, CUDA 12.8, Python 3.12):
setup_sam3.shfails on Windows/WSL/macOS — hardcodespip, no path conversion, no cross-platform supporteinopsimported by SAM3 at runtime but missing fromrequirements.txtpycocotoolsimported unconditionally via SAM3 training code but only listed in optional extraspython-multipartrequired by FastAPI/convertendpoint but missing fromrequirements.txttritonimported at module level inedt.pybut is Linux-only — crashes on Windows/macOSaddmm_actinperflib/fused.pycasts all tensors to BFloat16 (H100 optimization) — causes dtype mismatch RuntimeError on consumer GPUs (RTX 3080, 3090, 4090, etc.)Changes:
setup_sam3.shfor cross-platform support with pip/uv auto-detection, WSL path conversion, triton patching, and a verification step[dev,notebooks]extras to include missing transitive depspython-multipart,modelscope,einopstorequirements.txtaddmm_actBFloat16 cast to use standard float32 ops for consumer GPU compatibility.gitattributesrule*.sh text eol=lfTested: CLI and server both working end-to-end. No pipeline logic changed.