修复关键位
This commit is contained in:
@@ -5925,6 +5925,12 @@ def _hub_meta_bundle():
|
||||
|
||||
|
||||
try:
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
_repo_root = Path(__file__).resolve().parent.parent
|
||||
if str(_repo_root) not in sys.path:
|
||||
sys.path.insert(0, str(_repo_root))
|
||||
from hub_bridge import install_on_app
|
||||
|
||||
install_on_app(
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
const path = require("path");
|
||||
|
||||
const ROOT = __dirname;
|
||||
const REPO_ROOT = path.join(ROOT, "..");
|
||||
const PY = path.join(ROOT, ".venv", "bin", "python");
|
||||
|
||||
module.exports = {
|
||||
@@ -27,7 +28,7 @@ module.exports = {
|
||||
autorestart: true,
|
||||
watch: false,
|
||||
max_memory_restart: "800M",
|
||||
// app.py 从项目根目录 .env 加载(由 .env.example 复制而来,勿提交 Git)
|
||||
env: { PYTHONPATH: REPO_ROOT },
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user