CLI reference¶
The n4cluster command wraps the Python SDK. Client subcommands read --server
(or $N4CLUSTER_SERVER, default http://127.0.0.1:8765) and --token (or
$N4CLUSTER_TOKEN). Precedence is flag > environment > default.
n4cluster server¶
Run the coordinator (and the /ui dashboard).
--host(127.0.0.1)bind address.
--port(8765)listen port.
--state(./cluster-state)directory for
store.sqliteandobjects/.--tokenlegacy single bearer token (or
$N4CLUSTER_TOKEN), treated as one all-rights admin principal. When neither--tokennor any principal is set the server runs open (dev mode).--principal(repeatable)a credential-bound RBAC principal. The argument contains a name, a bearer token, and one or more roles separated by colons. Roles are
submitter,executor,viewer,admin(comma-separate to combine); they grant rights from{submit, read, cancel, execute, admin}. Any principal switches the server into enforced mode.--auth-fileJSON file of
[{"name","token","roles":[...]}]principals (alternative to repeating--principal).--allow-python-jobspermit
python_entrypointpipelines (arbitrary Python — trusted submitters only).--lease-ttl(60.0)task lease TTL in seconds (renewed on each heartbeat).
--cors-originallow a browser origin to call the API (repeatable / comma-separated; off by default).
--log-level(info) ·--log-filelogging verbosity, and an optional file to also write logs to.
n4cluster worker¶
Run a polling worker (needs a provisioned nirs4all environment).
--server·--tokencoordinator URL and token.
--state(./worker-state)local task workspaces.
--labelscomma-separated
k=vcapability labels (e.g.site=lab,cuda=true).--slots(1)concurrent task capacity.
--memory-gbadvertise available memory (for the soft memory floor).
--gpusforce the declared GPU count (default: auto-detect via
nvidia-smi;0hides GPUs).--allow-pythonpermit
python_entrypointpipelines on this worker.--name·--poll-interval(2.0) ·--log-level·--log-fileworker name, lease poll interval, and logging.
Client commands¶
n4cluster submit JOB.yaml [--wait] [--timeout S] [--out DIR]submit a YAML/JSON job; optionally block and download artifacts.
n4cluster run --pipeline P.yaml --dataset DATA [--param KEY=YAML] [--n-jobs N] [--wait]build and submit a
nirs4all.runjob without writing a job file. Repeat--pipelineand/or--datasetto submit an explicit matrix.--n-jobsis translated to worker-localinner_n_jobs; workspaces are always isolated per task. The submitted job carries the sameDistributedRunParitycontract as the Python adapter.n4cluster status JOB_IDstatus, task counts, best metric and ranking.
n4cluster jobs [--status S] [--name N] [--limit L]list jobs, filtered by status and/or name substring.
n4cluster logs JOB_ID [--limit N]print recorded events for a job.
n4cluster cancel JOB_IDrequest cooperative cancellation.
n4cluster artifacts JOB_ID [--out DIR]list (and optionally download) a job’s artifacts.
n4cluster workerslist registered workers, their slots, labels and
nirs4all-clusterversion (with a!versionmarker when a worker diverges from the server).