Download Dockerfile from samlax12/agent: direct link, hf CLI and curl.
- Browser
- Download file 614 Bytes
-
https://huggingface.co/spaces/samlax12/agent/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/samlax12/agent/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/samlax12/agent/resolve/main/Dockerfile
614 Bytes
| FROM python:3.10-slim | |
| WORKDIR /app | |
| # 安装系统依赖 | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| build-essential \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # 安装 Python 依赖 | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # 复制应用代码 | |
| COPY . . | |
| # 确保目录存在(/data 为 HF Spaces 持久存储) | |
| RUN mkdir -p static /data/agents /data/uploads | |
| ENV DATA_DIR=/data | |
| EXPOSE 7860 | |
| # 使用 gunicorn 运行,支持 SSE 流式输出 | |
| CMD ["gunicorn", "--bind", "0.0.0.0:7860", "--workers", "2", "--threads", "4", "--timeout", "120", "app:app"] | |