Spaces:
Sleeping
Sleeping
Download Dockerfile from vamsi1103/flask-ocr-api: direct link, hf CLI and curl.
- Browser
- Download file 746 Bytes
-
https://huggingface.co/spaces/vamsi1103/flask-ocr-api/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/vamsi1103/flask-ocr-api/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/vamsi1103/flask-ocr-api/resolve/main/Dockerfile
746 Bytes
| FROM python:3.10-slim | |
| WORKDIR /app | |
| # Install system dependencies for OpenCV and PDF reading | |
| RUN apt-get update && apt-get install -y \ | |
| libgl1 \ | |
| libglib2.0-0 \ | |
| libsm6 \ | |
| libxrender1 \ | |
| libxext6 \ | |
| poppler-utils \ | |
| libgomp1 \ | |
| && apt-get clean \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Copy requirements from the CURRENT directory | |
| COPY requirements.txt /app/requirements.txt | |
| RUN pip install --no-cache-dir -r /app/requirements.txt | |
| # Copy everything from the CURRENT directory into /app | |
| COPY . /app/ | |
| EXPOSE 7860 | |
| # We use uvicorn with the factory pattern to avoid the 'app.py' vs 'app/' folder conflict | |
| CMD ["uvicorn", "app:create_app", "--factory", "--host", "0.0.0.0", "--port", "7860", "--timeout-keep-alive", "300"] | |