Download Dockerfile from zeroday01/ipl_prediction_engine: direct link, hf CLI and curl.
- Browser
- Download file 881 Bytes
-
https://huggingface.co/zeroday01/ipl_prediction_engine/resolve/main/Dockerfile
- Command line
-
hf download hf://zeroday01/ipl_prediction_engine/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/zeroday01/ipl_prediction_engine/resolve/main/Dockerfile
881 Bytes
| FROM python:3.12-slim | |
| # Set environment variables | |
| ENV PYTHONDONTWRITEBYTECODE=1 | |
| ENV PYTHONUNBUFFERED=1 | |
| ENV DEBIAN_FRONTEND=noninteractive | |
| # Set working directory | |
| WORKDIR /app | |
| # Install system dependencies | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| build-essential \ | |
| libgomp1 \ | |
| curl \ | |
| && apt-get clean && rm -rf /var/lib/apt/lists/* | |
| # Copy requirements and install dependencies | |
| COPY backend/requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy the entire project | |
| COPY . . | |
| # Set PYTHONPATH to include the project root | |
| ENV PYTHONPATH=/app | |
| # Health check | |
| HEALTHCHECK --interval=30s --timeout=10s --retries=3 \ | |
| CMD curl -f http://localhost:7860/health || exit 1 | |
| # Expose the API port | |
| EXPOSE 7860 | |
| # Command to run the API server | |
| CMD ["uvicorn", "backend.api_server:app", "--host", "0.0.0.0", "--port", "7860"] | |