export CUDA_VISIBLE_DEVICES=1 Only device1 will be seen
export CUDA_VISIBLE_DEVICES=0,1 Devices 0 and 1 will be visible
export CUDA_VISIBLE_DEVICES=0,2,3 Devices 0,2,3 will be visible;device 1 is masked
通常可以将这行加入用户home目录下.bashrc,这样每次远程登录就不用重新配置了。
export CUDA_VISIBLE_DEVICES=1 Only device1 will be seen
export CUDA_VISIBLE_DEVICES=0,1 Devices 0 and 1 will be visible
export CUDA_VISIBLE_DEVICES=0,2,3 Devices 0,2,3 will be visible;device 1 is masked
通常可以将这行加入用户home目录下.bashrc,这样每次远程登录就不用重新配置了。