Last active
April 24, 2024 19:39
-
-
Save XiangpengHao/377fab6077e18cbaa06d911841b4914a to your computer and use it in GitHub Desktop.
CloudLab setup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo apt-get update | |
sudo apt-get upgrade -y | |
sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common byobu \ | |
fish numactl libssl-dev pkg-config clang llvm-dev vim ipython3 curl git git-lfs \ | |
htop shellcheck valgrind cpufrequtils cloc python3-pip cmake sysstat pre-commit | |
byobu-enable | |
# Add the core dump settings to /etc/security/limits.conf | |
echo "* soft core unlimited" | sudo tee -a /etc/security/limits.conf > /dev/null | |
echo "* hard core unlimited" | sudo tee -a /etc/security/limits.conf > /dev/null | |
# Add the core dump naming pattern to /etc/sysctl.conf | |
echo "kernel.core_pattern=/tmp/core.%e.%p" | sudo tee -a /etc/sysctl.conf > /dev/null | |
# Resize sda3 partition | |
sudo parted --script /dev/sda resizepart 3 100% | |
curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain nightly -y | |
source "$HOME/.cargo/env" | |
cargo install cargo-edit | |
cargo install tokei | |
curl -L https://nixos.org/nix/install | sh -s -- --daemon | |
curl -LsSf https://astral.sh/uv/install.sh | sh | |
git config --global user.name "Xiangpeng Hao" | |
git config --global user.email [email protected] | |
curl -fsSL https://get.docker.com -o get-docker.sh | |
bash get-docker.sh | |
sudo usermod -aG docker $USER | |
curl -L https://get.oh-my.fish > install | |
fish install --path=~/.local/share/omf --config=~/.config/omf | |
omf install bobthefish | |
sudo mkdir -p -m 755 /etc/apt/keyrings && wget -qO- https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null \ | |
&& sudo chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg \ | |
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null \ | |
&& sudo apt update \ | |
&& sudo apt install gh -y | |
gh auth login -h GitHub.com -p HTTPS | |
gh auth setup-git | |
sudo sysctl -p |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment