-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Failed to build SAM-2 #21
Comments
+1 |
1 similar comment
+1 |
It's not possible to install it in a CPU only machine! Same error |
I install it in an Nvidia V100. Same error |
CUDA 12.1 ? |
also the same not working with CPU |
|
basically upgrading cuda from 11.8 to cuda 12.1 solves the issue... |
You have to update gcc to version 9.3 or higher.. worked for me! worth a try. |
Actually I had the latest torch 2.4 with cuda 12.1.
But the gcc version was the issue
…On Tue, Jul 30, 2024, 19:20 ZincCat ***@***.***> wrote:
For cuda 11.8, you'll need to install the pytorch built on it first
pip3 install torch==2.3.1+cu118 torchvision==0.18.1+cu118 torchaudio
--index-url https://download.pytorch.org/whl/cu118
—
Reply to this email directly, view it on GitHub
<#21 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKVC2DB3HH6D7CA2RGDYAETZO7DNHAVCNFSM6AAAAABLV4GXLCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENJYHA2DCNBXG4>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
For cuda 11.8, you'll need to install the pytorch built on it first |
Thanks, Some guy in another issue told me yesterday about this way around, it worked for me. Thanks for helping out others. |
torch 2.4.0+cu121 note: This error originates from a subprocess, and is likely not a problem with pip. I have the same problem too, don't know how to fix |
gcc version was also the problem for me After executing the following, I finally got the installation done without any error. conda create -n sam python=3.11 |
Hi, these errors are likely due to an error in building the SAM 2 CUDA extension. We have recently made the CUDA extension step optional (in #155 and #175) as a workaround to this problem. 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 |
Hi, this is likely due to an error in building the SAM 2 CUDA extension. We have recently made the CUDA extension step optional (in #155 and #175) as a workaround to this problem. 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 |
When I tried to install SAM 2 using these command, it displayed this issue:
Error:
Cloning into 'segment-anything-2'...
Host key verification failed.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
/bin/bash: line 1: cd: segment-anything-2: No such file or directory
Obtaining file:///content
ERROR: file:///content does not appear to be a Python project: neither 'setup.py' nor 'pyproject.toml' found
On fixing the git clone issue by replacing the clone link with the github link in address bar, it displayed:
Error:
Environment:
Python = Python 3.10.12
Google Colab + T4
Kindly fix or tell me any workaround for this part.
The text was updated successfully, but these errors were encountered: