Temporal Inference Deployment
Scope
This runbook prepares the private Plan-IR worker used by VRDex Time. It does not authorize creating a billable GPU endpoint. Endpoint creation requires the product owner's explicit approval.
Artifact and image
-
Resolve the repository's missing root license-file issue before public model publication.
-
Download the promoted adapter release and verify SHA-256
d933bd524bbf95a4521f243a61cdf3e196fea08133d00fd4a72e0db30160e598. -
Move the adapter to an organization-owned Hugging Face repository.
-
Record immutable base and adapter commit revisions.
-
Regenerate the hashed dependency lock only from
requirements.in:uv pip compile workers/temporal-inference/requirements.in --python-version 3.12 --generate-hashes --index-strategy unsafe-best-match --extra-index-url https://download.pytorch.org/whl/cu128 --output-file workers/temporal-inference/requirements.lock.txt -
Build
workers/temporal-inference/Dockerfile. Its CUDA base image is pinned to an amd64 digest and pip installs only the hashed lock. -
Push an immutable image digest to the organization registry. Do not deploy
:latest.
Local checks
docker build -t vrdex-temporal:local workers/temporal-inference
docker run --rm --gpus all --env-file .private/temporal-inference.env -p 8000:8000 vrdex-temporal:local
Expected health behavior:
GET /pingreturns204while loadingGET /pingreturns200after model load and prewarm, or503if startup failed- authenticated
GET /readyreturns the same readiness state and verifies the application bearer credential - authenticated
POST /inferaccepts onlytext,referenceInstant, andtimeZone
Run the migrated executor-backed eval before provider deployment.
RunPod bootstrap
Use runpodctl and the REST API for templates, inspection, and post-bootstrap
updates. The current public runpodctl serverless create flags and REST create
schema do not expose the Load Balancer endpoint-type selector, while RunPod's
load-balancing guide requires that selection during creation. Selecting the
endpoint type in the console is therefore an explicit one-time bootstrap step,
along with any first-time terms or payment setup. RunPod's public MCP is
read-only documentation access and cannot create or update provider resources.
- Install and configure
runpodctlwith a restricted RunPod API key. - Create a Serverless template from the immutable image digest with
8000/httpexposed andPORT=8000,PORT_HEALTH=8000. - Add server-only model revisions, model read token, and a random inference bearer token to the template secret environment.
- Confirm the template is Serverless-specific.
- Review the endpoint plan:
& .\scripts\runpod-temporal-endpoint.ps1 -TemplateId <template-id> -GpuTypeIds "NVIDIA RTX A4000","NVIDIA RTX A4500"
- Stop after the plan until explicit billable-resource approval is recorded.
- In the RunPod console, create the endpoint from the reviewed template and
select Load Balancer. Set the worker minimum to
0, worker maximum to1, idle timeout to30, and GPU concurrency to1; enable FlashBoot, matching the plan. - Record the endpoint ID, then verify the resulting configuration with
runpodctl serverless get <endpoint-id> --include-template --include-workersand the REST read API. Do not accept queue-style/runor/runsyncURLs. - Confirm the provider's direct
https://ENDPOINT_ID.api.runpod.ai/pinghealth behavior, then callhttps://ENDPOINT_ID.api.runpod.ai/readywith the configured bearer credential to verify application readiness. Usehttps://ENDPOINT_ID.api.runpod.aias the ConvexTEMPORAL_INFERENCE_BASE_URL.
RunPod documents 200 as healthy and 204 as initializing for load-balanced
/ping checks. Direct load-balanced requests have no provider queue or
automatic retry, so Convex owns the durable continuation job.
Convex configuration
Set independently per environment:
TEMPORAL_PARSING_ENABLED=trueTEMPORAL_INFERENCE_BASE_URLTEMPORAL_INFERENCE_AUTH_TOKENTEMPORAL_DAILY_ACCOUNT_LIMIT=250TEMPORAL_MONTHLY_ACCOUNT_LIMIT=2000
The service fails closed unless TEMPORAL_PARSING_ENABLED is exactly true.
Unset it or set it to false as the operator kill switch. Rotate the inference
credential in this maintenance sequence:
- set
TEMPORAL_PARSING_ENABLED=false - replace the provider template credential
- update
TEMPORAL_INFERENCE_AUTH_TOKENin Convex - verify direct
/pingand an authenticated worker smoke request - restore
TEMPORAL_PARSING_ENABLED=trueand run one end-to-end parse
If verification fails, leave the kill switch off and restore the previous provider and Convex credential before retrying.
Vercel configuration
Set TEMPORAL_INPUT_HASH_KEY to an independent random secret. It keys
non-reversible repeated-input hashes and must not equal an API-token pepper.
PostHog configuration is applied from infra/terraform/posthog. Applying that
stack creates the temporal-parsing-beta rollout flag but does not grant
backend access.
Promotion evidence
Record required and diagnostic pass counts, wrong singular answers, Plan-IR validity, warm and cold p50/p95/p99, bounded burst behavior, worker seconds, cost per 1,000 calls, image digest, model revisions, dependency lock, GPU, precision, prompt format, and rollback result.
Do not point the public route at the endpoint until required cases pass and the previous container plus kill switch have both been exercised.