In the command line I am used to run/create containers with specific GPUs using the --gpus argument:
docker run -it --gpus '"device=0,2"' ubuntu nvidia-smi
The Docker SDK for Python documentation was not very helpful and I could not find a good explanation on how to do the same with the python SDK. Is there a way to do it?