Skip to main content

Worker CLI Reference

The worker agent accepts configuration via CLI flags or environment variables. Get the pre-configured command for your queue at metapage.io/settings/queues.

Environment variables and CLI flags

Env varCLI flagDefaultDescription
METAPAGE_IO_WORKER_CPUS-c, --cpusMax CPU cores the worker claims per job
METAPAGE_IO_WORKER_GPUS-g, --gpusMax GPUs the worker claims per job. Use "device=1,3" format for specific GPU indices (Docker docs)
METAPAGE_IO_WORKER_MODE-m, --moderemotelocal = no external API, runs on the same machine as the browser. remote = connects to the cloud queue.
METAPAGE_IO_WORKER_QUEUEQueue ID the worker connects to
METAPAGE_IO_WORKER_PORT-p, --port8000Port used in local mode
METAPAGE_IO_WORKER_API_ADDRESS-a, --api-addresshttps://container.mtfm.ioQueue API address (advanced/dev use)
METAPAGE_IO_WORKER_GENERATE_WORKER_IDfalseIf true, generates a new unique worker ID on every start
METAPAGE_IO_WORKER_RUN_STANDALONEfalseIf true, starts its own Docker daemon subprocess (for environments without a host daemon, e.g. Fly.io)
METAPAGE_IO_WORKER_DEBUG--debugfalseVerbose logging
METAPAGE_IO_WORKER_JOB_MAX_DURATION-t, --max-job-duration5mMaximum allowed duration for any single job on this worker

Security

  • Job containers have no host network access
  • Only /inputs and /outputs are mounted from the host filesystem
  • Container configuration is restricted to a controlled set of options