File tree Expand file tree Collapse file tree
.buildkite/scripts/hardware_ci Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -387,6 +387,7 @@ initialize_native_environment() {
387387 local job_id=" ${BUILDKITE_JOB_ID:- ${BUILDKITE_PARALLEL_JOB:- local} } "
388388 local job_id_suffix=" "
389389 local native_root=" "
390+ local hf_fstype=" "
390391 local hf_mount=" "
391392
392393 if [[ " $( id -u) " -ne 0 ]]; then
@@ -436,6 +437,18 @@ initialize_native_environment() {
436437 return 1
437438 fi
438439 fi
440+
441+ if command -v findmnt > /dev/null 2>&1 ; then
442+ hf_fstype=$( findmnt -n -T " ${HF_HOME} " -o FSTYPE 2> /dev/null || true)
443+ fi
444+ if [[ " ${hf_fstype} " == nfs || " ${hf_fstype} " == nfs4 ]]; then
445+ # Keep hf-xet state local and avoid vectored writes on shared NFS.
446+ export HF_XET_CACHE=" ${native_root} /cache/hf-xet"
447+ export HF_XET_HIGH_PERFORMANCE=0
448+ export HF_XET_RECONSTRUCTION_USE_VECTORED_WRITE=0
449+ mkdir -p " ${HF_XET_CACHE} " || return 1
450+ echo " Configured hf-xet for shared ${hf_fstype} cache at ${HF_HOME} "
451+ fi
439452}
440453
441454run_native_preflight () {
You can’t perform that action at this time.
0 commit comments