Spaces:
Sleeping
Sleeping
File size: 2,625 Bytes
f5a6291 473f969 f5a6291 473f969 f5a6291 473f969 f5a6291 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | # Deployment runbook
How the GAIA Solver is deployed and kept in sync across the HF Space
(primary) and the GitHub mirror.
## Topology
- **Primary:** Hugging Face Space β `origin` β
`https://huggingface.co/spaces/ovo456/Final_Assignment_Template`
- **Mirror:** GitHub β same `main` branch (see "Add the GitHub mirror"
below). Exists for visibility and history preservation.
The Space reads the committed `answer_bundle.json` and submits it at runtime
(ADR-0001 hybrid execution); the GitHub mirror carries the same history.
## Environment variables & Space secrets
The full env-var table lives in [`README.md`](../README.md). The only
**Space secrets** needed are:
| Secret | Required? | Purpose |
|---|---|---|
| `DEEPSEEK_API_KEY` | Required for live solves | Lets the Space solve unbundled Tasks (text/web-only). |
| `OPENAI_API_KEY` or `OPENROUTER_API_KEY` | Optional | Hosted audio-transcription fallback. |
Set them in the Space: **Settings β Variables and secrets β New variable**.
## GitHub mirror (one-time setup)
The GitHub mirror does not exist yet β create it before you can push:
1. Create an **empty** repository on GitHub (e.g.
`https://github.com/ovo456/Final_Assignment_Template`). Do **not**
initialize it with a README/license β that would create a conflicting root
commit and force a merge.
2. Add it as a mirror remote:
```bash
git remote add github https://github.com/<owner>/<repo>.git
```
3. Push the same `main` to both remotes:
```bash
git push origin main # HF Space (primary)
git push github main # GitHub mirror
```
> Pushing to GitHub requires auth: an SSH key registered with your GitHub
> account, or a PAT saved in your credential helper (`osxkeychain` on macOS).
> If `git push github main` prompts for credentials, run `gh auth login`, or
> add your public key at https://github.com/settings/keys.
## Dev loop (regenerate the Answer bundle)
```bash
cp .env.example .env # fill in DEEPSEEK_API_KEY, GAIA_API_URL, ...
pip install -r requirements.txt
python text.py # solves + writes answer_bundle.json and gaia_results.csv
git add answer_bundle.json
git commit -m "Regenerate Answer bundle"
git push origin main # the Space picks up the new bundle
```
## Notes
- `files/` (pre-downloaded Attachments) and `.env` are gitignored β never
force-add them.
- Agent-internal tooling (`.agents/`, `.scratch/`, `skills-lock.json`,
`SESSION_HANDOFF.md`) is gitignored and kept out of the shared repo.
- The results-view prototype lives on branch `prototype/results-view` (out of
`main`).
|