Repository navigation
Expand file tree
/
Copy pathsetup_env.sh
More file actions
53 lines (43 loc) · 1.66 KB
/
Copy pathsetup_env.sh
File metadata and controls
53 lines (43 loc) · 1.66 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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/bash
# MARTI Environment Setup - Single command to get started
# Uses exact working versions from requirements_uv.txt
set -e
echo "🚀 Setting up MARTI environment with UV..."
# Check UV installed
if ! command -v uv &> /dev/null; then
echo "❌ UV not found. Install with:"
echo " curl -LsSf https://astral.sh/uv/install.sh | sh"
exit 1
fi
echo "✓ UV found: $(uv --version)"
# Create Python 3.11 environment
echo "📦 Creating Python 3.11 virtual environment..."
uv venv --python 3.11
# Activate
source .venv/bin/activate || { echo "❌ Failed to activate"; exit 1; }
echo "✓ Environment activated"
# Install build dependencies first (required for flash-attn with no-build-isolation)
echo "🛠️ Installing build dependencies..."
uv pip install setuptools wheel packaging psutil ninja
# Install PyTorch first (required for building flash-attn)
echo "🔥 Installing PyTorch 2.6.0..."
uv pip install "torch==2.6.0" "torchvision==0.21.0" "torchaudio==2.6.0"
# Install exact working versions
echo "🔧 Installing remaining dependencies..."
echo " This takes ~5 minutes (flash-attn build)..."
uv pip install -r requirements_uv.txt --no-build-isolation
# Verify
echo "🧪 Verifying installation..."
if python -c "from flash_attn.utils.distributed import all_gather; import weave; print('✓ All imports successful')"; then
echo ""
echo "🎉 SUCCESS! Environment ready."
echo ""
echo "Next steps:"
echo " source .venv/bin/activate"
echo " bash scripts/run_train_mathchat_coach_6gpu_direct.sh MODEL_PATH"
echo ""
echo "📖 See UV_SETUP.md for details"
else
echo "⚠️ Verification failed - check errors above"
exit 1
fi