Skip to content

Commit d8b7a0a

Browse files
committed
fix
Signed-off-by: Hemil Desai <[email protected]>
1 parent 3ab0ca9 commit d8b7a0a

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

nemo_run/run/ray/templates/ray_enroot.sub.j2

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -473,6 +473,11 @@ else
473473
# Args 1-N launch on worker nodes (nodes 1 through N-1)
474474
# Optional: set COMMAND='...' to run non-interactively instead of opening an interactive shell
475475
476+
# Helper to get container PID
477+
get_container_pid() {
478+
local node=\$1
479+
srun --overlap --nodes=1 -w "\$node" --jobid $SLURM_JOB_ID bash -c "enroot list -f | awk 'NR>1 && \\\$2 ~ /^[0-9]+\\\$/ {print \\\$2; exit}'"
480+
}
476481
477482
WORKER_NUM=\\\${1:-}
478483
if [[ -z "\\\$WORKER_NUM" ]]; then

test/core/execution/artifacts/expected_ray_cluster_enroot.sub

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,11 @@ else
449449
# Args 1-N launch on worker nodes (nodes 1 through N-1)
450450
# Optional: set COMMAND='...' to run non-interactively instead of opening an interactive shell
451451
452+
# Helper to get container PID
453+
get_container_pid() {
454+
local node=\$1
455+
srun --overlap --nodes=1 -w "\$node" --jobid $SLURM_JOB_ID bash -c "enroot list -f | awk 'NR>1 && \\\$2 ~ /^[0-9]+\\\$/ {print \\\$2; exit}'"
456+
}
452457
453458
WORKER_NUM=\\\${1:-}
454459
if [[ -z "\\\$WORKER_NUM" ]]; then
@@ -482,4 +487,4 @@ EOF
482487
echo " bash $CLUSTER_DIR/scripts/${SLURM_JOB_ID}-attach.sh 1 # to attach to worker 1"
483488
echo " bash $CLUSTER_DIR/scripts/${SLURM_JOB_ID}-attach.sh 2 # to attach to worker 2, etc."
484489
sleep infinity
485-
fi
490+
fi

0 commit comments

Comments
 (0)