#!/usr/bin/env bash # Clone MLEvolve into agents/mlevolve/_vendor/MLEvolve and install its deps. # This is a heavy install (torch + ML stack); expect ~5–10 GB and 5–15 min. set -euo pipefail HERE="$(cd "$(dirname "$0")" && pwd)" DEST="${HERE}/_vendor" REPO="${MLEVOLVE_REPO:-https://github.com/InternScience/MLEvolve}" REF="${MLEVOLVE_REF:-main}" mkdir -p "${DEST}" if [[ -d "${DEST}/MLEvolve/.git" ]]; then echo "Updating existing clone in ${DEST}/MLEvolve" git -C "${DEST}/MLEvolve" fetch origin "${REF}" git -C "${DEST}/MLEvolve" checkout "${REF}" git -C "${DEST}/MLEvolve" pull --ff-only else git clone --depth 50 --branch "${REF}" "${REPO}" "${DEST}/MLEvolve" fi cd "${DEST}/MLEvolve" echo echo "Installing requirements (heavy — torch + ML stack)..." for f in requirements_base.txt requirements_ml.txt requirements_domain.txt; do if [[ -f "$f" ]]; then echo " pip install --no-deps -r $f" pip install --no-deps -r "$f" fi done echo echo "MLEvolve installed at ${DEST}/MLEvolve" echo "Set MLEVOLVE_DIR if you put it elsewhere."