fix(orchestrator): spawn 子进程 PYTHONPATH + entrypoint 回根治孤儿
ProcessPoolExecutor(spawn)子进程不继承主进程 sys.path(insert 是内存修改), import sanguo_orchestrator 失败->BrokenProcessPool->API 回测静默失败,POST 秒回 task_id 但轮询永远 404。spawn 继承 env 不继承 sys.path,故: 1. Dockerfile ENV PYTHONPATH=/app:/app/vnpy_v4.4.0(镜像层,bind mount 覆盖不了) 2. entrypoint.sh 回仓库根(git mv 自 docker/):promote --exclude /docker 致旧版 entrypoint 在 NAS 成 git 外孤儿(340行,被 bind mount 覆盖镜像层);回根后全量 rsync 自动推可复现(对齐 docs/deployment/nas-deploy-plan.md 预设修复)+export 兜底 3. 三 Dockerfile COPY 路径同步 反馈: 策略 session(根因诊断+探针验证)
This commit is contained in:
+2
-1
@@ -9,6 +9,7 @@ ENV TZ=Asia/Shanghai \
|
||||
DEBIAN_FRONTEND=noninteractive \
|
||||
PYTHONUNBUFFERED=1 \
|
||||
PYTHONDONTWRITEBYTECODE=1 \
|
||||
PYTHONPATH=/app:/app/vnpy_v4.4.0 \
|
||||
VNPY_LOG_LEVEL=INFO \
|
||||
TA_LIBRARY_PATH=/usr/local/lib \
|
||||
TA_INCLUDE_PATH=/usr/local/include
|
||||
@@ -60,7 +61,7 @@ COPY sanguo_data/ /app/sanguo_data/
|
||||
COPY sanguo_common/ /app/sanguo_common/
|
||||
|
||||
# 复制启动脚本
|
||||
COPY docker/entrypoint.sh /app/
|
||||
COPY entrypoint.sh /app/
|
||||
RUN chmod +x /app/entrypoint.sh
|
||||
|
||||
# 暴露端口
|
||||
|
||||
Reference in New Issue
Block a user