Spaces:
Sleeping
Sleeping
Download Dockerfile from FreedomIntelligence/S2S-Arena: direct link, hf CLI and curl.
- Browser
- Download file 577 Bytes
-
https://huggingface.co/spaces/FreedomIntelligence/S2S-Arena/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/FreedomIntelligence/S2S-Arena/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/FreedomIntelligence/S2S-Arena/resolve/main/Dockerfile
577 Bytes
| # 使用适合的基础镜像,例如 python:3.9-slim | |
| FROM python:3.9-slim | |
| # 设置工作目录 | |
| WORKDIR /app | |
| # 复制项目文件 | |
| COPY . /app | |
| COPY ./data /app/data | |
| COPY ./static /app/static | |
| COPY ./results /app/results | |
| COPY ./templates /app/templates | |
| ENV SESSION_FILE_DIR=/app/session_data | |
| RUN mkdir -p /app/session_data && chmod -R 777 /app/session_data | |
| # 安装依赖 | |
| RUN pip install -r requirements.txt | |
| # 暴露应用运行的端口 | |
| EXPOSE 7860 | |
| # 设置环境变量 | |
| ENV FLASK_APP=app.py | |
| # 运行 Flask 应用 | |
| CMD ["flask", "run", "--host=0.0.0.0", "--port=7860"] | |