Spaces:
Running
Running
| # Fase 1: build Space tanpa llama-cpp & tanpa preload (hilangkan NO_APP_FILE / error) | |
| set -euo pipefail | |
| cd "$(dirname "$0")/.." | |
| cp requirements-boot.txt requirements.txt | |
| # README tanpa preload — build lebih ringan | |
| python3 <<'PY' | |
| from pathlib import Path | |
| teks = Path("README.md").read_text(encoding="utf-8") | |
| if "preload_from_hub:" in teks: | |
| baris = teks.splitlines() | |
| keluar = [] | |
| skip = False | |
| for b in baris: | |
| if b.strip().startswith("preload_from_hub:"): | |
| skip = True | |
| keluar.append("# preload_from_hub: dinonaktifkan sementara (fase boot)") | |
| continue | |
| if skip and b.strip().startswith("- repo_id:"): | |
| continue | |
| if skip and b.strip().startswith("filename:"): | |
| continue | |
| if skip and b.strip() and not b.startswith(" "): | |
| skip = False | |
| if not skip: | |
| keluar.append(b) | |
| Path("README.md").write_text("\n".join(keluar) + "\n", encoding="utf-8") | |
| print("README boot OK") | |
| PY | |
| echo "Siap push fase boot. Jalankan: git add -A && git commit && git push origin main" | |