-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·31 lines (24 loc) · 1 KB
/
setup.sh
File metadata and controls
executable file
·31 lines (24 loc) · 1 KB
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
#!/usr/bin/env bash
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
echo "=== eforge SWE-bench Benchmark Setup ==="
# Check prerequisites
command -v docker >/dev/null 2>&1 || { echo "Error: docker is required"; exit 1; }
command -v python3 >/dev/null 2>&1 || { echo "Error: python3 is required"; exit 1; }
command -v node >/dev/null 2>&1 || { echo "Error: node is required"; exit 1; }
command -v eforge >/dev/null 2>&1 || { echo "Error: eforge is required (npm install -g eforge)"; exit 1; }
# Create venv and install Python deps
if [[ ! -d "$SCRIPT_DIR/.venv" ]]; then
echo "Creating Python venv..."
python3 -m venv "$SCRIPT_DIR/.venv"
fi
echo "Installing Python dependencies..."
source "$SCRIPT_DIR/.venv/bin/activate"
pip install -q -r "$SCRIPT_DIR/requirements.txt"
# Create working directories
mkdir -p "$SCRIPT_DIR/repos"
mkdir -p "$SCRIPT_DIR/results"
echo ""
echo "Setup complete. To run:"
echo " source .venv/bin/activate"
echo " python harness/run_benchmark.py --instances 5"