Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

conda environment #181

Closed
faroit opened this issue Aug 8, 2024 · 2 comments
Closed

conda environment #181

faroit opened this issue Aug 8, 2024 · 2 comments

Comments

@faroit
Copy link

faroit commented Aug 8, 2024

installation instructions as outlined in https://github.com/facebookresearch/segment-anything-2/blob/main/INSTALL.md are quite fragile, besides containerizing, has anyone managed to create a working conda environment that install the necessary cuda toolkit and compilers so that the pip installation can succeed?

if yes, could we add that environment as a contribution here?

@ronghanghu
Copy link
Contributor

Hi, we have recently made the CUDA extension step optional (in https://github.com/facebookresearch/segment-anything-2/pull/155 and https://github.com/facebookresearch/segment-anything-2/pull/175), which should simplify the installation step and require only PyTorch, opencv, and a few other common dependencies.

You can pull the latest code and reinstall via

# run the line below inside the SAM 2 repo
git pull;
pip uninstall -y SAM-2;
rm -f sam2/*.so;
pip install -e ".[demo]"

which allows using SAM 2 without CUDA extension (the results should stay the same in most cases, see INSTALL.md for details).

@faroit
Copy link
Author

faroit commented Aug 17, 2024

@ronghanghu Thanks a lot for the update. Things work fine now, indeed.

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

No branches or pull requests

2 participants