Skip to content

Commit

Permalink
set after apt
Browse files Browse the repository at this point in the history
  • Loading branch information
ipitio committed Oct 12, 2024
1 parent 433122f commit bb58d9b
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/predict.sh
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
#!/bin/bash
# shellcheck disable=SC1091,SC2015

set -Eeuo pipefail
declare -r pdf_dir="${1:-.}"
export OMP_THREAD_LIMIT=1

# wait up to 5 minutes for the lock file to be released
for _ in {1..300}; do
! apt-get update || break
apt-get update && break || sleep 1
done

for _ in {1..300}; do
! apt-get install -y python3 python3-pip python3-venv tesseract-ocr poppler-utils || break
apt-get install -y python3 python3-pip python3-venv tesseract-ocr poppler-utils && break || sleep 1
done

set -Eeuo pipefail
declare -r pdf_dir="${1:-.}"
export OMP_THREAD_LIMIT=1
python3 -m venv venv

if [[ -f venv/bin/pip3 ]]; then
Expand Down

0 comments on commit bb58d9b

Please sign in to comment.