fix(docker): requirements-docker全量==钉版对齐requirements-lock——根治>=浮动致容器系统性偏新(TA-Lib0.7.1/empyrical-reloaded0.5.9+遗留empyrical0.5.5双装/pyarrow25/fastapi0.141/lightgbm4.7/torch2.13 vs lock 0.6.8/0.5.12/24.0.0/0.139.0/4.6.0/2.12.1),消除'NAS绿≠VPS版本'等价性窗口;empyrical>=0.5.5换empyrical-reloaded==0.5.12根治双装;容器专属差异保留(无akshare采集在VPS/无pytest跑在Mac runner/polars[rtcompat]防NAS无AVX2 SIGILL);文件头注明版本源=lock需同步 [nas]
CI/CD / test (push) Successful in 14s
CI/CD / nas-deploy (push) Successful in 32s
CI/CD / nas-verify (push) Successful in 12s

This commit is contained in:
2026-08-15 08:02:17 +08:00
parent a45ab3086d
commit 75454a7f55
+61 -68
View File
@@ -1,26 +1,36 @@
# Sanguo VeighNa Docker 依赖
# Sanguo VeighNa Docker 依赖NAS 容器)
# 基于 VeighNa 4.4.0,添加 Web 服务所需依赖
#
# ⚠️ 版本源 = requirements-lock.txt(三机统一锁文件,VPS 生产快照=权威基线)。
# 本文件 = lock 的容器子集,全部 == 钉版;lock bump 时必须同步本文件。
# 容器专属差异(相对 lock 按设计省略):
# - akshare:日线采集在 VPS,不在容器
# - pytest/pytest-asyncioCI 在 Mac runner 跑,不在容器
# 2026-08-15 钉版根治:原 >= 浮动致容器系统性偏新
# TA-Lib0.7.1/empyrical双装/pyarrow25 vs lock 0.6.8/0.5.12/24.0.0),
# 产生「NAS 绿 ≠ VPS 版本」的等价性窗口。
# ============================================
# VeighNa 核心依赖
# ============================================
tzlocal>=5.3.1
tzlocal==5.4.4
PySide6==6.8.2.1
pyqtgraph>=0.13.7
qdarkstyle>=3.2.3
numpy>=2.2.3
pandas>=2.2.3
ta-lib>=0.6.4
deap>=1.4.2
pyzmq>=26.3.0
plotly>=6.0.0
tqdm>=4.67.1
loguru>=0.7.3
nbformat>=5.10.4
requests>=2.32.0
qrcode>=7.4.2
pyqtgraph==0.14.0
qdarkstyle==3.2.3
numpy==2.2.6
pandas==2.3.3
TA-Lib==0.6.8
deap==1.4.4
pyzmq==27.1.0
plotly==6.8.0
tqdm==4.68.3
loguru==0.7.3
nbformat==5.10.4
requests==2.34.2
qrcode==8.2
PyYAML==6.0.3
# VeighNa 策略/数据库扩展(项目必需,非可选)
# vnpy 策略/数据库扩展(项目必需,非可选)
# vnpy_ctastrategy: CTA 策略引擎(sanguo_backtest/cta_engine·cta_optimizer·ashare_engine, sanguo_live 等广用)
# vnpy_sqlite: vnpy sqlite 数据库驱动(vnpy trader/database.py 运行时动态加载,缺则 vnpy 无法持久化)
vnpy_ctastrategy==1.4.1
@@ -35,75 +45,58 @@ vnpy_sqlite==1.1.3
bullet-trade==0.9.2
jqdatasdk==1.9.8
# VeighNa Gateway 扩展(可选,根据需要安装)
# 注意:这些是独立的扩展包,未安装时不影响核心功能
# vnpy_ctp
# vnpy_ib
# vnpy_okx
# vnpy_binance
# ============================================
# Web 服务依赖
# ============================================
# FastAPI 核心
fastapi>=0.100.0
uvicorn[standard]>=0.23.0
python-multipart>=0.0.6
fastapi==0.139.0
starlette==1.3.1
uvicorn[standard]==0.49.0
python-multipart==0.0.32
python-dotenv==1.2.2
# WebSocket 支持
websockets>=12.0
websockets==16.0
# 数据验证
pydantic>=2.0.0
pydantic-settings>=2.0.0
pydantic==2.13.4
pydantic-settings==2.14.2
# 认证授权
PyJWT>=2.8.0
python-jose[cryptography]>=3.3.0
passlib[bcrypt]>=1.7.4
python-multipart>=0.0.6
PyJWT==2.13.0
python-jose[cryptography]==3.5.0
passlib==1.7.4
bcrypt==5.0.0
# 数据库
sqlalchemy>=2.0.0
alembic>=1.12.0
# SQLite 是 Python 内置的
# PostgreSQL 支持(可选)
# psycopg2-binary>=2.9.0
SQLAlchemy==2.0.51
alembic==1.18.5
# Redis 客户端
redis>=5.0.0
aioredis>=2.0.0
redis==8.0.1
aioredis==2.0.1
# ============================================
# Alpha 量化依赖(可选)
# Alpha 量化依赖
# ============================================
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.2
alphalens-reloaded>=0.4.5
scikit-learn>=1.6.1
lightgbm>=4.6.0
torch>=2.6.0
pyarrow>=19.0.1
empyrical>=0.5.5
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
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
statsmodels==0.14.6
matplotlib==3.10.9
seaborn==0.13.2
# ============================================
# 工具和监控
# ============================================
# HTTP 客户端
httpx>=0.25.0
httpx==0.28.1
# 任务调度
apscheduler>=3.10.0
APScheduler==3.11.3
# 监控和日志
prometheus-client>=0.19.0
structlog>=23.0.0
prometheus-client==0.25.0
structlog==26.1.0
# ============================================
# 开发工具(生产环境可选
# 数据层(容器内需要的部分
# ============================================
# pytest>=7.0.0
# pytest-cov>=4.0.0
# ruff>=0.1.0
# mypy>=1.5.0
baostock
baostock==0.9.3