Hi all,
Right before the job starts, I would like to create some folders on the execution node (named in a particular way using amongst other, Owner, ClusterID and JobID) and make them available inside the job's container. I used HOOK_PRE to create the folders but then how can I add a new DOCKER_VOLUME_DIR_ from within the HOOK_PRE script? --
On 7/8/2026 8:17 AM, CMV wrote:
Hi all,
Right before the job starts, I would like to create some folders on the execution node (named in a particular way using amongst other, Owner, ClusterID and JobID) and make them available inside the job's container. I used HOOK_PRE to create the folders but then how can I add a new DOCKER_VOLUME_DIR_ from within the HOOK_PRE script? --
Note that the stdout from this hook is a set of classad attributes (key-value pairs) that will be inserted in the copy of the job classad at the EP.
cat <<EOF
Hook_SetupTimestamp = $(date +%s)
NewPath = '/some/path'
EOF
exit 0So your prepare job hook could output a job attribute that says what should be mounted, then you would reference this attribute(s) in EP config knob DOCKER_VOLUME_DIR_xxx_MOUNT_IF. This config knob is a classad expression (so you can use string manipulation, regular expressions, whatever) that can reference attributes in the job classad to state what docker mounts should happen. For an example see:
https://htcondor.readthedocs.io/en/latest/admin-manual/ep-policy-configuration.html#docker-universe
So your prepare job hook could output a job attribute that says what should be mounted, then you would reference this attribute(s) in EP config knob DOCKER_VOLUME_DIR_xxx_MOUNT_IF. This config knob is a classad expression (so you can use string manipulation, regular expressions, whatever) that can reference attributes in the job classad to state what docker mounts should happen. For an example see:
https://htcondor.readthedocs.io/en/latest/admin-manual/ep-policy-configuration.html#docker-universe