Use uv for Python environment

This commit is contained in:
2026-06-19 18:54:46 +08:00
parent 7083c45feb
commit 87060e30d4
17 changed files with 444 additions and 69 deletions
+4 -2
View File
@@ -15,7 +15,9 @@ from flask import Flask, Response, jsonify
from werkzeug.serving import make_server
# 添加当前目录到路径
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
sys.path.insert(0, BASE_DIR)
LOG_FILE = os.environ.get("ARM_SERVER_LOG_FILE", os.path.join(BASE_DIR, "server.log"))
# 配置日志
logging.basicConfig(
@@ -23,7 +25,7 @@ logging.basicConfig(
format="%(asctime)s [%(levelname)s] %(name)s: %(message)s",
handlers=[
logging.StreamHandler(),
logging.FileHandler(os.path.expanduser("~/work/arm_server/server.log"))
logging.FileHandler(LOG_FILE)
]
)
logger = logging.getLogger("arm_server")