Spaces:
Sleeping
Sleeping
Download Dockerfile from paperplane22/Notiproxy: direct link, hf CLI and curl.
- Browser
- Download file 834 Bytes
-
https://huggingface.co/spaces/paperplane22/Notiproxy/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/paperplane22/Notiproxy/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/paperplane22/Notiproxy/resolve/main/Dockerfile
834 Bytes
| # ==================================================================== | |
| # Dockerfile for inception-2api (v4.0 - Cloudscraper Edition) | |
| # ==================================================================== | |
| FROM python:3.10-slim | |
| # 设置环境变量 | |
| ENV PYTHONDONTWRITEBYTECODE=1 | |
| ENV PYTHONUNBUFFERED=1 | |
| WORKDIR /app | |
| # 安装 Python 依赖 | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir --upgrade pip && \ | |
| pip install --no-cache-dir -r requirements.txt | |
| # 复制应用代码 | |
| COPY . . | |
| # 创建并切换到非 root 用户 | |
| RUN useradd --create-home appuser && \ | |
| chown -R appuser:appuser /app | |
| USER appuser | |
| # 暴露端口并启动(Hugging Face Spaces 要求监听 $PORT,默认 7860) | |
| EXPOSE 7860 | |
| CMD ["sh", "-c", "uvicorn main:app --host 0.0.0.0 --port ${PORT:-7860} --workers ${WORKERS:-1}"] | |