Medical-SAM2 icon indicating copy to clipboard operation
Medical-SAM2 copied to clipboard

version `GLIBC_2.32'

Open Meaw0415 opened this issue 1 year ago • 9 comments

python train_3d.py -net sam2 -exp_name BTCV_MedSAM2 -sam_ckpt ./checkpoints/sam2_hiera_small.pt -sam_config sam2_hiera_s -image_size 1024 -val_freq 1 -prompt bbox -prompt_freq 2 -dataset btcv -data_path ./data/btcv

ImportError: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by /mnt/iMVR/zhengf/Medical-SAM2/sam2_train/_C.so)

Meaw0415 avatar Oct 07 '24 07:10 Meaw0415

I've met the same questions like you do. I check the closed issue and found https://github.com/MedicineToken/Medical-SAM2/issues/25, seems need to update our GLIBC version, but I have some questions, will update GLIBC cause some new bugs for incompatibilities? or could I just reduce the limitation of the GLIBC version? I just want to limit the environment in this project and do no changes to the whole environment.

DISAPPEARED13 avatar Oct 10 '24 08:10 DISAPPEARED13

PS: when I run train_2d.py, this problem doesn't happened, but just for 3d. why? great thanks.

DISAPPEARED13 avatar Oct 10 '24 09:10 DISAPPEARED13

PS: when I run train_2d.py, this problem doesn't happened, but just for 3d. why? great thanks.

Same as your situation, there is no problem when running train_2d.py, but no version "Glibc_2.32" occurs at 3D. After updating the Glibc version

Runtimeerror: CUDA ERROR: No Kernel Image is available for execution on the device

Compile with torch_use_cuda_dsa to enable device-size assereles.

Do you solve it?

cam-qf avatar Oct 28 '24 13:10 cam-qf

PS: when I run train_2d.py, this problem doesn't happened, but just for 3d. why? great thanks.

Same as your situation, there is no problem when running train_2d.py, but no version "Glibc_2.32" occurs at 3D. After updating the Glibc version

Runtimeerror: CUDA ERROR: No Kernel Image is available for execution on the device

Compile with torch_use_cuda_dsa to enable device-size assereles.

Do you solve it?

I have exactly same problem. I set up a Docker image with pytorch 2.4, ubuntu 22.04, cuda 12.1 and GLIB problem solved. And I am getting second error, too.

sahikabetul avatar Nov 06 '24 22:11 sahikabetul

PS: when I run train_2d.py, this problem doesn't happened, but just for 3d. why? great thanks.

Same as your situation, there is no problem when running train_2d.py, but no version "Glibc_2.32" occurs at 3D. After updating the Glibc version Runtimeerror: CUDA ERROR: No Kernel Image is available for execution on the device Compile with torch_use_cuda_dsa to enable device-size assereles. Do you solve it?

I have exactly same problem. I set up a Docker image with pytorch 2.4, ubuntu 22.04, cuda 12.1 and GLIB problem solved. And I am getting second error, too.

May I ask what graphics card you are using?

cam-qf avatar Nov 07 '24 02:11 cam-qf

Hi, My graphics card informations:

  • Model: NVIDIA A100-SXM4-80GB
  • Driver Version: 560.35.03
  • CUDA Version: 12.6
  • Memory: Each GPU has 80 GB of memory (81920 MiB)
  • Number of GPUs: 4

sahikabetul avatar Nov 08 '24 05:11 sahikabetul

Hi, My graphics card informations:

  • Model: NVIDIA A100-SXM4-80GB
  • Driver Version: 560.35.03
  • CUDA Version: 12.6
  • Memory: Each GPU has 80 GB of memory (81920 MiB)
  • Number of GPUs: 4

Congrates for solving the problem!! May I ask that your GLIBC version? That's quite wired, seems some system installation conflicts with the project.

DISAPPEARED13 avatar Nov 08 '24 05:11 DISAPPEARED13

I found one solution: go to the original Meta SAM2 repo, rebuild the SAM2, and replace the medsam2/sam_train/_C.so with the new built sam2/_C.so with.

How to rebuild sam2 can be found here, https://github.com/facebookresearch/sam2/issues/53?ref=blog.roboflow.com?ref=blog.roboflow.com

sudmat avatar Jan 20 '25 21:01 sudmat

@sudmat 谢谢你的解决方案!这解决了我的问题!

xinyueliii avatar Mar 21 '25 09:03 xinyueliii