Kai-46 / ARF-svox2

Artistic Radiance Fields
BSD 2-Clause "Simplified" License
498 stars 42 forks source link

RuntimeError: CUDA driver initialization failed, you might not have a CUDA gpu. #9

Closed kravrolens closed 1 year ago

kravrolens commented 1 year ago

Excellent work!

I have created the envs, when running bash try_llff.sh flower 14, the result reports an error:

Traceback (most recent call last): File "render_imgs.py", line 95, in lpips_vgg = lpips.LPIPS(net="vgg").eval().to(device) File "~/anaconda3/envs/arf-svox2/lib/python3.8/site-packages/torch/nn/modules/module.py", line 927, in to return self._apply(convert) File "~/anaconda3/envs/arf-svox2/lib/python3.8/site-packages/torch/nn/modules/module.py", line 579, in _apply module._apply(fn) File "~/anaconda3/envs/arf-svox2/lib/python3.8/site-packages/torch/nn/modules/module.py", line 625, in _apply self._buffers[key] = fn(buf) File "~/anaconda3/envs/arf-svox2/lib/python3.8/site-packages/torch/nn/modules/module.py", line 925, in convert return t.to(device, dtype if t.is_floating_point() or t.is_complex() else None, non_blocking) File "~/anaconda3/envs/arf-svox2/lib/python3.8/site-packages/torch/cuda/init.py", line 217, in _lazy_init torch._C._cuda_init() RuntimeError: CUDA driver initialization failed, you might not have a CUDA gpu.

I reinstalled cudatoolkit, but did not work. Excuting nvcc -V,

nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2019 NVIDIA Corporation Built on Wed_Oct_23_19:24:38_PDT_2019 Cuda compilation tools, release 10.2, V10.2.89

don't know what the problem is, THX!

kravrolens commented 1 year ago

The solution works for me: conda install pytorch torchvision cudatoolkit=10.2 -c pytorch