台挂起命令
CUDA_VISIBLE_DEVICES=0,1 nohup python -u main.py --config ./configs/train_stgan.yaml > main.log 2>&1 &
CUDA_VISIBLE_DEVICES=0,1 指定显卡
main.py --config ./configs/train_stgan.yaml 指定运行.py文件
main.log 指定生成log名为main
终止后台命令
查看显卡所运行程序id
nvidia-smi
![在这里插入图片描述](https://img-blog.csdnimg.cn/20210717142135919.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQxNjEyNTI3,size_16,color_FFFFFF,t_70)
kill 21642