moves what happens where around a bit and updates readme

This commit is contained in:
Chris Wilhelm 2025-03-13 15:31:13 -07:00
parent 098b01c006
commit 9b958e65f1
4 changed files with 15 additions and 8 deletions

View File

@ -109,6 +109,9 @@ jobs:
name: GPU CI
runs-on: ubuntu-latest
timeout-minutes: 15
# TODO: @jakep
# once you fix the base checks, uncomment the following line for expense reasons
# needs: [checks]
env:
BEAKER_TOKEN: ${{ secrets.BEAKER_TOKEN }}
BEAKER_IMAGE: chrisw/olmocr-gpu-ci

View File

@ -56,13 +56,12 @@ conda activate olmocr
git clone https://github.com/allenai/olmocr.git
cd olmocr
pip install -e .
```
Install sglang with [flashinfer](https://github.com/flashinfer-ai/flashinfer) if you want to run inference on GPU.
```bash
pip install sgl-kernel==0.0.3.post1 --force-reinstall --no-deps
pip install "sglang[all]==0.4.2" --find-links https://flashinfer.ai/whl/cu124/torch2.4/flashinfer/
# If running on CPU, run this:
pip install -e .
# If running on GPU, run this instead:
pip install -e .[gpu] --find-links https://flashinfer.ai/whl/cu124/torch2.4/flashinfer/
```
### Local Usage Example

View File

@ -9,8 +9,7 @@ git clone https://github.com/allenai/olmocr.git olmocr \
.[gpu] \
pytest \
--find-links https://flashinfer.ai/whl/cu124/torch2.4/flashinfer/ \
&& python -m olmocr.pipeline ./localworkspace --pdfs tests/gnarly_pdfs/*.pdf \
&& pytest tests/gnarly_pdfs/test_gnarly_pdfs.py
&& bash tests/gnarly_pdfs/test_gnarly_pdfs.sh

View File

@ -0,0 +1,6 @@
#/usr/bin/bash
set -ex
python -m olmocr.pipeline ./localworkspace --pdfs tests/gnarly_pdfs/*.pdf \
&& pytest tests/gnarly_pdfs/test_gnarly_pdfs.py