【杂项】当服务器有空闲GPU时发送邮件提醒-python
import osimport timeimport yagmailfrom loguru import loggerdef gpu_info(): gpu_status = os.popen('nvidia-smi | grep %').read().split('|') gpu_memory1 = int(gpu_status[2].split('/')[0].split('M')[0].strip()) gpu_memory2 = int(gpu_status[6]
原创
2021-05-31 15:27:25 ·
525 阅读 ·
1 评论