olmocr Docker & Self-Hosted Deployment

GitHub

Toolkit for linearizing PDFs for LLM datasets/training

19,796 stars Python Python 6 files ยท ~11,220 tokens
1. Pull Image (DOCKERHUB) docker pull allenai/olmocr:latest
2. Docker Run (1-Click Launch) docker run -d --name olmocr --restart always allenai/olmocr:latest
3. Podman Run podman run -d --name olmocr --restart always allenai/olmocr:latest
4. Skopeo Inspect (Zero-Pull Manifest) skopeo inspect docker://docker.io/allenai/olmocr:latest
5. ORAS Pull (OCI Artifact) oras pull allenai/olmocr:latest
scripts/beaker/Dockerfile-gpu-ci
FROM --platform=linux/amd64 nvidia/cuda:11.8.0-cudnn8-runtime-ubuntu20.04

RUN apt-get update -y && apt-get install -y software-properties-common \
    && add-apt-repository ppa:deadsnakes/ppa \
    && apt-get -y update

# Install requirements specific to pdfs
RUN apt-get update && apt-get -y install python3-apt
RUN echo "ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true" | debconf-set-selections
RUN apt-get update -y && apt-get install -y poppler-utils ttf-mscorefonts-installer msttcorefonts fonts-crosextra-caladea fonts-crosextra-carlito gsfonts lcdf-typetools

RUN apt-get update -y && apt-get install -y --no-install-recommends \
    git \
    python3.11 \
    python3.11-dev \
    python3.11-distutils \
    ca-certificates \
    build-essential \
    curl \
    unzip

RUN rm -rf /var/lib/apt/lists/* \
    && unlink /usr/bin/python3 \
    && ln -s /usr/bin/python3.11 /usr/bin/python3 \
    && ln -s /usr/bin/python3 /usr/bin/python \
    && curl -sS https://bootstrap.pypa.io/get-pip.py | python \
    && pip3 install -U pip

RUN apt-get update && apt-get -y install python3.11-venv
ADD --chmod=755 https://astral.sh/uv/install.sh /install.sh
RUN /install.sh && rm /install.sh


WORKDIR /root
COPY gpu-ci-script.sh .

ENV PYTHONUNBUFFERED=1