I keep breaking and having to reinstall my Ubuntu setup, so I figured I'd make a little document that helps me do that faster.
From a completely fresh install.
First things first.
- Download and install Chrome.
sudo apt update
sudo apt upgrade
sudo apt install curl
sudo apt install vim
sudo apt install git
git config --global user.name "John Doe"
git config --global user.email johndoe@example.com
sudo apt install openssh-server
sudo vim /etc/ssh/ssh_config #and change port
sudo service ssh restart
ssh-keygen -o -f ~/.ssh/id_rsa
cat ~/.ssh/id_rsa.pub
- Paste key into https://gitlab.com/profile/keys or wherever your git host is.
Nvidia driver.
Do this first, if nothing else, so you can stop looking at a 640x480 screen.
Install nvidia, cuda, and cudnn based on this.
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt install nvidia-driver-410
sudo apt-mark hold nvidia-driver-410
sudo reboot
Cuda 10
wget https://developer.nvidia.com/compute/cuda/10.0/Prod/local_installers/cuda-repo-ubuntu1804-10-0-local-10.0.130-410.48_1.0-1_amd64
sudo dpkg -i cuda-repo-ubuntu1804-10-0-local-10.0.130-410.48_1.0-1_amd64
sudo apt-key add /var/cuda-repo-10-0-local-10.0.130-410.48/7fa2af80.pub
sudo apt-get update
sudo apt-get install cuda
sudo apt-mark hold cuda
echo "export PATH=/usr/local/cuda-10.0/bin${PATH:+:${PATH}}" >> ~/.bashrc
source ~/.bashrc
cuDNN
- Go to https://developer.nvidia.com/rdp/cudnn-download and create an account if you don't already have one. It's free.
- Click "Download cuDNN v7.6.0 (May 20, 2019), for CUDA 10.0"
- Download all 3 files with 18.04 in the name. Specifically the runtime library, developer library, and code samples.
cd Downloads
sudo dpkg -i libcudnn7_7.6.0.64-1+cuda10.0_amd64.deb
sudo dpkg -i libcudnn7-dev_7.6.0.64-1+cuda10.0_amd64.deb
sudo dpkg -i libcudnn7-doc_7.6.0.64-1+cuda10.0_amd64.deb
sudo apt-mark hold libcudnn7 libcudnn7-dev libcudnn7-doc
Conda
Install conda based on this.
cd /tmp
curl -O https://repo.anaconda.com/archive/Anaconda3-2019.03-Linux-x86_64.sh
sha256sum Anaconda3-2019.03-Linux-x86_64.sh
bash Anaconda3-2019.03-Linux-x86_64.sh
source ~/.bashrc
Tensorflow
conda create --name tensorflow_p37 python=3.7
echo "alias p37='conda activate tensorflow_p37'" >> ~/.bashrc
source ~/.bashrc
p37
pip install matplotlib
pip install numpy
pip install pillow
pip install pathlib
pip install shutil
pip install ipython
pip install jupyter
pip install six
pip install tensorboard
pip install datetime
pip install neptune-client
Then if you are running on a GPU...
pip install tensorflow-gpu
And if a CPU...
Apps
- Slack
- Visual Studio Code
- TeamViewer
Work in progress.