rec_model_config.py 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. import os
  2. # OSS配置
  3. OSS_CONFIG = {
  4. 'endpoint': 'http://oss-cn-hangzhou-internal.aliyuncs.com',
  5. 'accessKeyId': 'LTAI5tFFF44gSGQTvmozG3zK',
  6. 'accessKeySecret': 'oQlax6KAEENCQRbWkbSFiW9z2KSre8',
  7. 'bucket_name': 'recommend-sort-models'
  8. }
  9. slb_id = 'lb-bp1ho0fp6nh7j93qij1kx'
  10. # 修改负载均衡权限
  11. slb_client_params = {
  12. 'access_key_id': 'LTAIuPbTPL3LDDKN',
  13. 'access_key_secret': 'ORcNedKwWuwVtcq4IRFtUDZgS0b1le',
  14. 'region_id': 'cn-hangzhou'
  15. }
  16. # 购买机器权限
  17. create_client_params = {
  18. 'access_key_id': 'LTAI4GBWbFvvXoXsSVBe1o9f',
  19. 'access_key_secret': 'kRAikWitb4kDxaAyBqNrmLmllMEDO3',
  20. 'region_id': 'cn-hangzhou'
  21. }
  22. start_sh_dir = os.path.dirname(os.path.realpath(__file__))
  23. start_sh_filename = 'deep_model_start.sh'
  24. with open(file=os.path.join(start_sh_dir, start_sh_filename), mode='r', encoding='utf-8') as rf:
  25. file_content = rf.read()
  26. print(file_content)
  27. #logging.info(f"start sh file content: {file_content}")
  28. start_sh = {
  29. 'target_dir': '/data/SortService',
  30. 'name': start_sh_filename,
  31. 'content': file_content,
  32. }
  33. check_sh_filename = 'deep_model_check.sh'
  34. check_sh_dir = os.path.dirname(os.path.realpath(__file__))
  35. with open(file=os.path.join(check_sh_dir, check_sh_filename), mode='r', encoding='utf-8') as rf:
  36. check_file_content = rf.read()
  37. print(check_file_content)
  38. check_sh = {
  39. 'target_dir': '/data/SortService',
  40. 'name': check_sh_filename,
  41. 'content': check_file_content,
  42. }