Skip to main content
Runs LeRobot’s async-inference policy server, so run-policy can run inference on a more powerful machine on the robot’s network, such as a desktop with a GPU. The robot sends joint positions and camera frames to it over gRPC and gets actions back. run-policy chooses the policy (--policy_path, --policy_type and --device), not the server. One server can serve different policies across sessions without a restart. The server loads the policy, so the path must be reachable from the server, such as a HuggingFace Hub repo ID or a local path on the server machine.
Use this server only on a trusted network. The connection has no encryption or authentication:
  • Any client that can reach the port can make the server download and load a policy.
  • Another machine on the network can pose as the server and send the robot any actions.
Put the inference machine and the robot on an isolated network or a VPN. Firewall the port so only the robot can connect, and never expose it on shared Wi-Fi or the internet. Load only policy checkpoints you trust.
Then, on the robot:
Requires the lerobot extra, and a CUDA build of PyTorch on the server for GPU inference. Without --server_host, run-policy starts a policy server on the robot. You need this command only when inference runs on another machine.