Download Dockerfile_backend from GodRad/rag_saas: direct link, hf CLI and curl.
- Browser
- Download file 752 Bytes
-
https://huggingface.co/spaces/GodRad/rag_saas/resolve/main/Dockerfile_backend
- Command line
-
hf download hf://spaces/GodRad/rag_saas/Dockerfile_backend
-
curl -L -o Dockerfile_backend https://huggingface.co/spaces/GodRad/rag_saas/resolve/main/Dockerfile_backend
752 Bytes
| FROM python:3.11-slim | |
| # Set environment variables | |
| ENV PYTHONUNBUFFERED=1 \ | |
| PYTHONDONTWRITEBYTECODE=1 \ | |
| PORT=7860 | |
| # Create user and set permissions (HF expectation) | |
| RUN useradd -m -u 1000 user | |
| WORKDIR /app | |
| # Install system dependencies | |
| RUN apt-get update && apt-get install -y \ | |
| build-essential \ | |
| curl \ | |
| software-properties-common \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Copy requirements and install | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy app code | |
| COPY . . | |
| # Set permissions for user 1000 | |
| RUN chown -R 1000:1000 /app | |
| USER user | |
| # Expose port | |
| EXPOSE 7860 | |
| # Run entrypoint | |
| ENTRYPOINT ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"] | |