Spaces:
Paused
Paused
Download Dockerfile from qa1145/astrbot_help: direct link, hf CLI and curl.
- Browser
- Download file 631 Bytes
-
https://huggingface.co/spaces/qa1145/astrbot_help/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/qa1145/astrbot_help/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/qa1145/astrbot_help/resolve/main/Dockerfile
631 Bytes
| # Read Agent 容器镜像 | |
| FROM python:3.11-slim | |
| # 设置工作目录 | |
| WORKDIR /app | |
| # 设置环境变量 | |
| ENV PYTHONDONTWRITEBYTECODE=1 | |
| ENV PYTHONUNBUFFERED=1 | |
| ENV PORT=7860 | |
| # 安装系统依赖 | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| curl \ | |
| git \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # 复制依赖文件并安装 | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # 复制应用代码 | |
| COPY . . | |
| # 创建代码目录 | |
| RUN mkdir -p /app/code | |
| # 暴露端口 | |
| EXPOSE 7860 | |
| # 启动命令 - 使用 Flask 内置服务器 | |
| CMD ["python", "app.py"] | |