turkic-ocr-code / scripts /r5_release /rc1_sums.sbatch
treoa's picture
Release 1
24aaa76
Raw History Blame Contribute Delete
1.23 kB
#!/bin/bash
#SBATCH --job-name=rc1_sums
#SBATCH --partition=ZEN4
#SBATCH --cpus-per-task=4
#SBATCH --mem=8G
#SBATCH --time=00:30:00
#SBATCH --output=/path/to/TURKIC_OCR_DATA/logs/%x_%j.out
# Release candidate 1: write SHA256SUMS into every package folder (sha256 of every file except SHA256SUMS itself, paths relative to the
# package folder) and a listing of all files with size and sha256 for the report. Nothing is uploaded.
set -u
D=/path/to/TURKIC_OCR_DATA
R=$D/release/rc1
W=$D/tmp/rc1_check
echo "job $SLURM_JOB_ID host $(hostname) start $(date -u +%Y-%m-%dT%H:%M:%SZ)"
mkdir -p $W
: > $W/files_listing.tsv
for pkg in turkic-ocr-paddleocr-vl-1.6 turkic-ocr-qwen3-vl-2b turkic-ocr-ppocrv6-medium turkic-line-detector-yolo11s page-pipeline; do
cd $R/$pkg
rm -f SHA256SUMS
: > $W/sums_$pkg.tmp
for f in $(find . -type f | sort); do
h=$(sha256sum "$f" | cut -d' ' -f1)
echo "$h $f" >> $W/sums_$pkg.tmp
printf '%s\t%s\t%s\t%s\n' "$pkg" "$(stat -c %s "$f")" "$h" "$f" >> $W/files_listing.tsv
done
cp $W/sums_$pkg.tmp SHA256SUMS
chmod a+r SHA256SUMS
echo "== $pkg: $(wc -l < SHA256SUMS) files"
sha256sum -c SHA256SUMS | tail -n 3
done
chmod -R a+rX $R
echo "end $(date -u +%Y-%m-%dT%H:%M:%SZ)"