github.com/filecoin-project/bacalhau@v0.3.23-0.20230228154132-45c989550ace/docs/setup_machine.sh (about) 1 #!/bin/bash 2 THIS_USER="yourusername" 3 THIS_IP="0.0.0.0" 4 5 apt install -y sudo build-essential 6 7 useradd "${THIS_USER}" 8 usermod -a -G sudo "${THIS_USER}" 9 sudo su - "${THIS_USER}" 10 ssh-keygen 11 12 sudo more /etc/sudoers # Just a test to make sure sudoers works 13 14 # Logout 15 # trunk-ignore(shellcheck/SC2029) 16 ssh root@"${THIS_IP}" "cat >> /home/${THIS_USER}/.ssh/authorized_keys" < ~/.ssh/id_rsa.pub 17 18 # Install Docker 19 sudo mkdir -p /etc/apt/keyrings 20 # trunk-ignore(shellcheck/SC2312) 21 echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \ 22 # trunk-ignore(shellcheck/SC2312) 23 $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null 24 sudo usermod -aG docker "${USER}" 25 docker run hello-world 26 27 # Install brew 28 sudo apt-get update 29 # trunk-ignore(shellcheck/SC2312) 30 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" 31 32 # Install go 33 brew install go gcc@5 gcc make hyperfine 34 gh repo clone filecoin-project/bacalhau