jiaxinxie97 / HFGI3D

201 stars 17 forks source link

No cuda available in WSL2 and Google Colab (even that is available) #9

Closed mercantigo closed 1 year ago

mercantigo commented 1 year ago

Hi! I've been trying to run it, but no matter what I do, when I run "cd inversion/scripts python run_pti.py ../../example_configs/config_00001.py" I got this error:

"torch._C._cuda_init() "RuntimeError: No CUDA GPUs are available"

I'm getting this error in WSL2 and Google Colab. But CUDA is available (got True when I run "import torch torch.cuda.is_available()").

I've managed to run other scripts and repos fine, but HFGI3D no. Any clues?

echen01 commented 1 year ago

In inversion/configs/global_config.py try setting line 2 to cuda_visible_devices = '0'.

This worked for me. Hope this helps

mercantigo commented 1 year ago

it worked, thank you!