tostido's picture
Make MeshScale workers replica safe
86f4c18 verified
|
Raw
History Blame Contribute Delete
977 Bytes
metadata
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:

KEY_FARM_ROOT=/data/farm

Useful Space variables:

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:

/data/farm/runs/<run_id>/generations/<generation>/jobs/pending/

It exits its worker loop when the controller pulse is lost or when regulation mode becomes shutdown.

Health endpoints:

/health
/state