Skip to content

Automation foundation model for tiny devices: 2-bit, 8-29 MB, tool calls, ASR, structured extraction and embeddings on phones, wearables, smart homes, robots, cars and microcontrollers.

feat: add uv support to setup script (#98)

Som Samantraya85a25c117a6
diff --git a/setup b/setup
index 1c674b4..3b0b0af 100755
--- a/setup
+++ b/setup
@@ -16,15 +16,26 @@ if [ -z "$PYTHON" ]; then
exit 1
fi
-[ -d "$VENV_DIR" ] || "$PYTHON" -m venv "$VENV_DIR"
+# Use uv when available (10-100x faster), fall back to pip.
+UV_INSTALL="pip install"
+UV_VENV="$PYTHON -m venv"
+if command -v uv >/dev/null 2>&1; then
+ echo " uv detected — using uv for package management"
+ UV_INSTALL="uv pip install"
+ UV_VENV="uv venv"
+fi
+
+[ -d "$VENV_DIR" ] || $UV_VENV "$VENV_DIR"
source "$VENV_DIR/bin/activate"
-pip install --upgrade pip -q
-pip install -e ".[train]" -q
+if [ "$UV_INSTALL" = "pip install" ]; then
+ pip install --upgrade pip -q
+fi
+$UV_INSTALL -e ".[train]" -q
if command -v nvidia-smi >/dev/null 2>&1 && nvidia-smi >/dev/null 2>&1; then
echo "NVIDIA GPU detected; installing gpu extras..."
- pip install -e ".[gpu]" -q
+ $UV_INSTALL -e ".[gpu]" -q
fi
needle --help