Spaces:
Sleeping
Sleeping
Download Dockerfile from kodetr/scriptai-backend: direct link, hf CLI and curl.
- Browser
- Download file 702 Bytes
-
https://huggingface.co/spaces/kodetr/scriptai-backend/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/kodetr/scriptai-backend/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/kodetr/scriptai-backend/resolve/main/Dockerfile
702 Bytes
| FROM python:3.11-slim | |
| ENV PYTHONDONTWRITEBYTECODE=1 \ | |
| PYTHONUNBUFFERED=1 \ | |
| PIP_NO_CACHE_DIR=1 | |
| WORKDIR /app | |
| # System deps: | |
| # - tesseract-ocr: OCR engine for pytesseract | |
| # - poppler-utils: needed by pdf2image (pdftoppm/pdftocairo) | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| tesseract-ocr \ | |
| tesseract-ocr-ind \ | |
| tesseract-ocr-eng \ | |
| poppler-utils \ | |
| && rm -rf /var/lib/apt/lists/* | |
| COPY requirements.txt . | |
| RUN pip install --upgrade pip && pip install -r requirements.txt | |
| COPY . . | |
| EXPOSE 7860 | |
| # Optional auth token for API requests: | |
| # -e PYTHON_EXTRACTOR_TOKEN=your_token | |
| CMD ["sh", "-c", "uvicorn api_server:app --host 0.0.0.0 --port ${PORT:-7860}"] | |