diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ffa88ad..2a52a18 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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 diff --git a/README.md b/README.md index 6f95e4e..e01b4cd 100644 --- a/README.md +++ b/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 diff --git a/scripts/beaker/gpu-ci-script.sh b/scripts/beaker/gpu-ci-script.sh index 3d89681..bc216fb 100755 --- a/scripts/beaker/gpu-ci-script.sh +++ b/scripts/beaker/gpu-ci-script.sh @@ -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 diff --git a/tests/gnarly_pdfs/test_gnarly_pdfs.sh b/tests/gnarly_pdfs/test_gnarly_pdfs.sh new file mode 100644 index 0000000..baa50d1 --- /dev/null +++ b/tests/gnarly_pdfs/test_gnarly_pdfs.sh @@ -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