Skip to content

Instantly share code, notes, and snippets.

@chillipeper
Last active February 28, 2021 06:18
Show Gist options
  • Save chillipeper/1b8a321a2f21e8a05e622e98e7c07e62 to your computer and use it in GitHub Desktop.
Save chillipeper/1b8a321a2f21e8a05e622e98e7c07e62 to your computer and use it in GitHub Desktop.
Ubuntu 20.04 Workstation Developer Setup --> Tmux + Vim + Docker | Python & Go
#!/bin/bash
# Update repos
sudo apt update
# Upgrade system to latest packages
sudo apt -y upgrade
# Install ubuntu packages
sudo apt install -y cmake vim git curl tmux pipenv jq
# Packages needed for pyenv
sudo apt install -y python3-bz2file python3-readlike python3-openssl libssl-dev libbz2-dev libreadline-dev libsqlite3-dev \
llvm libncurses5-dev libncursesw5-dev tk-dev liblzma-dev
# Package needed for deoplete plugin in VIM
sudo apt install -y python3-pynvim
# Install Go
sudo apt install -y golang-go golint
# Install nodejs 14.x
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
sudo apt-get install -y nodejs
# Install Yarn
curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update && sudo apt-get install yarn
# Install Docker-CE
sudo apt remove docker docker.io containerd runc
sudo apt install -y apt-transport-https ca-certificates curl gnupg-agent software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt update
sudo apt install -y docker-ce docker-ce-cli containerd.io
# Configure git globally
echo ""
echo "Configuring git globally:"
read -p "User email: " email
[ -z "$email" ] && echo "email can not be empty!!" && exit 1
read -p "User Name: " username
[ -z "$username" ] && echo "username can not be empty" && exit 1
git config --global user.email $email
git config --global user.name username
# Clone TPM for tmux
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
# Create dirs for repos
mkdir -p ~/repos/work
mkdir -p ~/repos/personal
# Install dotfiles
cd ~/repos/personal
git clone https://github.com/chillipeper/dotfiles.git
cd dotfiles
pipenv install --dev
pipenv run python ./install.py
# Install jupyter-lab
mkdir -p ~/repos/personal/jupyterlab
cd ~/repos/personal/jupyterlab
pipenv install jupyterlab
# Install pyenv
git clone https://github.com/pyenv/pyenv.git ~/.pyenv
# Install specific python versions
$HOME/.pyenv/bin/pyenv install 3.9
$HOME/.pyenv/bin/pyenv install 3.7
$HOME/.pyenv/bin/pyenv install 3.6
# Remove packages that are no longer needed
sudo apt autoremove -y
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment