Spaces:
Runtime error
Runtime error
Commit History
-
feat(deploy): HF Spaces / CPU production stack
Stack the changes required to ship cakra to a CPU-only host (HF Spaces basic, generic VPS without GPU) cleanly: • app/config.py — profile loader. CAKRA_PROFILE=<name> (set in shell *or* in .env itself) loads `.env.<name>` after the base .env and overrides matching keys. The HF Spaces overlay is auto-applied when the runtime is detected via SPACE_ID, so a Space deploy needs no extra config beyond the secret list. • .env.hfspace — committed overlay tuning HF basic's shared 2 vCPU: INFERENCE_SIZE=640, TARGET_INFER_FPS=3, FRAME_SKIP=2, output 854x480, MAX_STREAMS=1, MODEL_PATH=./models/yolo-world-id.onnx. No secrets in the file — DATABASE_URL stays in .env or the Space Secrets UI. • app/main.py — boot log surfaces the active profile + the resource knobs so HF and local-simulation runs are auditable in one log line. • app/services/detector.py — dispatch backend by MODEL_PATH suffix (.pt → pytorch, .onnx → onnx, .xml → openvino, .engine…ed450db