MarketlabMarketlabDocs

Docker Daemon

Run mlabd and its workers in the Market Lab container.

Select the Docker backend:

mlab daemon backend docker
mlab daemon status

The host CLI connects to mlabd inside the container:

host mlab -> Docker mlabd -> workers

By default, the connection uses 127.0.0.1:47831, container marketlab-mlabd, and a random token stored at ~/.market-lab/daemon.token. A custom MLAB_HOME selects a separate token and state directory. The host port is bound to loopback only.

The official container uses a read-only root filesystem, drops Linux capabilities, enables no-new-privileges, runs with the host user ID, and does not mount the Docker socket.

Choose another compatible image when required:

mlab daemon backend docker --image my-marketlab-daemon:v0.1.2

The container uses the same selected runtime home as Native, defaulting to ~/.market-lab/. Replacing it does not remove credentials, snapshots, artifacts, jobs, or logs.

Independent Runtimes and Limits

MLAB_HOME="$HOME/mlab-runtimes/alice" mlab daemon backend docker \
  --container mlab-alice --port 48001 \
  --cpus 1 --memory-mib 512 --pids-limit 256

Each container can run multiple jobs. CPU, memory, and process/thread limits apply to the whole container. The same image is shared across runtimes; each has its own persistent directory and authentication token.

Omitted options preserve existing Docker settings. Reconfiguration is rejected while jobs or managed orders are active. See Independent Runtimes for two-user setup, PID-limit semantics, storage paths, and isolation boundaries.

For Python environments, see Python V2 with Docker.

On this page