-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcolab_env_init.sh
More file actions
30 lines (23 loc) · 1.14 KB
/
Copy pathcolab_env_init.sh
File metadata and controls
30 lines (23 loc) · 1.14 KB
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
#!/bin/bash
COLAB_DIR="/content/drive/My Drive/Research/colab"
export PATH="/usr/local/sbin:/usr/sbin:/sbin:$PATH"
mkdir -p "$COLAB_DIR/.ssh" ~/.ssh
mount -o bind "$COLAB_DIR/.ssh" ~/.ssh
install "$COLAB_DIR/python3-tf1" /usr/local/bin/
echo "Asia/Hong_Kong" | tee /etc/timezone
ln -s -f /usr/share/zoneinfo/Asia/Hong_Kong /etc/localtime
/usr/sbin/dpkg-reconfigure --frontend noninteractive tzdata
apt-get install -y rsyslog squashfs-tools >/dev/null
/etc/init.d/rsyslog start
echo "deb [trusted=yes] http://ftp.us.debian.org/debian/ buster main contrib non-free" >>/etc/apt/sources.list
apt-get update >/dev/null
apt-get install -y openssh-server openssh-client openssh-sftp-server >/dev/null
sed -i 's/UsePAM yes/UsePAM no/g' /etc/ssh/sshd_config
/etc/init.d/ssh start
autossh -M 0 -f -- -T -N -g -R 3900:localhost:22 -oControlPath=none -oServerAliveInterval=30 -oServerAliveCountMax=3 -oTCPKeepAlive=yes -oExitOnForwardFailure=yes -p 622 wenri@tly.wenri.org
mkdir -p /opt/bin/cache
cd /opt/bin/cache || exit
#unsquashfs -d partnet_mask "$COLAB_DIR/partnet_mask.sqsh"
#7z x "$COLAB_DIR/partnet_mask/mask.7z.001"
#tar xf "$COLAB_DIR/partnet_mask.tar"
exit 0