Removing python dependcy on host

This commit is contained in:
2026-04-11 13:35:35 +02:00
parent 4460bee57b
commit a4b034d4b4
+9 -18
View File
@@ -4,8 +4,8 @@
# Run once after cloning. Handles everything that can be automated:
# - Ollama install + model pulls
# - SSH key generation (tunnel key + Gitea key)
# - gutasktool clone + install
# - Docker containers
# - gutasktool clone (into agent-zero-data, mounted into the agent0 container)
# - Docker containers (gutasktool installed inside agent0 container)
#
# After this script: add two SSH keys (printed at the end), then open
# https://agent0.glitch.university and enter your API keys in Settings.
@@ -35,17 +35,6 @@ command -v ssh-keygen >/dev/null 2>&1 || { echo "ssh-keygen not found."; exit 1
command -v ssh-keyscan >/dev/null 2>&1 || { echo "ssh-keyscan not found."; exit 1; }
docker compose version >/dev/null 2>&1 || { echo "docker compose not found."; exit 1; }
if ! command -v python3 >/dev/null 2>&1; then
echo "python3 not found. Install Python 3.9+ first."
exit 1
fi
PY_VERSION=$(python3 -c "import sys; print(sys.version_info.minor)")
if [[ "$PY_VERSION" -lt 9 ]]; then
echo "Python 3.9+ required (found 3.${PY_VERSION})."
exit 1
fi
info "Prerequisites OK"
# ── Credentials (collected upfront before any private repo clones) ─────────────
@@ -181,12 +170,18 @@ mkdir -p "${HOME}/.ssh"
chmod 700 "${HOME}/.ssh"
if [[ -f "$GITEA_KEY" ]]; then
info "Gitea key already exists"
info "Gitea key already exists (local only — verify it is registered on the server)"
else
ssh-keygen -t ed25519 -f "$GITEA_KEY" -C "gunnar@$(hostname)" -N ""
info "Gitea key generated at ${GITEA_KEY}"
fi
echo ""
echo " This public key must be registered at https://${GITEA_HOST} → Settings → SSH Keys:"
echo ""
echo " $(cat "${GITEA_KEY}.pub")"
echo ""
# Add Gitea to known_hosts to avoid interactive prompt during git operations
if ! ssh-keygen -F "[${GITEA_HOST}]:${GITEA_PORT}" -f "${HOME}/.ssh/known_hosts" >/dev/null 2>&1; then
ssh-keyscan -p "$GITEA_PORT" "$GITEA_HOST" >> "${HOME}/.ssh/known_hosts" 2>/dev/null || true
@@ -218,10 +213,6 @@ else
|| git clone "https://oauth2:${GITEA_TOKEN_BOOTSTRAP}@${GITEA_HOST}/glitch-university/gutasktool.git" "$GUTASK_DIR"
fi
info "Installing gutasktool..."
(cd "$GUTASK_DIR" && pip3 install -e . --quiet)
info "gutask installed ($(gutask --version 2>/dev/null || echo 'ok'))"
if [[ ! -f "${GUTASK_DIR}/.env" ]]; then
cat > "${GUTASK_DIR}/.env" << EOF
API_URL=https://glitch.university