diff --git a/docker/Dockerfile b/docker/Dockerfile index 109ebba..45be42a 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -49,7 +49,11 @@ RUN mkdir -p /app/data /app/logs /app/config /app/temp # 复制 requirements 并安装依赖 COPY requirements-docker.txt . RUN pip install --no-cache-dir --upgrade pip -i https://pypi.tuna.tsinghua.edu.cn/simple && \ - pip install --no-cache-dir -r requirements-docker.txt -i https://pypi.tuna.tsinghua.edu.cn/simple + pip install --no-cache-dir -r requirements-docker.txt -i https://pypi.tuna.tsinghua.edu.cn/simple && \ + pip install --no-cache-dir --no-deps empyrical-reloaded==0.5.12 -i https://pypi.tuna.tsinghua.edu.cn/simple +# ↑ empyrical-reloaded 必须单独 --no-deps 装:其元数据伪依赖 peewee<3.17.4 与 +# vnpy_sqlite 的 >=3.17.9 互斥,合入 requirements 单次解析必 ResolutionImpossible; +# 包体零引用 peewee(实测),真依赖 bottleneck/numpy/pandas/scipy 已在主文件钉版。 # 复制应用代码(包含所有 sanguo 模块) COPY sanguo_web/ /app/sanguo_web/ diff --git a/requirements-docker.txt b/requirements-docker.txt index 370b422..fed4ae1 100644 --- a/requirements-docker.txt +++ b/requirements-docker.txt @@ -75,13 +75,20 @@ aioredis==2.0.1 # ============================================ polars[rtcompat]==1.42.1 # 钉版+[rtcompat]:NAS CPU(Synology Celeron)无 AVX2,plain polars 即便 1.42.1 也 SIGILL(exit132);需 [rtcompat] 拉 polars-runtime-compat 兜底。pre-init-rebuild 实证(有 polars-runtime-compat 才跑得通)。勿改回 >= scipy==1.15.3 +bottleneck==1.6.0 +# peewee:vnpy_sqlite 声明 >=3.17.9 但 VPS 生产实证 3.17.3 跑通(lock 真相) +peewee==3.17.3 alphalens-reloaded==0.4.6 scikit-learn==1.7.2 lightgbm==4.6.0 torch==2.12.1 pyarrow==24.0.0 -# empyrical-reloaded 替代老 empyrical(根治 0.5.5+0.5.9 双装、import 顺序决定谁生效的脏状态) -empyrical-reloaded==0.5.12 +# ⚠️ empyrical-reloaded==0.5.12 不在本文件内装:其元数据伪依赖 peewee<3.17.4 与 +# vnpy_sqlite 的 >=3.17.9 互斥,单一 pip install -r 必 ResolutionImpossible(三机 +# 一直是分次安装掩盖)。empyrical 包体零引用 peewee(实测 grep)。 +# 真依赖 numpy/pandas/scipy/bottleneck 上方已钉;由 Dockerfile 第二步 +# pip install --no-deps empyrical-reloaded==0.5.12 单独装。 +# (替代老 empyrical,根治 0.5.5+0.5.9 双装脏状态) statsmodels==0.14.6 matplotlib==3.10.9 seaborn==0.13.2 diff --git a/requirements-lock.txt b/requirements-lock.txt index 4c1295d..d784f2c 100644 --- a/requirements-lock.txt +++ b/requirements-lock.txt @@ -103,7 +103,7 @@ scikit-learn==1.7.2 lightgbm==4.6.0 torch==2.12.1 alphalens-reloaded==0.4.6 -empyrical-reloaded==0.5.12 +empyrical-reloaded==0.5.12 # ⚠️不可与其他行合并单次 pip install -r:其伪依赖 peewee<3.17.4 与 vnpy_sqlite 的 >=3.17.9 互斥必 ResolutionImpossible;须单独 pip install --no-deps(包体零引用 peewee,真依赖 bottleneck/numpy/pandas/scipy)。VPS 生产 peewee 实证版=3.17.3、bottleneck=1.6.0 statsmodels==0.14.6 matplotlib==3.10.9 seaborn==0.13.2