Download Dockerfile from MFF212/test1: direct link, hf CLI and curl.
- Browser
- Download file 559 Bytes
-
https://huggingface.co/spaces/MFF212/test1/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/MFF212/test1/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/MFF212/test1/resolve/main/Dockerfile
559 Bytes
| # Hugging Face Spaces Docker SDK | |
| FROM python:3.11-slim | |
| # Create non-root user | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| # Set PATH for uv | |
| ENV PATH="/home/user/.local/bin:$PATH" | |
| # Set working directory | |
| WORKDIR /app | |
| # Install uv | |
| RUN pip install --no-cache-dir uv | |
| # Copy dependency files first (better caching) | |
| COPY --chown=user pyproject.toml uv.lock* ./ | |
| # Sync dependencies | |
| RUN uv sync | |
| # Copy the rest of the app | |
| COPY --chown=user . . | |
| # ✅ START FASTAPI (THIS IS THE KEY FIX) | |
| CMD ["uv", "run", "uvicorn", "bot:app", "--host", "0.0.0.0", "--port", "7860"] | |