export -f only exports the function definition, not the variables it references. DATASET_PATH was empty inside timeout bash -c subshells, causing docker run -v ::ro invalid spec even after the dynamic vol_args fix. Add explicit export after sourcing config.env.