Skip to content

[deploy] Start TERA agent on Jetson with OLLAMA_MODEL=gemma3:4b #82

Description

@jdev-02

Lane: deploy · Owners: Kyle (Jetson runtime) + Jon (env config) · Phase: P3 critical-path · Priority: P0

Why

Two things are running on the Jetson independently:

  1. ollama serve with gemma3:4b pulled (verified via llm_dev_kmh/tera_gemma/chat_tera_gemma.py)
  2. not yet: the TERA agent service (agent/app.py FastAPI)

agent/llm.py OllamaClient defaults to gemma2:2b (line 327). Without overriding, the agent will fail to pull a non-existent model on first request.

Acceptance criteria

  • OLLAMA_MODEL=gemma3:4b TERA_PHASE=3 TERA_DEVICE_PROFILE=austere uvicorn agent.app:app --host 0.0.0.0 --port 8000 runs on the Jetson and stays up.
  • curl http://<jetson>:8000/health returns {"status":"ok","phase":"3","profile":"austere"}
  • First /plan POST against this endpoint produces a non-empty RouteQuery from Gemma 3 4B (check server logs for llm_emitted_route_query).
  • OllamaClient's loopback enforcement passes (OLLAMA_HOST=http://127.0.0.1:11434 is the default; verify port 11434 is loopback-only).
  • Latency from /plan POST to first byte response < 30s (PRD §11.2 target).

File pointers

Notes

  • Defaults to keep open: OLLAMA_HOST left default (loopback enforcement is intentional)
  • TERA_DEVICE_PROFILE=austere ensures no frontier client constructed even if API keys are present (PRD §8 OPSEC)
  • For the demo, just running uvicorn in a tmux pane is fine — systemd unit ([deploy] systemd unit for agent + bridge on Jetson #14) is post-MVP

Dependency / blocker

Once this is up, the wire-format issue and polyline-render issue (sister #s) can be tested end-to-end.

Refs PRD §7.2 LLM rows, §11.2 latency target, §13.3 Sun 0700 gate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    lane:deployDeploy / systemd (P3)phase:P3Phase 3: fully local HEROpriority:P0Blocker / critical path

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions