Environment variables#

Every user-tunable PlayMolecule setting is a PM_* environment variable. They are read once at import time and never re-read after; change them, then re-import (or restart your Python process).

Registry and executor#

PM_REGISTRIES

Default: docker://europe-southwest1-docker.pkg.dev/repositories-368911

Comma-separated registries, in priority order. Each entry must start with docker://, http://, or local:. local: is for developers iterating on their own app manifests on disk; most users want docker:// (the default). Set to none to disable defaults entirely.

PM_EXECUTOR

Default: local

Where jobs run. Either local or an http:// URL pointing at a PlayMolecule HTTP backend.

PM_NO_DEFAULT_REGISTRIES

Default: 0

When 1, skip the default Acellera registry. Use this if you only want the registries you set in PM_REGISTRIES and nothing else.

Container runtime#

PM_RUNTIME

Default: docker

docker or apptainer: which container engine to invoke for local execution.

PM_SIF_CACHE_DIR

Default: ~/.cache/playmolecule/apptainer/

Where Apptainer SIF files are cached. Move to shared storage for multi-user / multi-node installs (see Install apps for a cluster).

Job submission#

PM_QUEUE_CONFIG

Default: unset

JSON dict. When set, ed.run() with no arguments uses it. Expected keys: queue, cpu_partition, gpu_partition, plus any extra forwarded to run() as SLURM kwargs.

PM_NCPU

Default: unset

Number of CPUs the app may use. The generated run.sh caps the container at this many cores (Docker only — Apptainer already inherits the job’s cgroup) and passes the value inside, where apps size their native thread pools from it. Unset means one thread, whatever the machine or the allocation offers, so an app never oversubscribes by accident.

You rarely set this yourself: PlayMolecule sets it from ncpu when it launches a job — in the subprocess environment for a local run, and as an export in the sbatch script (via the SLURM queue’s prerun) for run(queue="slurm"). ncpu therefore does double duty: it sizes the SLURM allocation and tells the app how many threads to start.

Against a server backend, ncpu is sent with the job and the server applies it to whichever queue it uses, bounded by the largest value the job’s priority tier permits — a request over that cap runs at the cap rather than being refused.

A value above the job’s real allocation is clamped down to it. Set it by hand to claim a smaller share than a machine has — a Celery worker holding one of several slots on a node, say — and it will be respected. A non-integer or 0 is ignored.

slurm_mps() passes each directory its own per-directory share, not the aggregate its single allocation reserves.

PM_SYMLINK

Default: unset

When set (any value), input files are symlinked into the run directory instead of copied. Faster for large inputs; the run directory becomes non-self-contained (see Pass input files to an app).

PM_BLOCKING

Default: 0

When 1, app calls block until the job reaches COMPLETED or ERROR (HTTP-backend path).

PM_JOB_DIR_PREFIX

Default: ""

Prefix applied to job paths submitted through the HTTP backend.

PM_WORKING_DIR

Default: unset

If set, used as the base for resolving relative paths.

HTTP backend#

PM_BACKEND_HEADERS

Default: {}

JSON dict of extra HTTP headers attached to every backend request.

PM_COOKIE_CACHE_DIR

Default: ~/.cache/playmolecule/cookies/

Where login session cookies are persisted. Override in containerised CI runners where $HOME is ephemeral.

PLAYMOLECULE_EMAIL / PM_EMAIL

Default: unset

Default email for playmolecule login.

PLAYMOLECULE_PASSWORD / PM_PASSWORD

Default: unset

Default password for playmolecule login. Prefer prompting interactively in normal use.

Logging#

PM_LOG_LEVEL

Default: unset

Sets the playmolecule logger to any standard level (DEBUG, INFO, WARNING, ERROR).

PM_QUIET

Default: 0

When 1, convenience alias for PM_LOG_LEVEL=WARNING.

See also#