Add --mkpath to rsync args to handle the case where .cache/huggingface/hub doesn't already exist on the destination.

This commit is contained in:
J.J. Hoesing
2026-02-26 03:12:34 -08:00
parent dbd3d21fb8
commit 358b4795b6

View File

@@ -42,7 +42,7 @@ copy_model_to_host() {
local host_copy_start host_copy_end host_copy_time local host_copy_start host_copy_end host_copy_time
host_copy_start=$(date +%s) host_copy_start=$(date +%s)
if rsync -av --progress "$model_dir" "${SSH_USER}@${host}:$HUB_PATH/"; then if rsync -av --mkpath --progress "$model_dir" "${SSH_USER}@${host}:$HUB_PATH/"; then
host_copy_end=$(date +%s) host_copy_end=$(date +%s)
host_copy_time=$((host_copy_end - host_copy_start)) host_copy_time=$((host_copy_end - host_copy_start))
printf "Copy to %s completed in %02d:%02d:%02d\n" "$host" $((host_copy_time/3600)) $((host_copy_time%3600/60)) $((host_copy_time%60)) printf "Copy to %s completed in %02d:%02d:%02d\n" "$host" $((host_copy_time/3600)) $((host_copy_time%3600/60)) $((host_copy_time%60))