Machine Learning research workstation gonzo setup
Posted on Thu 12 July 2018 in misc
Finally, I got fed up with fixing my OS and decided to reinstall it from scratch right before my PhD starts (yeah, this's been a while since I started this post). For the sake of simplicity and being able to reproduce the steps quickly everywhere, I decided to stop using Arch and went with Ubuntu.
This piece of gonzo journalism is to list all the stuff I might find important when setting up a convenient environment to work. This post is mostly for me and my needs. No responsibilities here!
However, you might find it (or some parts) useful since I will try to explain why I do this or that step or install this or that software. Or you probably haven't heard of some util I mention here. I hope it helps. Let's go!
Initial System Setup¶
First, you should get the distro from here and make a bootable flash drive. I recommend using unetbootin. Botting and installing the system is straightforward, I won't say much here. Just tick the LVM option when installing since it'll make your life much easier when you decide to make a backup (not making backups yet? then try to remove all your files and check how it feels).
The first thing you need after your system is installed is a the good text editor.
You will need it to edit all the configs we will edit in the future:
sudo apt install vim
As soon as you do it, uncomment the following lines in /etc/inputrc
and refresh your terminal session:
# "\e[5~": history-search-backward
# "\e[6~": history-search-forward
source ~/.bashrc
This will enable you to do history search just using pgUp and pgDown keys.
I have a system SSD and an HDD{s} with backups and huge data dumps. Usually, I just unplug the HDDs when I reinstall the OS and add them to fstab later.
I store most of my files in Dropbox, let's install it and run the sync. And do not forget to add it to the list of startup programs.
You probably want to use github or any remote servers and log in using ssh, let's generate the key. Install xclip first to copy stuff to your buffer:
sudo apt-get install xclip
Generate a key and copy it to the buffer:
ssh-keygen -t rsa -b 4096 -C "<your-email-here>"
xclip -sel clip < ~/.ssh/id_rsa.pub
Now you can copy this key to the authorized_keys
file on your server/github/whatever.
Useful packages¶
mc¶
You do not want to spend all your time on mouse clicking and drag/drop stuff. At the same time, you probably do not remember all your filesystem structure by hart. mc is a very handy two-pane file manager:
sudo apt install mc
git¶
Self-explanatory:
sudo apt install git
latex¶
Same here. How can you submit your future test-of-time award to ICML or SIGBOVIK without this perfect piece of software?
sudo apt-get install texlive-full
silversearcher-ag¶
Sometimes you need to find something in your code and you might use grep or ack. However, this one is really good.
sudo apt install silversearcher-ag
htop¶
You really want to look at these fancy bars showing how many processorts you have, don't you?
sudo apt install htop
tmux¶
sudo apt install tmux
chromium-browser¶
You definitely need this. Otherwise, how can you eyeball your tensorboard? Or how can you watch this latest Deep Learning course on Udemy?
sudo apt install chromium-browser
Solaar¶
I have a Logitech MX Anywhere mouse. Solaar makes it easy to connect.
sudo apt install solaar
ML related¶
I've always used venvs/system+pip install before. However, I've heard a lot of good things about anaconda and decided to give it a go. I still use system packages/pip for non-research related stuff though.
Here is how you install Anaconda in Ubuntu 18.04.
Now, you need CUDA. You can find the instructions here.
Finally, if you are into Docker, have a look at the official guide.
Blog¶
This blog is powered by Pelican, that's how you install it:
pip install pelican
pip install Markdown
pip install ghp_import
FAQ¶
WAT? Do I need to use all this console stuff my grandmother used in school?¶
Most of the time you do not need to. However, it's nice to have the same interface when you log in to a remote machine or use your fancy macbook 12 while drinking mojito on the beach.
Wait, how can you leave without XYZ?¶
Probably I just forgot to add it to the blog post. Or I really have never heard of this util. It would be great if you email me and I'll add it here.
Credits¶
- Kudos to Lucas Beyer for pgUp/pgDown history search trick