Download Dockerfile from BilalCode/TaskFlow: direct link, hf CLI and curl.
- Browser
- Download file 873 Bytes
-
https://huggingface.co/spaces/BilalCode/TaskFlow/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/BilalCode/TaskFlow/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/BilalCode/TaskFlow/resolve/main/Dockerfile
873 Bytes
| # Backend Dockerfile | |
| FROM python:3.11-slim | |
| # Working directory set karein | |
| WORKDIR /app | |
| # System dependencies | |
| RUN apt-get update && apt-get install -y \ | |
| gcc \ | |
| postgresql-client \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Requirements copy aur install karein | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Baaki saara code copy karein | |
| COPY . . | |
| # Hugging Face ke liye Permissions (User 1000) | |
| RUN useradd -m -u 1000 appuser && chown -R appuser:appuser /app | |
| USER appuser | |
| # Hugging Face ke liye PORT 7860 lazmi hai | |
| EXPOSE 7860 | |
| # Health check (Port 7860 ke saath) | |
| HEALTHCHECK --interval=30s --timeout=10s --start-period=40s --retries=3 \ | |
| CMD python -c "import requests; requests.get('http://localhost:7860/health')" | |
| # Run application (Yahan main:app check karlein) | |
| CMD ["uvicorn", "src.main:app", "--host", "0.0.0.0", "--port", "7860"] |