This container packages the existing Hall C mc-single-arm program with a small
runner that keeps inputs and outputs in predictable container paths. The
simulation code and existing Makefiles are unchanged.
Container images are published from git tags. Pick the tag you want from the GitHub tags page, then use that same tag as the container version:
https://github.com/JeffersonLab/mc-single-arm/tags
Examples below use:
TAG=<tag_name>
IMAGE=ghcr.io/jeffersonlab/mc-single-arm:$TAGdocker pull "$IMAGE"
docker run --rm "$IMAGE" mc-single-arm-api describe
docker run --rm "$IMAGE" mc-single-arm-api describe --format json
docker run --rm "$IMAGE" mc-single-arm-api describe --format yamlThe default text output lists input sections, keys, labels, defaults, and data
types. It also lists bundled example input files. For the full input format,
inspect the files in infiles/ or the bundled container path
/opt/mc-single-arm/share/infiles.
Create a writable output area on the host:
mkdir -p mc-dataMount your input file into the container and pass its container-local path:
docker run --rm \
-v "$PWD/mc-data:/data" \
-v "$PWD/my_run.inp:/input/my_run.inp:ro" \
"$IMAGE" \
mc-single-arm-run --input /input/my_run.inp--input must be a path that exists inside the container. The runner copies
that file to /data/infiles/<basename>.inp before launching mc_single_arm.
Outputs are written under the mounted /data directory:
runout/<basename>.outoutfiles/<basename>.outworksim/<basename>.root
To run one of the bundled examples by name:
docker run --rm \
-v "$PWD/mc-data:/data" \
"$IMAGE" \
mc-single-arm-run --basename shms_20deg_3gev_10cmtarg_cryo17If /data/infiles/<basename>.inp is missing and the basename matches a bundled
example, the runner copies that example from
/opt/mc-single-arm/share/infiles.
The program chooses its random seed from the clock and prints the seed in
runout/<basename>.out. This container wrapper does not provide a seed option.
The runner checks for existing artifacts before writing:
runout/<basename>.outoutfiles/<basename>.outworksim/<basename>.rootworksim/<basename>.bin
In an interactive terminal, it prompts before overwriting. In noninteractive
runs, it refuses to overwrite unless --force is supplied.
On JLab farm nodes, or any computer with access to the JLab CVMFS mount, tagged SIF images are available here:
TAG=<tag_name>
SIF=/cvmfs/oasis.opensciencegrid.org/jlab/hallc/mc-single-arm/mc-single-arm-$TAG.sifRun with a mounted data directory and an input file visible inside the container:
mkdir -p mc-data
apptainer exec \
--bind "$PWD/mc-data:/data" \
--bind "$PWD/my_run.inp:/input/my_run.inp:ro" \
"$SIF" \
mc-single-arm-run --input /input/my_run.inpRun a bundled example:
apptainer exec --bind "$PWD/mc-data:/data" "$SIF" \
mc-single-arm-run --basename shms_20deg_3gev_10cmtarg_cryo17Most users should run a tagged image instead of building locally. To test local container changes:
docker build -f Containerfile -t mc-single-arm:local .
docker run --rm mc-single-arm:local mc-single-arm-run --helpTo build a local Apptainer image from that Docker image:
apptainer build --force mc-single-arm.sif docker-daemon://mc-single-arm:local