One Cloud Run GPU service (RTX 6000 Pro) running all three open-weights models:
The front process (FastAPI, exposed port) routes:
POST /v1/audio/transcriptions - audio in (ffmpeg-transcoded to 16k wav),
transcription outPOST /v1/chat/completions - OpenAI-style chat, streaming-safe proxy to the
brainPOST /v1/audio/speech - text in, WAV outGET /healthz (also /health) - 200 only when every enabled model is readyDeploy (the service is private, callers need roles/run.invoker):
gcloud beta run deploy speech-gpu --source . \
--region us-central1 \
--cpu 20 --memory 80Gi \
--gpu 1 --gpu-type nvidia-rtx-pro-6000 --no-gpu-zonal-redundancy \
--no-allow-unauthenticated --max-instances 1 \
--network <vpc> --subnet <subnet> --vpc-egress all-traffic \
--startup-probe httpGet.path=/healthz,initialDelaySeconds=60,failureThreshold=60,periodSeconds=10,timeoutSeconds=5 \
--set-env-vars BRAIN_MODEL_LOCATION=gs://vertex-model-garden-public-us/gemma4/gemma-4-31B-it,BRAIN_MODEL_NAME=google/gemma-4-31B-it,HF_HUB_OFFLINE=1,TRANSFORMERS_OFFLINE=1
Omit BRAIN_MODEL_LOCATION to run it as an ears-and-mouth-only box.
Deploy notes, each learned the hard way:
HF_HUB_OFFLINE=1 is required: the box has no public internet (PGA covers
Google APIs only), and without it huggingface_hub tries to list the Whisper
repo online anyway - each retry burns ~9 minutes before failing.