From 64b10fda415d9d644aa93400bc9cc3963842cc75 Mon Sep 17 00:00:00 2001 From: claude_dev Date: Sat, 15 Aug 2026 08:39:23 +0800 Subject: [PATCH] =?UTF-8?q?fix(docker):=20=E8=A7=A3=E5=BC=80lock=E9=9A=90?= =?UTF-8?q?=E8=97=8F=E4=BE=9D=E8=B5=96=E6=AD=BB=E9=94=81=E2=80=94=E2=80=94?= =?UTF-8?q?empyrical-reloaded0.5.12=E5=85=83=E6=95=B0=E6=8D=AE=E4=BC=AA?= =?UTF-8?q?=E4=BE=9D=E8=B5=96peewee<3.17.4=E4=B8=8Evnpy=5Fsqlite=E7=9A=84>?= =?UTF-8?q?=3D3.17.9=E4=BA=92=E6=96=A5,=E5=8D=95=E6=AC=A1pip=20install=20-?= =?UTF-8?q?r=E5=BF=85ResolutionImpossible(=E4=B8=89=E6=9C=BA=E4=B8=80?= =?UTF-8?q?=E7=9B=B4=E6=98=AF=E5=88=86=E6=AC=A1=E5=AE=89=E8=A3=85=E6=8E=A9?= =?UTF-8?q?=E7=9B=96,2026-08-15=E5=AE=B9=E5=99=A8=E9=87=8D=E5=BB=BA?= =?UTF-8?q?=E9=A6=96=E6=AC=A1=E8=A7=A6=E5=8F=91;=E5=AE=9E=E6=B5=8Bempyrica?= =?UTF-8?q?l=E5=8C=85=E4=BD=93=E9=9B=B6=E5=BC=95=E7=94=A8peewee);=E4=BF=AE?= =?UTF-8?q?=E6=B3=95=3Dempyrical-reloaded=E7=A7=BB=E5=87=BA=E4=B8=BB?= =?UTF-8?q?=E6=B8=85=E5=8D=95=E7=94=B1Dockerfile=E7=AC=AC=E4=BA=8C?= =?UTF-8?q?=E6=AD=A5--no-deps=E5=8D=95=E7=8B=AC=E8=A3=85(=E7=9C=9F?= =?UTF-8?q?=E4=BE=9D=E8=B5=96bottleneck1.6.0/numpy/pandas/scipy=E4=B8=BB?= =?UTF-8?q?=E6=B8=85=E5=8D=95=E5=B7=B2=E9=92=89),peewee=3D=3D3.17.3+bottle?= =?UTF-8?q?neck=3D=3D1.6.0=E6=8C=89VPS=E7=94=9F=E4=BA=A7=E5=AE=9E=E8=AF=81?= =?UTF-8?q?=E9=92=89=E5=85=A5;lock=E5=90=8C=E6=AC=BE=E8=AD=A6=E5=91=8A?= =?UTF-8?q?=E6=B3=A8=E9=87=8A=20[nas]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker/Dockerfile | 6 +++++- requirements-docker.txt | 11 +++++++++-- requirements-lock.txt | 2 +- 3 files changed, 15 insertions(+), 4 deletions(-) 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