Download Dockerfile from arnekm/crew: direct link, hf CLI and curl.
- Browser
- Download file 540 Bytes
-
https://huggingface.co/spaces/arnekm/crew/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/arnekm/crew/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/arnekm/crew/resolve/main/Dockerfile
540 Bytes
| FROM python:3.11-slim | |
| # HuggingFace Spaces 用 1000 UID | |
| RUN useradd -m -u 1000 user | |
| WORKDIR /app | |
| # Ensure the user owns the working directory | |
| RUN chown user:user /app | |
| # 安裝系統依賴 | |
| RUN apt-get update && apt-get install -y \ | |
| gcc g++ curl \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # 安裝 Python 依賴 | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # 複製程式碼 | |
| COPY --chown=user:user . . | |
| USER user | |
| EXPOSE 7860 | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "1"] |