|
|
@@ -239,8 +239,8 @@ pub fn mirror_cmd(local_dir: &str, remote_pkg: &str) -> String {
|
|
|
// is already the package directory itself.
|
|
|
format!(
|
|
|
"set -e; src=$(dirname {pkg}); dst={dir}; \
|
|
|
- mkdir -p \"$dst\"; \
|
|
|
if [ \"$src\" = \"$dst\" ]; then echo {pkg}; exit 0; fi; \
|
|
|
+ rm -rf \"$dst\"; mkdir -p \"$dst\"; \
|
|
|
cp -a \"$src\"/. \"$dst\"/; \
|
|
|
echo \"$dst/$(basename {pkg})\""
|
|
|
)
|
|
|
@@ -299,7 +299,7 @@ pub async fn serve(
|
|
|
info!("FLARE agents ok on {} node(s)", cluster.nodes.len());
|
|
|
}
|
|
|
let dl = download_cmd(config, recipe)?;
|
|
|
- let package = crate::ssh::run_ssh(config, controller, dl, dry_run).await?;
|
|
|
+ let package = crate::ssh::run_ssh_long_running(config, controller, dl, dry_run).await?;
|
|
|
let mut package = parse_package_path(&package).unwrap_or_default();
|
|
|
// A cached download prints only "Resolved package: … / model.safetensors"
|
|
|
// and no final path; resolve the default prepared model from Flare's
|
|
|
@@ -332,7 +332,7 @@ pub async fn serve(
|
|
|
if let Some(dir) = local_dir_for(config, &cluster.name) {
|
|
|
let dir = dir.replace('~', "$HOME");
|
|
|
let cmd = mirror_cmd(&dir, &package);
|
|
|
- let out = crate::ssh::run_ssh(config, controller, cmd, dry_run).await?;
|
|
|
+ let out = crate::ssh::run_ssh_long_running(config, controller, cmd, dry_run).await?;
|
|
|
if !dry_run {
|
|
|
let local = out.lines().last().unwrap_or_default().trim().to_string();
|
|
|
if local.is_empty() {
|
|
|
@@ -343,7 +343,7 @@ pub async fn serve(
|
|
|
}
|
|
|
let orbit_name = orbit_node_name(config, &cluster.name, controller);
|
|
|
let run = run_cmd(config, recipe, &cluster.name, &orbit, &orbit_name, &package)?;
|
|
|
- crate::ssh::run_ssh(config, controller, run.clone(), dry_run).await?;
|
|
|
+ crate::ssh::run_ssh_long_running(config, controller, run.clone(), dry_run).await?;
|
|
|
if dry_run {
|
|
|
println!(" [dry-run] {}: {run}", controller.name);
|
|
|
} else {
|