File size: 1,097 Bytes
14bd491
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/bash

ssh jump-eu.tiktok-row.org
curl -o setup_env_huggingface.sh -L https://gist.github.com/tensorboy/25d0439c5c3b83cfcc9ff6e50bca8dff/raw
# List of IP addresses
hosts=("10.100.193.14" #done
    "10.100.193.16" #done
    "10.100.193.29" #done
    "10.100.193.37" #done
    "10.100.193.41" #done
    "10.100.193.75" #done
    "10.100.193.84" #done
    "10.100.193.96" #done
    "10.100.193.97" #done
    "10.100.193.111" #done
    "10.100.193.128" #done
    "10.100.193.137" #done
    "10.100.193.158" #done
    "10.100.193.164" #done
    "10.100.193.172" #done
    "10.100.193.181" #done
    "10.100.193.192" #done
    "10.100.193.198"
    "10.100.193.232"
    "10.100.193.233"
    "10.100.193.253"
    )

# SSH into the jump server and execute commands on each remote host
for host in "${hosts[@]}"; do
     "ssh root@$host 'bash -s' <<EOF
    # Commands to execute on the remote host
    echo 'Hello from $host'
    sudo apt update
    sudo apt install -y wget curl
    curl -o setup_env_huggingface.sh -L https://gist.github.com/tensorboy/25d0439c5c3b83cfcc9ff6e50bca8dff/raw
EOF

done