I’ve been doing that internally via os.environ["CUDA_VISIBLE_DEVICES"]= <device_num> in the script itself. Does it make a difference to instead declare it when calling the script?
Nonetheless, I’ll still give it a try