#!/bin/bash
#SBATCH -A p32852
#SBATCH -p gengpu
#SBATCH --gres=gpu:a100:1
#SBATCH --nodes=2
#SBATCH --ntasks-per-node=1
#SBATCH --time=24:00:00
#SBATCH --mem=64G
#SBATCH --cpus-per-task=4
#SBATCH --job-name=SLR_OCR 
#SBATCH --output=slr_ocr_logs.log
#SBATCH --mail-type=BEGIN,END,FAIL
#SBATCH --mail-user=gaughan@u.northwestern.edu

echo "setting up the environment"

module purge
eval "$(conda shell.bash hook)"
conda activate olmocr

echo "running the pdf to json ocr conversion"

python -m olmocr.pipeline ./studies_json --pdfs ./studies_pdf/*.pdf

echo "job finished, cleaning up"

conda deactivate

echo "job pau at: $(date)"
