Spaces:
Sleeping
Sleeping
Download Dockerfile from Pankaj10346/Predii-RAG-Assignment: direct link, hf CLI and curl.
- Browser
- Download file 770 Bytes
-
https://huggingface.co/spaces/Pankaj10346/Predii-RAG-Assignment/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Pankaj10346/Predii-RAG-Assignment/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Pankaj10346/Predii-RAG-Assignment/resolve/main/Dockerfile
770 Bytes
| # Use Python 3.10 slim image | |
| FROM python:3.10-slim | |
| # Set working directory | |
| WORKDIR /app | |
| # Set environment variables | |
| ENV PYTHONUNBUFFERED=1 \ | |
| PYTHONDONTWRITEBYTECODE=1 \ | |
| PIP_NO_CACHE_DIR=1 | |
| # Install system dependencies | |
| RUN apt-get update && apt-get install -y \ | |
| build-essential \ | |
| curl \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Copy requirements and install dependencies | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy application code | |
| COPY . . | |
| # Create necessary directories | |
| RUN mkdir -p chroma_db chunks | |
| # Expose port | |
| EXPOSE 7860 | |
| # Health check | |
| HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \ | |
| CMD curl -f http://localhost:7860/ || exit 1 | |
| # Run the application | |
| CMD ["python", "app.py"] | |