Spaces:
Paused
Paused
Download Dockerfile from Parsa2025AI/R2GenDev: direct link, hf CLI and curl.
- Browser
- Download file 615 Bytes
-
https://huggingface.co/spaces/Parsa2025AI/R2GenDev/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Parsa2025AI/R2GenDev/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Parsa2025AI/R2GenDev/resolve/main/Dockerfile
615 Bytes
| # Use a small CUDA image if you plan to request GPU; CPU also works. | |
| FROM python:3.11-slim | |
| # Create non-root user (required by Spaces Docker) and prepare workdir | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV HOME=/home/user PATH=/home/user/.local/bin:$PATH | |
| WORKDIR $HOME/app | |
| # Copy files | |
| COPY --chown=user requirements.txt ./ | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| COPY --chown=user app.py ./ | |
| # Spaces expects your app to listen on port 7860 unless overridden in README yaml | |
| ENV PORT=7860 | |
| EXPOSE 7860 | |
| # Run FastAPI | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] | |