import os # OSS配置 OSS_CONFIG = { 'endpoint': 'http://oss-cn-hangzhou-internal.aliyuncs.com', 'accessKeyId': 'LTAI5tFFF44gSGQTvmozG3zK', 'accessKeySecret': 'oQlax6KAEENCQRbWkbSFiW9z2KSre8', 'bucket_name': 'recommend-sort-models' } slb_id = 'lb-bp1ho0fp6nh7j93qij1kx' # 修改负载均衡权限 slb_client_params = { 'access_key_id': 'LTAIuPbTPL3LDDKN', 'access_key_secret': 'ORcNedKwWuwVtcq4IRFtUDZgS0b1le', 'region_id': 'cn-hangzhou' } # 购买机器权限 create_client_params = { 'access_key_id': 'LTAI4GBWbFvvXoXsSVBe1o9f', 'access_key_secret': 'kRAikWitb4kDxaAyBqNrmLmllMEDO3', 'region_id': 'cn-hangzhou' } start_sh_dir = os.path.dirname(os.path.realpath(__file__)) start_sh_filename = 'deep_model_start.sh' with open(file=os.path.join(start_sh_dir, start_sh_filename), mode='r', encoding='utf-8') as rf: file_content = rf.read() print(file_content) #logging.info(f"start sh file content: {file_content}") start_sh = { 'target_dir': '/data/SortService', 'name': start_sh_filename, 'content': file_content, } check_sh_filename = 'deep_model_check.sh' check_sh_dir = os.path.dirname(os.path.realpath(__file__)) with open(file=os.path.join(check_sh_dir, check_sh_filename), mode='r', encoding='utf-8') as rf: check_file_content = rf.read() print(check_file_content) check_sh = { 'target_dir': '/data/SortService', 'name': check_sh_filename, 'content': check_file_content, }