diff --git a/src/predict.sh b/src/predict.sh index 34e424f..1bdee0f 100644 --- a/src/predict.sh +++ b/src/predict.sh @@ -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" @@ -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