olmocr/scripts/beaker/gpu-ci-script.sh

17 lines
424 B
Bash
Raw Normal View History

2025-03-13 14:10:55 -07:00
#/usr/bin/bash
2025-03-13 13:05:09 -07:00
set -ex
2025-03-13 14:10:55 -07:00
git clone https://github.com/allenai/olmocr.git olmocr \
2025-03-13 13:05:09 -07:00
&& cd olmocr \
&& git checkout $GIT_REVISION \
2025-03-13 14:10:55 -07:00
&& /root/.local/bin/uv pip install --system --no-cache \
.[gpu] \
pytest \
--find-links https://flashinfer.ai/whl/cu124/torch2.4/flashinfer/ \
2025-03-13 14:42:24 -07:00
&& python -m olmocr.pipeline ./localworkspace --pdfs tests/gnarly_pdfs/*.pdf \
&& pytest tests/gnarly_pdfs/test_gnarly_pdfs.py
2025-03-13 13:05:09 -07:00