Open JeongJuhyeon opened 1 month ago
You have to update gcc to version 9.3 or higher.. worked for me! worth a try.
@aryansaurav Thanks for the suggestion :)
I've added apt-get build-essential
to ensure gcc is up-to-date, but unfortunately the result is the same. Are you also using a Docker image on a GPUless machine?
No didn't use docker but check gcc --version If it's 9.30 or higher, then might be another issue
Oh and I had torch 2.40 with cuda 12.1 for the sake of completion
But again there can be other issues
On Tue, Jul 30, 2024, 19:15 JeongJuhyeon @.***> wrote:
@aryansaurav https://github.com/aryansaurav Thanks for the suggestion :) I've added apt-get build-essential to ensure gcc is up-to-date, but unfortunately the result is the same. Are you also using a Docker image on a GPUless machine?
— Reply to this email directly, view it on GitHub https://github.com/facebookresearch/segment-anything-2/issues/37#issuecomment-2258834035, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKVC2DFD3VOARV3MN3BQ7G3ZO7C4JAVCNFSM6AAAAABLWRV32GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENJYHAZTIMBTGU . You are receiving this because you were mentioned.Message ID: @.***>
Segment Anything 2.0 require to compile a .cu file with nvcc at build time. Hence, a cuda devel baseImage is required to build the library.
Try with pytorch/pytorch:2.0.1-cuda11.7-cudnn8-devel
Hi, I will be getting up SAM2 + Docker as well tonight:
Check out the repo here https://github.com/peasant98/SAM2-Docker
I spent a significant amount of time containerizing SAM2 for CVAT. I suggest you benefit my work, no offence! Check out my containerization here : Sam2-Container.
You can fetch a pre-built image using docker run -it --rm --gpus all jeanchristopheruel/sam2-container:latest bash
Images tried:
pytorch/pytorch:2.0.1-cuda11.7-cudnn8-runtime
- CUDA 11.7, CUDNN8, PyTorch 2.0.1. This is the one I use with SAM1, works fine. But possibly too old for SAM2.pytorch/pytorch:2.4.0-cuda12.4-cudnn9-runtime
- CUDA 12.4, CUDNN9, PyTorch 2.4.0pytorch/pytorch:2.3.1-cuda12.1-cudnn8-runtime
- CUDA 12.1, CUDNN8, PyTorch 2.3.1Error:
Sample Dockerfile:
Requirements.txt
git+https://github.com/facebookresearch/segment-anything-2.git
Is there a different combination of versions that should be used?
Or is this because the host does not have a GPU? We should be able to at least build the wheel/image on a GPU-less machine so that we can then run it on external (e.g. cloud) GPUs. segment-anything (v1) worked fine that way. Unless there's a pre-built wheel or image that we can use so that we don't have to build it ourselves.