Spaces:
Sleeping
Sleeping
Download Dockerfile from DavidRambeau/bloc3_Flask: direct link, hf CLI and curl.
- Browser
- Download file 643 Bytes
-
https://huggingface.co/spaces/DavidRambeau/bloc3_Flask/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/DavidRambeau/bloc3_Flask/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/DavidRambeau/bloc3_Flask/resolve/main/Dockerfile
643 Bytes
| FROM python:3.11-slim | |
| WORKDIR /app | |
| # Install system dependencies | |
| RUN apt-get update && apt-get install -y \ | |
| gcc \ | |
| postgresql-client \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Copy requirements first for better caching | |
| COPY requirements.txt . | |
| # Install Python dependencies | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy application files | |
| COPY app.py . | |
| COPY templates templates/ | |
| # Expose port | |
| EXPOSE 7860 | |
| # Health check | |
| HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \ | |
| CMD python -c "import requests; requests.get('http://localhost:7860/health')" | |
| # Run the application | |
| CMD ["python", "app.py"] | |