I have `run_command_list.txt` which contrain one command per line:

```
time python3 train.py --dataroot ./datasets/maps --name maps_pix2pix --model pix2pix --direction AtoB --checkpoints_dir maps_pix2pix_a_to_b_bs_1 --batch_size 1 > bs_1.log
time python3 train.py --dataroot ./datasets/maps --name maps_pix2pix --model pix2pix --direction AtoB --checkpoints_dir maps_pix2pix_a_to_b_bs_2 --batch_size 2 > bs_2.log
time python3 train.py --dataroot ./datasets/maps --name maps_pix2pix --model pix2pix --direction AtoB --checkpoints_dir maps_pix2pix_a_to_b_bs_4 --batch_size 4 > bs_4.log
...

```

I want to run not more that 2 jobs in parallel and I want to set CUDA\_VISIBLE\_DEVICES=0 or CUDA\_VISIBLE\_DEVICES=1 depending on which GPU is available at the moment, how can I do this using `parallel` or `xargs`?

i.e. something like `cat run_command_list.txt | xargs -n 1 -P 2`