LeapLabTHU/ActiveNeRF

Setting Cuda device

at82 opened this issue · 2 comments

at82 commented

Hi, I'm trying to make run_nerf.py use a specific gpu on my machine by setting os.environ['CUDA_VISIBLE_DEVICES'] = 'gpu id'

before importing torch, but it always tries uses gpu 0. How can I solve this problem? Thanks.

YZsZY commented

Before you run the code, set this command in your terminal shell: export CUDA_VISIBLE_DEVICES=0

at82 commented

Thanks for your response. I have tried this before but the code always uses gpu 0 and it also blows up the gpu memory.