quant-platform/Dockerfile

15 lines
361 B
Docker

# Python 回测基础镜像
FROM python:3.11-slim
WORKDIR /app
# 安装依赖
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# 拷贝策略和测试脚本
COPY strategies/ ./strategies/
COPY tests/ ./tests/
# 默认执行回测脚本
CMD ["python", "tests/run_backtest.py", "--strategy", "./strategies", "--output", "/backtests"]