Open goodevile opened 1 month ago
Thanks, that helped! I wanted to add that I needed to set the GCC version to something between 9 < Version <14. You can do this by
CC=gcc-11 pip install -e .
or with an other available version that exists on your device!
Which version of python is the conda environment you are using? Is it 3.9 or 3.10?
I use conda with python 3.10.
worked for me:
install torch nightly! install CUDA 12.1 run the sam2 pip command
Try this
I am tired to explain everything so here it's what I did:
First install CUDA 12.5 (cuda cuda cuda cuda 🎶)
https://developer.nvidia.com/cuda-downloads
Then:
git clone git@github.com:facebookresearch/segment-anything-2.git
cd segment-anything-2
Next:
pip install wheel setuptools
pip install ninja
why ninja? well... got this error:
UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja..
(don't ask me, ask who wrote this code that asks for ninjas 🥷)Are you using a venv? (virtual environment) then check nvcc version:
nvcc --version
12.* ? then you are good to go and use
pip install -e .
not 12.*? then check where cuda is installed:
ls /usr/local/
are you seeing the cuda folder like this?:
bin cuda cuda-12 cuda-12.5 etc games include lib man sbin share src
then do this:
export PATH=/usr/local/cuda-12.5/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-12.5/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
deactivate your environment and activate it again. then:
pip install -e .
You happy? leave a like. Unhappy? I tried ok?