... | ... | @@ -5,10 +5,10 @@ On servers that equip multiple GPUs, it is common to have one unit more intensiv |
|
|
The GPU(s) made available to your scripts are controlled by the `CUDA_VISIBLE_DEVICES` environment variable. From most command line shells (e.g., bash, zsh, etc.), you can export this variable with the following command:
|
|
|
|
|
|
```
|
|
|
export CUDA_VISIBLE_DEVICES=0
|
|
|
export CUDA_VISIBLE_DEVICES=3
|
|
|
```
|
|
|
|
|
|
The example above forces your script to use GPU0, whereas for example typing `=1` would let them use GPU1.
|
|
|
The example above forces your script to use GPU3, whereas for example typing `=0` would let them use GPU0.
|
|
|
|
|
|
Most graphical IDEs that support remote deployment (see ["Remote Code Deployment"](/remote-code)) also allow you to set environment variables in the remote host. For example, in PyCharm by JetBrains, this is achieved by modifying the "Run Configuration" of your script. Check the documentation of your IDE for more details.
|
|
|
|