mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-11 16:26:02 +00:00
perf: 支持识别docker环境
This commit is contained in:
@@ -4,4 +4,8 @@ import sys
|
||||
|
||||
def get_platform() -> str:
|
||||
"""获取当前平台"""
|
||||
# 检查是不是在 docker 里
|
||||
if os.path.exists('/.dockerenv'):
|
||||
return 'docker'
|
||||
|
||||
return sys.platform
|
||||
|
||||
Reference in New Issue
Block a user