#!/usr/bin/env bash # Steering planner VLM for the Space: native vLLM, Qwen3-VL-30B-A3B, A100 80GB replicas, billed to the lerobot org. # Needs a token with inference endpoint write access on lerobot (HF_TOKEN or `hf auth login`). # Usage: bash scripts/deploy_planner.sh show -> hardware and prices # bash scripts/deploy_planner.sh deploy -> create the endpoint # bash scripts/deploy_planner.sh status -> state and URL (set it as the Space variable PLANNER_URL) # bash scripts/deploy_planner.sh pause -> stop billing set -euo pipefail NAME=steering-planner NAMESPACE=lerobot MIN_REPLICA=1 MAX_REPLICA=4 # With MIN_REPLICA=1 the endpoint never scales to zero (the API rejects --scale-to-zero-timeout then); # for cold starts instead of an always-on replica, set MIN_REPLICA=0 and add --scale-to-zero-timeout. case "${1:-show}" in show) hf endpoints hardware --namespace "$NAMESPACE" --vendor aws --accelerator gpu; exit 0 ;; pause) hf endpoints pause "$NAME" --namespace "$NAMESPACE"; exit 0 ;; status) hf endpoints describe "$NAME" --namespace "$NAMESPACE"; exit 0 ;; deploy) ;; *) echo "unknown action $1"; exit 1 ;; esac hf endpoints deploy "$NAME" \ --namespace "$NAMESPACE" \ --repo Qwen/Qwen3-VL-30B-A3B-Instruct \ --framework custom --engine vllm --custom-image vllm/vllm-openai:v0.31.0 \ --vendor aws --region us-east-1 \ --accelerator gpu --instance-type nvidia-a100 --instance-size x1 \ --min-replica "$MIN_REPLICA" --max-replica "$MAX_REPLICA" \ --scaling-metric pendingRequests \ --container-args "--max-model-len 32768" \ --type authenticated