Spaces:
Running
Running
Download Dockerfile from free-apis-collection/markitdown: direct link, hf CLI and curl.
- Browser
- Download file 1.07 kB
-
https://huggingface.co/spaces/free-apis-collection/markitdown/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/free-apis-collection/markitdown/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/free-apis-collection/markitdown/resolve/main/Dockerfile
1.07 kB
| # ChatCsv&Pdf-Backend | |
| FROM python:3.11-slim AS builder | |
| ENV PIP_DEFAULT_TIMEOUT=120 \ | |
| PIP_RETRIES=5 \ | |
| PIP_NO_CACHE_DIR=1 \ | |
| PIP_DISABLE_PIP_VERSION_CHECK=1 | |
| WORKDIR /build | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir --prefix=/install \ | |
| --timeout=120 --retries=5 \ | |
| -r requirements.txt | |
| FROM python:3.11-slim AS runtime | |
| ENV PYTHONUNBUFFERED=1 \ | |
| PYTHONDONTWRITEBYTECODE=1 \ | |
| PIP_NO_CACHE_DIR=1 \ | |
| PIP_DISABLE_PIP_VERSION_CHECK=1 \ | |
| HF_HUB_DISABLE_SYMLINKS_WARNING=1 | |
| WORKDIR /app | |
| # Runtime deps needed by some parsing libs (+ curl for HEALTHCHECK) | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| build-essential \ | |
| curl \ | |
| libgomp1 \ | |
| && rm -rf /var/lib/apt/lists/* | |
| COPY --from=builder /install /usr/local | |
| COPY . . | |
| EXPOSE 7860 | |
| RUN mkdir -p /app/storage && chmod +x /app/start.sh | |
| HEALTHCHECK --interval=30s --timeout=10s --start-period=30s --retries=3 \ | |
| CMD python -c "import urllib.request; urllib.request.urlopen('http://localhost:7860/ping')" || exit 1 | |
| CMD ["/bin/bash", "/app/start.sh"] |