Module 0 · Reading · about 5 min

The five-minute tour

Why docker compose up stops working on a shared cluster, what you do instead in six steps, and whether this guide is for you.

In this module

Why Compose stops working

On your laptop, docker compose up starts every service of your project. A shared research cluster works differently. It runs no Docker daemon, it gives you no root access (administrator rights), and a scheduler decides what runs, where and for how long. So the same stack has to start another way: from a script that runs inside a block of computer time the scheduler grants you.

The big idea

You ask the scheduler (the program, usually Slurm, that shares out the cluster; see batch scheduler) for a fixed share of one machine for a fixed time. That share is your allocation. When it is granted, one script starts each service inside it, checks that they work, runs the job and cleans up. Everything stops when the allocation ends.

The figure shows the script’s six steps, in order.

One allocation, start to finish
  1. Step 1 Get an allocation The scheduler grants one node for a set time. The script checks its inputs and makes a private job folder (job-scoped scratch).
  2. Step 2 Start coordinator The coordinator starts as its own tracked program (a job step), on local-only access (loopback), and writes its address to a file.
  3. Step 3 Readiness gate Proves the coordinator can serve: the exact expected answer within the time limit (30 seconds by default), or the job stops before any worker starts.
  4. Step 4 Run workers Only now do workers start, each as a job step. The script waits for every worker to finish.
  5. Step 5 Verify results With the coordinator still running, a separate check confirms every result; only a full pass writes the success file.
  6. Step 6 Clean up Cleanup, set up at the start (an EXIT trap), stops every step still running when the script exits, whether it passed or failed.

Temporary job storage (job-scoped scratch) may remain until your center clears it. Copy out what you need before the job ends.

Gate
Is the coordinator answering yet? This belongs to the pattern: keep it, and change only what “ready” means for your service.
Verify
Are the results right? Only your science can say: replace this check with your own.

The six steps in detail

The steps below describe the example script, in plain terms with the technical term in parentheses.

1. Get an allocation

Before the script runs, you submit it to the scheduler and wait your turn. Once it starts, it first checks that the container image and the input file match their recorded checksums. Then it makes a private folder for this job: temporary job storage (job-scoped scratch). The script refuses to reuse a folder that already exists.

2. Start coordinator

The coordinator is the one service that hands out tasks and collects results. The script starts it as a program the scheduler launches and tracks inside your allocation (a job step). The coordinator listens only on local-only access (loopback), on a free port it picks, and writes its address to a file in the job folder.

3. Readiness gate

Before any worker starts, the script waits, for up to 30 seconds by default, for the coordinator to give the exact answer a healthy coordinator gives. An open port is not enough. If the answer never comes, the job stops with a named error and no worker ever starts. This check is the readiness gate; Troubleshooting lists the named errors.

4. Run workers

Now the script starts the workers, each as its own job step. A worker asks the coordinator for a task, does it and sends back the result. The script waits for the workers to finish, not for the coordinator, which keeps running.

5. Verify results

With the coordinator still running, a separate check compares every result with what was expected. Only if all of them pass does the script write the success file, result.json, containing "status": "success". A zero exit code alone is not success. This check is verification.

6. Clean up

At the very start, the script registers a cleanup step that runs last, however the job ends: a normal finish, a failure or the scheduler’s time limit. It asks every program still running to stop, and then forces any that do not after a short grace period (the time-limit path and the forced stop are Designed, not run). The job folder is not deleted. When your center clears it depends on the center, so copy out what you want to keep.

Four ideas that change meaning

Four Compose ideas change meaning on a cluster. Each keeps the same color and shape across this site.

Scroll horizontally to view all table columns.

On your laptop (Compose) On the cluster Plain-language name
a service a program the scheduler launches and tracks inside your allocation job step
healthcheck and depends_on a check that the coordinator can really serve before any worker starts readiness gate
a named volume temporary job storage job-scoped scratch
a published port local-only access, which services use by default loopback

Reaching a service from beyond its node needs access your center approves, such as an SSH tunnel where it allows one.

The gate is not the verifier

A job can pass the gate and still produce wrong answers. Only verification catches that.

Did this really run?

Pages on this site use three labels, and each means one thing.

The example workflow is Tested. The badge on Module 2 opens its test record. Anything this guide describes beyond that, such as other centers, other schedulers or GPUs, is Shim-tested or Designed, not run. What was tested where lists all three.

Who this guide is for

What you should already know

What you need access to

To read: nothing. To run the example: an account on a cluster that uses Slurm and lets you request one node, Apptainer on its compute nodes, and a private folder you can write to for job scratch. Run the example shows how to check each.

How to progress

Read this tour first. Then follow the path in order, or jump to the page that matches your goal.

Key points

Next step

Pick the destination that matches where you are.

Complete the decision exercise

Tick each skill and access item you already have. For any you lack, note the page you will use before you run the example.

Sources and scope

Review source roles and citations
  • Project decision: Audience, assumed skills and a suggested path, so a first-time reader knows whether and how to use the guide. Milestone 1 program review, 2026-08-14

Project-adopted practices and project decisions are not BSSw Fellowship Program requirements.