Spaces:
Configuration error
Configuration error
Download Dockerfile from serety95/axis-numeric: direct link, hf CLI and curl.
- Browser
- Download file 1.11 kB
-
https://huggingface.co/spaces/serety95/axis-numeric/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/serety95/axis-numeric/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/serety95/axis-numeric/resolve/main/Dockerfile
1.11 kB
| # Numeric inference for a Hugging Face Docker Space. Build context = Space repo root, which | |
| # push-space.sh assembles from apps/numeric-inference (pyproject.toml, axis_numeric/, models/). | |
| FROM python:3.11-slim | |
| RUN apt-get update && apt-get install -y --no-install-recommends tesseract-ocr tesseract-ocr-ara \ | |
| && rm -rf /var/lib/apt/lists/* \ | |
| && useradd -m -u 1000 user | |
| USER user | |
| ENV HOME=/home/user PATH=/home/user/.local/bin:$PATH PYTHONUNBUFFERED=1 PIP_NO_CACHE_DIR=1 \ | |
| AXIS_BIND_HOST=0.0.0.0 AXIS_HTTP_PORT=8081 AXIS_HTTP_CONCURRENCY=2 \ | |
| OMP_NUM_THREADS=1 OPENBLAS_NUM_THREADS=1 AXIS_ORT_INTRA_OP=2 \ | |
| AXIS_NUMERIC_TESSERACT=1 \ | |
| AXIS_NUMERIC_MODEL_PATH=/home/user/app/models/numeric-sequence.onnx \ | |
| AXIS_NUMERIC_CALIBRATION_PATH=/home/user/app/models/numeric-sequence.calibration.json | |
| WORKDIR /home/user/app | |
| COPY --chown=user pyproject.toml ./ | |
| COPY --chown=user axis_numeric ./axis_numeric | |
| COPY --chown=user models ./models | |
| RUN python -m pip install --user '.[inference,tesseract]' 'uvicorn[standard]' | |
| EXPOSE 8081 | |
| CMD ["python", "-m", "axis_numeric.serve"] | |