I would like to pass different environment variables to each worker, so they can be initialized on different resources.
For a bit of context, I would like to parallelize some code on mutiple GPUs (on a single machine) by setting CUDA_VISIBLE_DEVICES for each worker. From what I understand, at the moment the environment that I set in the main process will be shared by all workers. Note that the variable has to be set before any GPU-based libraries are imported and ressources are allocated.