Skip to content

Publish the afmotion image and pull from docker hub, and add failure reporting - #95

Merged
avhekkink merged 7 commits into
plugin/atrailstrainmotionfrom
plugin/atrialstrainmotion-update-DockerAtrialStrainMotion
Sep 3, 2026
Merged

Publish the afmotion image and pull from docker hub, and add failure reporting#95
avhekkink merged 7 commits into
plugin/atrailstrainmotionfrom
plugin/atrialstrainmotion-update-DockerAtrialStrainMotion

Conversation

@avhekkink

Copy link
Copy Markdown
Collaborator

Published the afmotion image as cemrg/afmotion:1.0 on Docker Hub and pointed the code at it. Also added an output to check for every step so that a step no longer falsely reports success when nothing has been written.

Additions

  • RunAndCheckDockerAtrialStrainMotionSubcommand runs one afmotion subcommand and checks it.
    It replaces the per-step ExecuteTouch and DockerAtrialStrainMotion pairs, and names the step
    and the missing file in a warning dialogue.

  • SetDockerImageAfmotion names cemrg/afmotion:1.0. afmotion was a bare local image name,
    so the pipeline ran on one machine. The image is now on Docker Hub, public — the September 2024
    build published without a change, digest sha256:6574a5bc…ade70c, 22 layers. A rebuild needs a
    VTK 9.3 source tree, and the tag the author used isn't recorded anywhere. Will look into this as a separate piece of work.

Edits

  • DockerAtrialStrainMotion returns a verdict. It takes expectedOutput instead of returning
    void, runs the container as the host user, and reads the image name from GetDockerImage.

  • GetDockerArguments now passes --workdir=/data, and this repairs UAC Stage 1. It passed no
    working directory before, so each container used the one it declares. cemrg/uac declares
    WorkingDir=/code, which root owns. Once PR Run the Docker containers as the host user #94 added --user, the host user could no longer
    write there, and read_array_fiber writes a temporary file by a relative path — so Stage 1 raised
    PermissionError and died before it wrote LSbc1.vtx. The container exited 0 regardless, so step
    10 reported four missing outputs and no reason. --workdir=/data points the working directory at
    the mount, which is what GetOpenCarpDockerCoreArguments already does with --workdir=/shared.

  • Nine ExecuteTouch calls are gone, across AutoLandMark, UAC_Stage2, CreateModel,
    Registration, GenerateCellAreaStrains and JacobianThreshold. A pre-created empty file made
    the check pass on a step that wrote nothing; --user removes the reason those calls existed.

  • CreateModel and Registration stop at the first failure. Each subcommand reads what the one
    before it wrote. Two checks can still pass on a partial run — generateCellAreaStrains and
    calcFiberStrains loop in bash with no set -e — and a comment marks that limit.

Impacted areas

Area Files
Atrial Strain Motion plugin AtrialStrainMotionView.{h,cpp}
CemrgCommandLine (shared module) CemrgCommandLine.{h,cpp}

GetDockerArguments has four callers. Three run cemrg/uac and all gain the working-directory fix;
DockerCctaMultilabelSegmentation runs cemrg/ccta, which already declares WorkingDir=/data, so
nothing changes there. The Atrial Fibres plugin calls two of the three, so it had the same UAC
Stage 1 failure and gets the same fix. It is not re-run on this branch.

Testing

Verified on V-0004 and on the 2024 V-0005 regression fixture:

  • Steps 1 to 9 pass on V-0004. UAC Stage 1 now writes its five .vtx files, owned by the host
    user — it failed before the working-directory fix.
  • Step 9 runs against the published image through the panel, with afmotion:latest removed first so
    only cemrg/afmotion:1.0 could serve it.
  • autoLM reproduces the 2024 reference after a fresh docker pull, md5
    14a5ed485da22b3e6a20009a26db8c54.
  • MitkCemrgAppModule compiles and links.

Not verified:

  • Steps 10 and 11 fail, and this branch does not cause it. openCARP rejects ellip_use_pt and
    parab_use_pt. docker.opencarp.org/opencarp/opencarp:latest is a development build, and
    openCARP removed both parameters after release v19.0. The same command fails as root.
  • Steps 12 to 20, because step 11 blocks them.
  • The Atrial Fibres plugin, after the shared GetDockerArguments change.
  • Windows. GetDockerUserArguments returns nothing there and ExecuteTouch was already a no-op, so
    the checks behave differently by platform.

avhekkink and others added 3 commits August 28, 2026 17:08
…off of local docker image. Will push image to docker hub in the next phase
The plugin used the bare image name "afmotion". Docker resolves that name only
against a local image, so the pipeline ran on one machine.

The image is now on Docker Hub as cemrg/afmotion:1.0. It is the September 2024
build, published without a change: manifest digest
sha256:6574a5bc4f79bb221ac5bd1c8cd3132abf05b626f4c04c6d444c3c1c64ade70c,
7,224,854,415 bytes, 22 layers.

SetDockerImageAfmotion names the tag, and takes a tag argument for a later
build. DockerAtrialStrainMotion reads the name from GetDockerImage(), so the
image appears once. The mount and the positional host path do not change.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018DeTRpUD2TQPdHo5zWxwKg
@avhekkink
avhekkink requested a review from alonsoJASL September 1, 2026 11:41
@avhekkink
avhekkink marked this pull request as ready for review September 1, 2026 11:53

@alonsoJASL alonsoJASL left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just help me with that one comment on the line in the plugin's cpp:

class CemrgCommandLinel 

Otherwise it's ready.

avhekkink and others added 3 commits September 2, 2026 16:51
Step 10 ran two openCARP Laplace solves and reported success without
doing them. Step 11 then failed, because the field step 10 must write
was absent. Three defects composed.

Pin the openCARP image to v19-0. Release v19.0 is the last one that
declares ellip_use_pt and parab_use_pt. The latest tag is a development
build from after their removal, and it rejects both parameters.

Skip a PETSc option file that is not in the mount. openCARP stops with
a segmentation fault when it cannot read an option file. Without the
flag it uses its own solver settings, which match the settings in
amg_cg_opts.

Name phie.igb in OpenCarpDocker, and check the fields in UAC_Stage1 and
UAC_Stage2. The check tested the output directory, which OpenCarpDocker
creates itself, so every openCARP failure reported as a success.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013cT5BGXcsgwFczMGccPwsL
…on' into plugin/atrialstrainmotion-fix-step-10-and-11-UAC

@alonsoJASL alonsoJASL left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Go ahead and merge

…tion-fix-step-10-and-11-UAC

Pin openCARP image to v19.0 and add PETSc option file fallback to unblock steps 10 and 11
@avhekkink
avhekkink merged commit bb8a0c0 into plugin/atrailstrainmotion Sep 3, 2026
@avhekkink
avhekkink deleted the plugin/atrialstrainmotion-update-DockerAtrialStrainMotion branch September 3, 2026 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants