Spaces:
Sleeping
Sleeping
Download Dockerfile from Serena2026/qlib-quant-platform: direct link, hf CLI and curl.
- Browser
- Download file 619 Bytes
-
https://huggingface.co/spaces/Serena2026/qlib-quant-platform/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Serena2026/qlib-quant-platform/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Serena2026/qlib-quant-platform/resolve/main/Dockerfile
619 Bytes
| # Qlib 量化平台 - Hugging Face Spaces Docker 镜像 | |
| FROM python:3.10-slim | |
| # 设置工作目录 | |
| WORKDIR /app | |
| # 安装系统依赖 | |
| RUN apt-get update && apt-get install -y \ | |
| gcc \ | |
| g++ \ | |
| git \ | |
| curl \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # 复制依赖文件 | |
| COPY requirements.txt . | |
| # 安装 Python 依赖 | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # 复制应用代码 | |
| COPY . . | |
| # 创建数据目录 | |
| RUN mkdir -p /root/.qlib/qlib_data | |
| # 设置启动脚本权限 | |
| RUN chmod +x start.sh | |
| # 暴露端口(Hugging Face Spaces 使用 7860) | |
| EXPOSE 7860 | |
| # 启动命令 | |
| CMD ["bash", "start.sh"] | |