Yes you are correct, I am asking for the case 2. 
(1) So, I am running a jupyter notebook on a remote server, is it possible to then say something like?
CUDA_VISIBLE_DEVICES=7,8 jupyter notebook --no-browser

(2) Also, do I understand it correctly that the above command will make sure that my notebook accesses the GPUs that have index 7 and 8 on the server (let’s say I have 9 GPUs then, otherwise there is no index 8  ), which I can check with e.g. nvidia-smi but inside my notebook they will have index 0 and 1?
(3) And then I use the command:
torch.nn.DataParallel(model, device_ids=0,1, output_device=None, dim=0)

to access the previously defined GPUs?
(4) And how do I need to define the device inside my notebook? When using a single GPU I can say:
device = torch.device('cuda') and then send everything to it with module.to(device)
What do I have to put in the brackets instead of ‘cuda’?
Sorry for all the questions, I am relatively new to using multiple GPUs on a remote server