将GPU配置提取到配置文件中
This commit is contained in:
4
main.py
4
main.py
@@ -6,10 +6,10 @@ import paddle
|
||||
|
||||
from auto_email.error_email import send_an_error_email
|
||||
from config.log import LOGGING_CONFIG
|
||||
from config.photo_review import RETRY_TIME, SEND_ERROR_EMAIL
|
||||
from config.photo_review import RETRY_TIME, SEND_ERROR_EMAIL, CUDA_VISIBLE_DEVICES
|
||||
from photo_review.photo_review import main
|
||||
|
||||
os.environ["CUDA_VISIBLE_DEVICES"] = "1"
|
||||
os.environ["CUDA_VISIBLE_DEVICES"] = CUDA_VISIBLE_DEVICES
|
||||
|
||||
# 项目必须从此处启动,否则代码中的相对路径可能导致错误的发生
|
||||
if __name__ == '__main__':
|
||||
|
||||
Reference in New Issue
Block a user