mirror of
https://github.com/allenai/olmocr.git
synced 2025-08-31 12:25:54 +00:00
moves what happens where around a bit and updates readme
This commit is contained in:
parent
098b01c006
commit
9b958e65f1
3
.github/workflows/main.yml
vendored
3
.github/workflows/main.yml
vendored
@ -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
|
||||
|
11
README.md
11
README.md
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
||||
|
6
tests/gnarly_pdfs/test_gnarly_pdfs.sh
Normal file
6
tests/gnarly_pdfs/test_gnarly_pdfs.sh
Normal 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
|
Loading…
x
Reference in New Issue
Block a user