|
@@ -82,17 +82,6 @@ pub async fn serve(
|
|
|
)
|
|
)
|
|
|
.await?;
|
|
.await?;
|
|
|
|
|
|
|
|
- // Drop page cache on all nodes before starting.
|
|
|
|
|
- if config.drop_caches && !opts.dry_run {
|
|
|
|
|
- info!("Dropping page cache on all nodes...");
|
|
|
|
|
- for node in &cluster.nodes {
|
|
|
|
|
- let cmd = "echo 3 | sudo tee /proc/sys/vm/drop_caches".to_string();
|
|
|
|
|
- if let Err(e) = run_ssh(config, node, cmd, false).await {
|
|
|
|
|
- warn!("drop_caches on {} failed: {}", node.name, e);
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
use self::sync::sync_image_to_nodes;
|
|
use self::sync::sync_image_to_nodes;
|
|
|
|
|
|
|
|
// Build image on specified node if not found on any cluster node.
|
|
// Build image on specified node if not found on any cluster node.
|
|
@@ -168,6 +157,19 @@ pub async fn serve(
|
|
|
)
|
|
)
|
|
|
.await?;
|
|
.await?;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ // Drop page cache on all nodes right before starting containers.
|
|
|
|
|
+ // Must run after image sync (docker load fills page cache).
|
|
|
|
|
+ if config.drop_caches && !opts.dry_run {
|
|
|
|
|
+ info!("Dropping page cache on all nodes...");
|
|
|
|
|
+ for node in &cluster.nodes {
|
|
|
|
|
+ let cmd = "echo 3 | sudo tee /proc/sys/vm/drop_caches".to_string();
|
|
|
|
|
+ if let Err(e) = run_ssh(config, node, cmd, false).await {
|
|
|
|
|
+ warn!("drop_caches on {} failed: {}", node.name, e);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
let cache_dir = config.resolved_hf_cache_dir();
|
|
let cache_dir = config.resolved_hf_cache_dir();
|
|
|
start_cluster(
|
|
start_cluster(
|
|
|
config,
|
|
config,
|