"vscode:/vscode.git/clone" did not exist on "e4320fb4f4b23bb5760e6f33f3cb7f1e50ad9276"
ds_ssh 438 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/bash

# Copyright 2020 The Microsoft DeepSpeed Team

command -v pdsh
if [ $? != 0 ]; then
    echo "Cannot find pdsh, please install via 'apt-get install -y pdsh'"
    exit 1
fi

hostfile=/job/hostfile

if [ -f $hostfile ]; then
    hosts=`cat $hostfile | awk '{print $1}' | paste -sd "," -`
    export PDSH_RCMD_TYPE=ssh
    pdsh -w ${hosts} $@
else
    echo "Missing hostfile at ${hostfile}, executing command locally"
    $@
fi