Spaces:
Paused
Paused
Download Dockerfile from dan92/notdiamond2api2: direct link, hf CLI and curl.
- Browser
- Download file 538 Bytes
-
https://huggingface.co/spaces/dan92/notdiamond2api2/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/dan92/notdiamond2api2/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/dan92/notdiamond2api2/resolve/main/Dockerfile
538 Bytes
| FROM python:3.9-slim | |
| # 设置工作目录 | |
| WORKDIR /app | |
| # 复制依赖文件 | |
| COPY requirements.txt . | |
| # 安装 gunicorn 和其他依赖 | |
| RUN pip install --upgrade pip && \ | |
| pip install --no-cache-dir -r requirements.txt gunicorn | |
| # 复制应用程序文件 | |
| COPY app.py . | |
| COPY register_bot.py . | |
| # 设置环境变量 | |
| ENV FLASK_APP=app.py | |
| ENV FLASK_ENV=production | |
| ENV PYTHONUNBUFFERED=1 | |
| # 暴露端口 | |
| EXPOSE 3000 | |
| # 使用 gunicorn 作为生产级 WSGI 服务器 | |
| CMD ["gunicorn", "--bind", "0.0.0.0:3000", "--workers", "4", "app:app"] | |