Download Dockerfile from Tianluhua/api-proxy: direct link, hf CLI and curl.
- Browser
- Download file 386 Bytes
-
https://huggingface.co/spaces/Tianluhua/api-proxy/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Tianluhua/api-proxy/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Tianluhua/api-proxy/resolve/main/Dockerfile
386 Bytes
| FROM python:3.9-slim | |
| WORKDIR /app | |
| # 复制依赖文件并安装 | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # 复制应用代码 | |
| COPY app.py config.py ./ | |
| # 暴露 Hugging Face Space 默认端口 | |
| EXPOSE 7860 | |
| # 使用 gunicorn 启动 Flask 应用(更稳定) | |
| CMD ["gunicorn", "--bind", "0.0.0.0:7860", "--timeout", "90", "--workers", "2", "app:app"] |