In this howto, I will show you how I go about setting up my at-home deep learning rig!

The setup we will go for is that of a headless server (one that works without a monitor attached) connected to local LAN via an ethernet cable. You could set it up to use wifi but the configuration would be more involved and issue-prone. I like to keep things simple 🙂

I always seem to run into problems when I run Ubuntu Desktop and attempt to train deep learning models on it. Maybe your experience will differ, but I have given up on this approach. Instead, I much prefer having a single computer that I use as my workstation (a desktop running Ubuntu desktop) and a second machine that I use for training.

Download the ubuntu server iso and burn it to a flash drive

You can find the instructions on how to create a bootable Ubuntu USB stick here. The steps will differ depending on the operating system you are creating the USB stick on.

Perform the installation

Hook your DL rig to your monitor (if you are using one of the beefy NVIDIA cards, and it is the only card in your desktop, you might need to play around a bit with which output is working, I do not know how this all should work but I find that going for the first HDMI port seems to do the trick).

You also will need to connect a keyboard.

Plug in the USB stick and boot your machine!

Assuming everything went well, you should see the Ubuntu install pop up. If not, you might need to press whatever key binding is appropriate to your motherboard to select the boot order. We want our computer to boot from the USB stick and not from an internal hard drive. F8 should do the trick. In case it doesn't work, follow the instructions that appear on the screen as your computer starts (sometimes which key to press to change the boot order is given there) or check the manual of your motherboard.

Go through with the installation and when prompted to install the openssh server, say yes (this is the component that will allow us to connect to the machine via SSH). There is an interesting option available with the version of Ubuntu that I am using - you can pull down your public ssh key from github at installation time! If you chose to do so, you can skip copying the SSH key that I describe below.

When the installation finishes, remove the USB drive and reboot.

Setting up our rig for remote connectivity

Configure the network interface

Once your rig boots up, log into it using the credentials you gave during install.

There is a great chance your rig will have Internet connectivity, as it will pick up an IP address via DHCP. You could of course log into your switch and assign a specific address to the MAC port of your ehternet card, and this would work. I prefer to set up a static IP on the machine.

The reason we are going to all this effort is that we need to know the IP address to be able to connect to the rig from other computers on the network! (with DHCP, without additional setup, we could never be sure what IP address our rig will get assigned)

There should be a single file under /etc/netplan. With the current version of Ubuntu server (20.04) it is called 00-installer-config.yaml

Go ahead and edit it. Since I use vim, this is the command I execute: vim sudo /etc/netplan/00-installer-config.yaml