Files
ai-mouse/bootstrap.sh

44 lines
1.3 KiB
Bash
Raw Normal View History

2025-01-28 22:50:43 +00:00
# Force the locale
echo "LC_ALL=en_GB.UTF-8" >> /etc/default/locale
locale-gen en_US.UTF-8
# Set the hostname
echo "scarif.space" > /etc/hostname
source /opt/mouse/.env
echo "------- Generating system users -------"
useradd -m -p $(echo $USER_PASSWORD | openssl passwd -1 -stdin) chris
echo "chris ALL=(ALL) ALL" >> /etc/sudoers
passwd -l root
echo "------- Installing packages -------"
apt-get -y update
apt-get -y tmux htop docker docker-compose zsh
echo "------- Setting up SSH -------"
2025-01-29 15:43:29 +00:00
mkdir -p /home/chris/.ssh
cp /root/.ssh/authorized_keys /home/chris/.ssh/authorized_keys
2025-01-28 22:50:43 +00:00
rm /etc/ssh/sshd_config
ln -s /opt/mouse/sshd_config /etc/ssh/sshd_config
echo "Welcome to The Mouse!" > /etc/motd
systemctl restart sshd
echo "------- Setting up firewall -------"
ufw default deny incoming
ufw default allow outgoing
ufw allow 629
ufw --force enable
2025-01-29 15:42:15 +00:00
#echo "------- Install Cuda -------"
#apt-key del 7fa2af80
#wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu24-4/x86_64/cuda-keyring_1.1-1_all.deb
#sudo dpkg -i cuda-keyring_1.1-1_all.deb
#sudo apt-get update
#sudo apt-get install cuda-toolkit
#sudo apt-get install nvidia-gds
2025-01-28 22:50:43 +00:00
# echo "------- Starting docker -------"
# systemctl enable docker --now
# docker-compose -f "/opt/mouse/docker-compose.yml" --env-file "/opt/mouse/.env" up -d