Independent Runtimes
Run separate Docker daemons with independent storage, credentials, ports, and resource limits.
Give each user their own runtime. Each can run multiple jobs with separate credentials and storage.
Create Runtimes
Start Docker, then give each runtime a unique home, container name, and port:
MLAB_HOME="$HOME/mlab-runtimes/alice" mlab daemon backend docker \
--container mlab-alice --port 48001 \
--cpus 1 --memory-mib 512 --pids-limit 256
MLAB_HOME="$HOME/mlab-runtimes/bob" mlab daemon backend docker \
--container mlab-bob --port 48002 \
--cpus 1 --memory-mib 512 --pids-limit 256This starts the daemons, not trades. Both reuse the same image.
Use a Runtime
Select Alice's runtime for your current terminal:
export MLAB_HOME="$HOME/mlab-runtimes/alice"
mlab daemon status
mlab auth status
mlab strategy jobs
mlab daemon events --limit 20Use this same home when authenticating and deploying jobs. Credentials are not copied from other homes.
Stop only Alice's daemon:
mlab daemon stopRun unset MLAB_HOME to return to the default ~/.market-lab home.
Adjust Limits
Limits apply to all jobs in the container combined:
| Flag | Controls |
|---|---|
--cpus 1 | One CPU's worth of execution time, not a reserved core |
--memory-mib 512 | 512 MiB of memory, with swap disabled |
--pids-limit 256 | Up to 256 processes and OS threads, not 256 jobs |
Stop active jobs and managed orders before changing settings:
MLAB_HOME="$HOME/mlab-runtimes/alice" mlab daemon backend docker \
--memory-mib 1024Other settings stay unchanged. The container is recreated; its stored data remains.
Check usage:
docker stats --no-stream mlab-alice mlab-bobThese limits do not restrict disk usage or outgoing network access. For setup errors, see Troubleshooting.