Build your own deep learning box —Software installation

A trilogy in four parts

Rajaram Gurumurthi
Dec 26, 2019 · 3 min read
en:User:Cburnett [CC BY-SA 3.0 (http://creativecommons.org/licenses/by-sa/3.0/)]

Once the brand new deep learning box is assembled and BIOS is verified, we install system and application software.

The most important decision is operating system and version. I settled on Linux Ubuntu because it is free and both Colab and Kaggle run Ubuntu images (as of writing date).

In my build, both GPU and Motherboard officially support only Windows. I am not sure about what level of support I will get if I have to call them. If you are concerned about support and/or you want to use this build for gaming as well, then Windows would a better choice.

Having selected Ubuntu, the choice narrows to Ubuntu 18.04.3 LTS (Bionic Beaver) or Ubuntu 19.10 (Eoan Ermine).

I went with 19.10 Eoan Ermine because Wifi, NVIDIA Drivers and CUDA Toolkit are bundled with the package. It also comes with Python 3.7 pre-installed. (Wise choice on hindsight. I was able to train my first deep learning model within 5 minutes of OS installation).

Step 1: Download Ubuntu 19.10 desktop ISO image from https://ubuntu.com/download/desktop

Step 2: Erase and reformat a USB stick in FAT 32 (FAT MS-DOS) format with Master Boot Record partition scheme.(I used Disk Utility on a mac).

Step 3: Transfer ISO image to bootable drive (instructions below for Mac).

// Mac OS
~ $ diskutil list
...
/dev/disk2 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: FDisk_partition_scheme *30.8 GB disk2
1: DOS_FAT_32 LINUX BOOT 30.8 GB disk2s1
~ $ PATH_TO_ISO=/users/shared/ubuntu-19.10.0-desktop-amd64.iso~ $ diskutil umount /dev/disk2s1~ $ sudo dd bs=4M if=${PATH_TO_ISO} of=/dev/disk2

Step 4 : Insert bootable USB stick and restart the deep learning box. Follow the prompts for OS installation. I chose to install GUI as well.

Step 5: Connect to Wi-Fi.

Step 6: Verify NVIDIA driver and toolkit.

// Deep learning box
$ nvidia-smi
Mon Dec 23 11:42:32 2019
...
| NVIDIA-SMI 435.21 Driver Version: 435.21 CUDA Version: 10.1 |
...

Step 7: Verify Python. Eoan Ermine comes installed with Python 2.7 and Python 3.7. However 2.7 is the default.

// Deep learning box
$ python --version
$ python3 --version

Step 8: Install Package Installer (PIP) for Python3

$ sudo apt install python3-pip

Step 9: Install Jupyter notebook.

$ sudo pip3 install jupyter jupyterlab

Step 10: Install deep learning libraries of your choice.

$ sudo pip3 install torch torchvision$ sudo pip3 install fastai$ sudo pip3 install wandb

Note: wandb.com is a really cool web app that helps track and visualize your training data such as weights and biases, losses, metrics and system utilization across multiple models and runs.

Step 11 (optional): Benchmark your build with a standard test suite. Phoronix test suite has a wide range of suites that can test different aspects of your build and compare it the others who have published their results on OpenBenchmarking.org. There is even one test suite specifically for machine-learning.

I skipped step 11 and chose to run controlled experiments on pre-selected training notebooks instead.

My deep learning benchmarking exercise and results are documented in Part 4: Benchmarking and ongoing commentary.


Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade