--- title: MeshScale CPU Worker emoji: 🔩 colorFrom: blue colorTo: green sdk: docker app_port: 7860 pinned: false --- # MeshScale CPU Worker This Space template runs one MeshScale CPU worker against a shared Hugging Face bucket mounted at `/data`. Required Space variable: ```text KEY_FARM_ROOT=/data/farm ``` Useful Space variables: ```text KEY_FARM_FORMATION=cpu-worker KEY_FARM_POLL_SECONDS=2 KEY_FARM_TARGET_BATCH_SIZE=24 KEY_FARM_MAX_WORKERS=24 KEY_FARM_BUDGET_HOURLY_USD=0.72 MESHSCALE_WORKER_AUTOSTART=1 ``` `KEY_FARM_WORKER_ID` is optional. When replicas are enabled, the worker app adds the runtime replica/container identity to the base worker name so each replica publishes a distinct pulse. The worker claims shard files from: ```text /data/farm/runs//generations//jobs/pending/ ``` It exits its worker loop when the controller pulse is lost or when regulation mode becomes `shutdown`. Health endpoints: ```text /health /state ```