Spaces:
Running
Running
File size: 1,088 Bytes
d094faf | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | #!/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."
|