Download Dockerfile from quickbin/hfdeploy: direct link, hf CLI and curl.
- Browser
- Download file 519 Bytes
-
https://huggingface.co/spaces/quickbin/hfdeploy/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/quickbin/hfdeploy/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/quickbin/hfdeploy/resolve/main/Dockerfile
519 Bytes
| # 使用Python 3.11作为基础镜像 | |
| FROM python:3.11-slim | |
| # 设置工作目录 | |
| WORKDIR /app | |
| ENV PYTHONDONTWRITEBYTECODE=1 | |
| ENV PYTHONUNBUFFERED=1 | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| git \ | |
| && apt-get clean \ | |
| && rm -rf /var/lib/apt/lists/* | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| COPY . . | |
| RUN adduser --disabled-password --gecos "" appuser | |
| USER appuser | |
| EXPOSE 7860 | |
| # 启动应用 | |
| CMD ["python", "main.py"] | |