This commit is contained in:
HenryNdubuaku
2026-03-23 12:21:44 -07:00
parent 8ced1001af
commit 42b05f77e0
2 changed files with 28 additions and 2 deletions
+13 -1
View File
@@ -249,7 +249,7 @@ needle [command]
- Setup gcloud 1: download the `macOS ARM` from [here](https://docs.cloud.google.com/sdk/docs/install-sdk) and uzip.
- Setup gcloud 2: open terminal, cd to ypur downloads and run `./google-cloud-sdk/install.sh`
- Setup gcloud 3: run `gloud init`, sign in with cactus email, should prompt for project
- Setup gcloud 3: restart terminal and run `gloud init`, sign in with cactus email, should prompt for project
- Setup gcloud 4: else, set the project with `gcloud config set project needle-488623`
- setup gcloud 5: run `gcloud help` and read carefully
@@ -298,3 +298,15 @@ needle [command]
10. (Optional) Delete instance when no longer needed
needle tpu delete my-experiment
```
## Current TPU Instance
```
Name Zone Type Software IP (ext) Created
─────────────────────────────────────────────────────────────────────────
henry us-east5-a v6e-8 v2-alpha-tpuv6e 34.186.252.53 Mar 17, 2026
```
```bash
gcloud compute tpus tpu-vm ssh henry --zone=us-east5-a
```
+15 -1
View File
@@ -23,7 +23,21 @@ if [ -f /etc/os-release ] && grep -qi 'ubuntu\|debian' /etc/os-release; then
fi
fi
else
PYTHON=python3
# On macOS or other systems, find Python >= 3.11
PYTHON=""
for candidate in python3.13 python3.12 python3.11 python3; do
if command -v "$candidate" &>/dev/null; then
PY_OK=$("$candidate" -c "import sys; print(int(sys.version_info >= (3, 11)))" 2>/dev/null || echo "0")
if [ "$PY_OK" = "1" ]; then
PYTHON="$candidate"
break
fi
fi
done
if [ -z "$PYTHON" ]; then
echo "Error: Python >= 3.11 is required. Install it with: brew install python@3.12"
return 1 2>/dev/null || exit 1
fi
fi
# Recreate venv if it doesn't exist or was built with the wrong Python