Commit graph

5 commits

Author SHA1 Message Date
Vadym Samoilenko
2c5e17c7c4 Add Google Cloud Run offloading for ML inference and image processing
- Create cloud_run/saliency: FastAPI service running DeepGaze I/IIE/III
  on Cloud Run (4 vCPU, 16GB RAM); pre-downloads model weights in Docker
  build to eliminate cold-start delays; returns saliency map + gaze
  sequence + hotspots + design scores
- Create cloud_run/processing: lightweight FastAPI service for heatmap
  generation and gaze sequence visualization (2 vCPU, 4GB RAM)
- Add cloud_run/deploy.sh for gcloud deployment to project optical-414516
  in region europe-west2
- Refactor analysis pipeline to route via Cloud Run when
  CLOUD_RUN_SALIENCY_URL is set, with local fallback for dev mode
- Add cloud_run_client.py with sync httpx wrappers for background tasks
- Split pyproject.toml: base = API-only deps, [ml] = torch/deepgaze for
  local dev; production Dockerfile is now lightweight (~no PyTorch)
- Preserve Dockerfile.full + docker-compose.dev.yml for local ML dev
- Auth via X-Internal-Secret header (CLOUD_RUN_SECRET env var)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-04 19:39:52 +00:00
DJP
8df679c9c8 Add psycopg2-binary to Docker build for sync DB access
Background tasks use synchronous psycopg2 for database writes after
analysis completion. Without this package, analyses stayed stuck on
"pending" status in Docker deployments.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 22:30:24 -05:00
DJP
f95d5efbf7 Fix Docker build: add missing deps and .dockerignore
- Replace deprecated libgl1-mesa-glx with libgl1 (Debian Trixie)
- Add CLIP, einops, ftfy, regex dependencies for DeepGaze models
- Add backend .dockerignore to exclude .venv (128MB → 1.6MB context)
- Update Makefile with CLIP install step
- All 3 models load successfully in Docker

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 22:16:58 -05:00
DJP
2425cd2677 Fix Docker and install files for current codebase
- Fix backend Dockerfile: install deps before copying source for
  proper layer caching (non-editable install)
- Add ai_insights, ai_score, ai_score_reason, ai_cost_usd columns
  to initial Alembic migration so fresh Docker deploys have full schema
- Add ANTHROPIC_API_KEY to docker-compose.yml, docker-compose.dev.yml,
  and .env.example
- Remove accidental backend/=0.40 pip artifact file

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 21:54:41 -05:00
DJP
3467dbcf03 Initial commit — OliVAS visual attention analysis platform
Full-stack application for predicting where humans look in images using
DeepGaze saliency models. Includes heatmap overlays, gaze sequence prediction,
hotspot detection, AOI analysis, rule-based insights, optional Claude AI
design analysis, and professional PDF report generation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 20:20:58 -05:00