diff --git a/benchmarks/multi_node/amd_utils/docker_sg.sh b/benchmarks/multi_node/amd_utils/docker_sg.sh new file mode 100755 index 0000000000..575c6a74a8 --- /dev/null +++ b/benchmarks/multi_node/amd_utils/docker_sg.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash +# Run `docker` under the 'docker' group. +# +# Why: Slurm launches job steps without the user's 'docker' supplementary group +# in the active credential set. The user IS a docker-group member (getent group +# docker lists them) but the group is missing from `id -G` inside the step, so +# the group-owned socket (/var/run/docker.sock, 0660 root:docker) is unreachable +# via a plain `docker` call. `sg docker -c` re-activates the group for this one +# command — no sudo, no password, no persistent host change. +# +# Used by job.slurm's DOCKER_CMD detection as the fallback when plain `docker` +# fails but `sg docker -c 'docker ps'` succeeds. +# +# argv is passed across the `sg` shell hop by NUL-delimited base64 (NOT string +# re-quoting): naive `printf %q` mangles the big multiline `docker run ... bash +# -lc '