Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

2.4 KB
Raw Blame
serviceAccount: projects/aerial-vehicle-466722-p5/serviceAccounts/[email protected]

substitutions:
  _REGION: us-central1
  _RUN_SA: avatar-reconstruction-sa@aerial-vehicle-466722-p5.iam.gserviceaccount.com
  _SERVICE: model-asl-recognition
  _REPO: model-asl-recognition

steps:
  - id: build
    name: gcr.io/cloud-builders/docker
    dir: workers/model-asl-recognition
    args:
      - build
      - --tag
      - ${_REGION}-docker.pkg.dev/$PROJECT_ID/${_REPO}/server:$SHORT_SHA
      - --tag
      - ${_REGION}-docker.pkg.dev/$PROJECT_ID/${_REPO}/server:latest
      - --cache-from
      - ${_REGION}-docker.pkg.dev/$PROJECT_ID/${_REPO}/server:latest
      - .

  - id: push
    name: gcr.io/cloud-builders/docker
    args:
      - push
      - --all-tags
      - ${_REGION}-docker.pkg.dev/$PROJECT_ID/${_REPO}/server

  # Recognition runs inside the request (sub-second on CPU), so plain
  # request-based billing and scale-to-zero are correct here — unlike the
  # video2motion worker's background-task shape.
  - id: deploy
    name: gcr.io/google.com/cloudsdktool/cloud-sdk:slim
    entrypoint: gcloud
    args:
      - run
      - deploy
      - ${_SERVICE}
      - --image=${_REGION}-docker.pkg.dev/$PROJECT_ID/${_REPO}/server:$SHORT_SHA
      - --region=${_REGION}
      - --service-account=${_RUN_SA}
      - --platform=managed
      # gen2: the LiteRT native runtime maps a shared object with an
      # executable stack, which gen1's gVisor sandbox rejects at import
      # ("cannot enable executable stack"); gen2 runs on full Linux.
      - --execution-environment=gen2
      - --port=8080
      - --cpu=4
      - --memory=4Gi
      - --min-instances=0
      - --max-instances=4
      - --timeout=60
      # One LiteRT interpreter per process, guarded by a lock in main.py, so
      # inference is serialized inside an instance no matter how many requests
      # land on it. Cloud Run's default (320) would queue hundreds behind that
      # lock and blow the 60s timeout instead of scaling out; 8 keeps the
      # in-instance wait to a few seconds and lets autoscaling add instances.
      - --concurrency=8
      - --allow-unauthenticated
      - --set-secrets=API_KEY=avatar-reconstruction-key:latest

images:
  - ${_REGION}-docker.pkg.dev/$PROJECT_ID/${_REPO}/server:$SHORT_SHA
  - ${_REGION}-docker.pkg.dev/$PROJECT_ID/${_REPO}/server:latest

options:
  machineType: E2_HIGHCPU_8
  logging: CLOUD_LOGGING_ONLY

timeout: 3600s