CUDA_VISIBLE_DEVICES=0 python your_file.py # 指定GPU集群中第一块GPU使用,其他的屏蔽掉
CUDA_VISIBLE_DEVICES=1 Only device 1 will be seen
CUDA_VISIBLE_DEVICES=0,1 Devices 0and1 will be visible
CUDA_VISIBLE_DEVICES="0,1" Same as above, quotation marks are optional 多GPU一起使用
CUDA_VISIBLE_DEVICES=0,2,3 Devices 0,2,3 will be visible; device 1 is masked
CUDA_VISIBLE_DEVICES="" No GPU will be visible