diff --git a/ai-hub/app/core/templates/provisioning/provision.sh.j2 b/ai-hub/app/core/templates/provisioning/provision.sh.j2 index 723bf4d..0ce2b0e 100644 --- a/ai-hub/app/core/templates/provisioning/provision.sh.j2 +++ b/ai-hub/app/core/templates/provisioning/provision.sh.j2 @@ -63,11 +63,15 @@ echo "[*] Falling back to Python Source + Virtualenv execution..." SOURCE_URL="{{ base_url }}/api/v1/nodes/provision/{{ node_id }}?token={{ invite_token }}" - # Use python to run the legacy bootstrap installer which handles platform-native installs - if ! curl -sSLf "$SOURCE_URL" | python3; then + mkdir -p "$INSTALL_DIR/tmp" + curl -sSLf "$SOURCE_URL" -o provision.py + + # Run with -B (no .pyc) and dedicated TMPDIR + if ! PYTHONDONTWRITEBYTECODE=1 TMPDIR="$INSTALL_DIR/tmp" python3 -B provision.py; then echo "❌ Provisioning failed via python bootstrap fallback." exit 1 fi + # If the python script ran correctly, it would have already handled the rest of the install! echo "✅ Python-based bootstrap provisioning successful!" exit 0