forked from karpathy/autoresearch
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit_script.sh
More file actions
executable file
·35 lines (27 loc) · 868 Bytes
/
init_script.sh
File metadata and controls
executable file
·35 lines (27 loc) · 868 Bytes
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
set -e # Exit immediately if a command fails
echo "🚀 Starting setup..."
# 1. Check if uv is installed, install if missing
if ! command -v uv &> /dev/null; then
echo "📦 uv not found. Installing uv..."
curl -LsSf https://astral.sh/uv/install.sh | sh
# Reload shell so uv is available immediately
export PATH="$HOME/.local/bin:$PATH"
else
echo "✅ uv is already installed"
fi
# 2. Install dependencies
echo "📦 Installing dependencies..."
uv sync
# 3. Check if data exists before downloading
DATA_DIR="./data"
if [ ! -d "$DATA_DIR" ] || [ -z "$(ls -A $DATA_DIR 2>/dev/null)" ]; then
echo "⬇️ Data not found. Preparing dataset..."
uv run prepare.py
else
echo "✅ Data already present, skipping prepare step"
fi
# 4. Run training
echo "🏋️ Running training..."
uv run train.py
echo "🎉 Done!"