perf: 支持识别docker环境

This commit is contained in:
RockChinQ
2024-03-07 15:55:02 +08:00
parent 2471c5bf0f
commit 95784debbf
3 changed files with 9 additions and 4 deletions

View File

@@ -4,4 +4,8 @@ import sys
def get_platform() -> str:
"""获取当前平台"""
# 检查是不是在 docker 里
if os.path.exists('/.dockerenv'):
return 'docker'
return sys.platform