Sys.setenv(CUDA_DEVICE_ORDER="PCI_BUS_ID")
Sys.setenv(CUDA_VISIBLE_DEVICES="0")
```
this would set the environment variables as specified. You can check the parameter values by running
```
Sys.getenv("CUDA_DEVICE_ORDER")
Sys.getenv("CUDA_VISIBLE_DEVICES")
```