13 lines
657 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
# Run from the repository root. Does not alter system Python or start a resident model server.
smart_env="${SMART_EDIT_ENV_DIR:-$PWD/.venv-smart-edit}"
smart_python="${SMART_EDIT_SETUP_PYTHON:-python3.11}"
"$smart_python" -m venv "$smart_env"
"$smart_env/bin/python" -m pip install -r services/smart-edit/requirements.txt
if [[ "${1:-}" == "--with-asr" ]]; then
"$smart_env/bin/python" -m pip install -r services/smart-edit/requirements-asr.txt
"$smart_env/bin/python" services/smart-edit/prepare_models.py
fi
SMART_EDIT_PYTHON="$smart_env/bin/python" "$smart_env/bin/python" services/smart-edit/analyze.py --check