Spaces:
Sleeping
Sleeping
Download Dockerfile from Sudhansh26/ocr-fastapi: direct link, hf CLI and curl.
- Browser
- Download file 620 Bytes
-
https://huggingface.co/spaces/Sudhansh26/ocr-fastapi/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Sudhansh26/ocr-fastapi/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Sudhansh26/ocr-fastapi/resolve/main/Dockerfile
620 Bytes
| # Lightweight Python 3.10.11-slim | |
| FROM python:3.10.11-slim | |
| # Set working directory | |
| WORKDIR /app | |
| # Install system dependencies | |
| RUN apt-get update && apt-get install -y \ | |
| tesseract-ocr \ | |
| tesseract-ocr-hin \ | |
| poppler-utils \ | |
| libgl1 \ | |
| libglib2.0-0 \ | |
| && apt-get clean \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Copy Python dependencies | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir --upgrade pip | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy application code | |
| COPY . . | |
| # Expose port 7860 | |
| EXPOSE 7860 | |
| # Run FastAPI | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] | |