Skip to content

Commit

Permalink
source in if
Browse files Browse the repository at this point in the history
  • Loading branch information
ipitio committed Oct 9, 2024
1 parent 18cb940 commit 6c9263a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/predict.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
set -Eeuo pipefail
declare -r pdf_dir="${1:-.}"
export OMP_THREAD_LIMIT=1

python3 -m venv venv
source venv/bin/activate

if [[ -f venv/bin/pip3 ]]; then
source venv/bin/activate

./venv/bin/pip3 install -r requirements.txt
./venv/bin/python3 ./main.py "$pdf_dir"

Expand All @@ -17,4 +17,5 @@ if [[ -f venv/bin/pip3 ]]; then
elif [[ -f /.dockerenv ]]; then
pip3 install -r requirements.txt --user --break-system-packages
python3 ./main.py "$pdf_dir"
rm -rf venv
fi

0 comments on commit 6c9263a

Please sign in to comment.