Spaces:
Runtime error
Runtime error
Download Dockerfile from PavanKumarD/HackRX: direct link, hf CLI and curl.
- Browser
- Download file 788 Bytes
-
https://huggingface.co/spaces/PavanKumarD/HackRX/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/PavanKumarD/HackRX/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/PavanKumarD/HackRX/resolve/main/Dockerfile
788 Bytes
| # Use lightweight Python base | |
| FROM python:3.10-slim | |
| # Set environment variables | |
| ENV PYTHONDONTWRITEBYTECODE=1 | |
| ENV PYTHONUNBUFFERED=1 | |
| # Set working directory | |
| WORKDIR /code | |
| # Install dependencies | |
| COPY requirements.txt . | |
| RUN apt-get update && apt-get install -y \ | |
| build-essential \ | |
| libpoppler-cpp-dev \ | |
| pkg-config \ | |
| python3-dev \ | |
| curl \ | |
| git \ | |
| libgl1 \ | |
| && rm -rf /var/lib/apt/lists/* | |
| RUN pip install --upgrade pip | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy app files | |
| COPY app /code/app | |
| COPY models /code/models | |
| COPY .env /code/.env | |
| COPY app/main.py /code/app/main.py | |
| COPY app/backend.py /code/app/backend.py | |
| # Expose port for FastAPI | |
| EXPOSE 7860 | |
| # Run FastAPI server | |
| CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"] | |