Last active
December 16, 2023 10:51
-
-
Save lucataco/331cbad774d261b59ddd42dd2d1dc017 to your computer and use it in GitHub Desktop.
Clean Ubuntu Install - Machine Learning setup
This file contains 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
# Install Ubuntu 22.04 | |
sudo apt-get update | |
sudo apt-get upgrade -y | |
# Install ssh, curl, git, htop | |
sudo apt install openssh-server | |
sudo apt install curl git htop zstd | |
# Install CUDA toolkit 12.1 drivers | |
https://developer.nvidia.com/cuda-downloads | |
# Install miniconda | |
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh | |
chmod +x Miniconda3-latest-Linux-x86_64.sh | |
./Miniconda3-latest-Linux-x86_64.sh | |
# Install docker & docker compose | |
sudo apt install apt-transport-https ca-certificates curl software-properties-common | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg | |
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null | |
sudo apt update | |
apt-cache policy docker-ce | |
sudo apt install docker-ce | |
sudo usermod -aG docker $USER | |
# Nvidia toolkit | |
distribution=$(. /etc/os-release;echo $ID$VERSION_ID) \ | |
&& curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \ | |
&& curl -s -L https://nvidia.github.io/libnvidia-container/$distribution/libnvidia-container.list | \ | |
sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \ | |
sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list | |
sudo apt-get update | |
sudo apt-get install -y nvidia-container-toolkit | |
sudo nvidia-ctk runtime configure --runtime=docker | |
sudo systemctl restart docker | |
# Install cog | |
sudo curl -o /usr/local/bin/cog -L "https://github.com/replicate/cog/releases/latest/download/cog_$(uname -s)_$(uname -m)" | |
sudo chmod +x /usr/local/bin/cog | |
# Install zsh | |
sudo apt install zsh | |
sh -c "$(wget https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)" | |
cd .oh-my-zsh/plugins | |
git clone https://github.com/zsh-users/zsh-autosuggestions | |
git clone https://github.com/zsh-users/zsh-syntax-highlighting | |
# Install nvm | |
curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash | |
nvm install --lts | |
# Install nvitop | |
conda install -c conda-forge nvitop | |
# Install pytorch | |
conda install pytorch torchvision torchaudio pytorch-cuda=12.1 -c pytorch -c nvidia | |
# Test - download and run Fauxpilot | |
git clone https://github.com/fauxpilot/fauxpilot.git |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment