Merge pull request #256 from allenai/jakep/dockerfix

Cleanup for docker file
This commit is contained in:
Aman Rangapur 2025-06-23 14:47:36 -07:00 committed by GitHub
commit ecce181ab9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -47,19 +47,19 @@ RUN apt-get update -y && apt-get install -y --no-install-recommends \
unzip
ENV PYTHONUNBUFFERED=1
WORKDIR /root
COPY pyproject.toml pyproject.toml
COPY olmocr/version.py olmocr/version.py
# keep the build context clean
WORKDIR /build
COPY . /build
# Needed to resolve setuptools dependencies
ENV UV_INDEX_STRATEGY="unsafe-best-match"
RUN uv pip install --system --no-cache -e ".[gpu]" --extra-index-url https://download.pytorch.org/whl/cu128
RUN uv pip install --system --no-cache ".[gpu]" --extra-index-url https://download.pytorch.org/whl/cu128
RUN uv pip install --system https://download.pytorch.org/whl/cu128/flashinfer/flashinfer_python-0.2.5%2Bcu128torch2.7-cp38-abi3-linux_x86_64.whl
RUN uv pip install --system --no-cache ".[bench]"
RUN playwright install-deps
RUN playwright install chromium
COPY olmocr olmocr
COPY scripts scripts
RUN python3 -m olmocr.pipeline --help