| set -euo pipefail | |
| repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" | |
| ape_root="${repo_root}/approach/ovod/APE" | |
| python -B -c 'import torch; print("PyTorch", torch.__version__, "CUDA", torch.version.cuda)' | |
| test -f "${ape_root}/setup.py" | |
| # Dependencies must already be installed in the selected CUDA environment. | |
| # FORCE_CUDA keeps the build explicit even on a login node without an active GPU. | |
| FORCE_CUDA="${FORCE_CUDA:-1}" \ | |
| python -B -m pip install --no-build-isolation -e "${ape_root}" | |
| cd "${repo_root}" | |
| python -B scripts/check_environment.py | |