-
Notifications
You must be signed in to change notification settings - Fork 1
/
script.sh
36 lines (32 loc) · 975 Bytes
/
script.sh
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
set -e
USER=$(whoami)
echo $USER
# sudo apt-get update -y
# sudo apt-get install -y sudo pdsh git ssh
sudo chown $USER:$USER ~/.ssh/config
echo ' StrictHostKeyChecking no' >> ~/.ssh/config
echo ' ServerAliveInterval 20' >> ~/.ssh/config
echo ' TCPKeepAlive no' >> ~/.ssh/config
sudo mkdir -p /run/sshd
sudo /usr/sbin/sshd
sudo rm -rf /job
sudo mkdir -p /job ~/.ssh
sudo chown $USER:$USER /job
sudo chown -R $USER:$USER ~/.ssh
sudo chown $USER:$USER ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys
chmod 700 ~/.ssh
echo 'export LC_ALL=C.UTF-8' >> ~/.bashrc
echo 'export LANG=C.UTF-8' >> ~/.bashrc
cd ~
git clone https://github.com/EleutherAI/gpt-neox.git
cd ~/gpt-neox && sudo python ~/gpt-neox/megatron/fused_kernels/setup.py install
# Start SSH service
service ssh start
# For EFA
echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH" >> .deepspeed_env
# Loop to prevent pod shutdown
echo '------------------Ready-------------------'
while true; do
sleep 30;
done;