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.

Updates

HenryNdubuaku7a501267d4dc
diff --git a/README.md b/README.md
index e4850f0..069fd1d 100644
--- a/README.md
+++ b/README.md
@@ -184,7 +184,7 @@ needle tpu [command]
git clone https://github.com/cactus-compute/needle.git
cd needle
-4. Install needle
+4. Install needle (follow instruction to setup wandb)
source ./setup
5. Use needle as you normally would locally, like training
diff --git a/pyproject.toml b/pyproject.toml
index 6a7c563..4a8b394 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,7 +1,7 @@
[project]
name = "needle"
version = "0.1.0"
-requires-python = ">=3.10"
+requires-python = ">=3.11"
dependencies = [
"jax==0.9.0.1",
"jaxlib==0.9.0.1",
diff --git a/setup b/setup
old mode 100644
new mode 100755
index 41c7797..905cd7a
--- a/setup
+++ b/setup
@@ -2,9 +2,33 @@
VENV_DIR=".venv"
+# On Ubuntu/Debian, ensure Python >= 3.11 and venv are available
+if [ -f /etc/os-release ] && grep -qi 'ubuntu\|debian' /etc/os-release; then
+ PYTHON_OK=$(python3 -c "import sys; print(int(sys.version_info >= (3, 11)))" 2>/dev/null || echo "0")
+ if [ "$PYTHON_OK" = "0" ]; then
+ echo "Python >= 3.11 required. Installing..."
+ sudo apt-get update -qq
+ sudo apt-get install -y -qq software-properties-common
+ sudo add-apt-repository -y ppa:deadsnakes/ppa
+ sudo apt-get update -qq
+ sudo apt-get install -y -qq python3.11 python3.11-venv python3.11-dev
+ PYTHON=python3.11
+ else
+ PYTHON=python3
+ # Ensure venv package is installed
+ if ! $PYTHON -m venv --help &>/dev/null; then
+ echo "Installing python3-venv..."
+ sudo apt-get update -qq
+ sudo apt-get install -y -qq python3-venv
+ fi
+ fi
+else
+ PYTHON=python3
+fi
+
if [ ! -d "$VENV_DIR" ]; then
echo "Creating virtual environment..."
- python3 -m venv "$VENV_DIR"
+ $PYTHON -m venv "$VENV_DIR"
else
echo "Virtual environment already exists."
fi