4317d97fb0
NAS容器跑sanguo_portfolio.runner_backtest依赖bullet_trade,此前容器内临时pip install装在writable layer(重建即丢);补进Dockerfile永久,镜像重建功能不失效。
12 lines
542 B
Docker
12 lines
542 B
Docker
# NAS 测试镜像:复用现成 with-backtester 环境,补 pytest
|
|
# with-backtester 已含 py3.10/pandas2.3.3/numpy2.2.6/TA-Lib0.6.8/pyarrow/polars + vnpy源码
|
|
# 只缺 pytest,此处薄层补齐。代码通过 docker run -v 挂载(不 bake 进镜像,便于代码更新)
|
|
FROM sanguo_vnpy_v2:with-backtester
|
|
|
|
RUN pip install --no-cache-dir -q -i https://pypi.tuna.tsinghua.edu.cn/simple \
|
|
pytest==9.1.1 pytest-asyncio==1.4.0 pytest-mock==3.15.1 \
|
|
akshare==1.18.64 baostock==0.9.3 scipy==1.15.3 \
|
|
bullet-trade==0.9.2
|
|
|
|
WORKDIR /code
|