Menu toggle

Building your development environment

Our first order of business, is to set up your development environment so that you may begin working through the projects. Before proceeding, you may want to

  • gain access to The DL@DU Project content.
  • read a brief overview of the libraries and frameworks we use.

Setting up your personal machine

Note: DU students who don't have a personal computer can set up an account on Simmons' office machine sooner rather than later. Simmons' machine runs ArchLinux and serves a desktop environment that can be accessed from anywhere on campus, and from anywhere in the world via our vpn.

In our development workflow, we prototype and debug code on our daily-driver machine (for example, your personal laptop running PyTorch on its CPU). Beginning in about Project 3, we necessarily migrate to machines hosting at least one GPU cloud instances, or the ArchLinux machine in Simmons' office (which serves dual 1080s), or your personal machine if you happen to have a GPU and are running bare-metal Linux.

As discussed in the (software) tooling overview, our preferred framework is PyTorch, which sits on top of Python (as does Tensorflow). Accordingly, you may wish to visit our page on best practices when installing Python packages.

To set up PyTorch on your personal machine, follow the appropriate link below (and ask Simmons for help, if necessary).

Upgrading your system

If you are running Ubuntu (or any Debian-based Linux distribution) natively or using the Windows System for Linux (see above for how to set this up) then every once and a while type, in turn, at the command line, the following, to update your Linux installation:

sudo apt update
sudo apt upgrade
sudo apt dist-upgrade

On a Mac:

brew update
brew upgrade

Upgrading PyTorch

Simmons tried to update PyTorch on his CPU-only laptop by issuing the command /usr/bin/pip3 install --upgrade torch. This command upgraded Simmons' PyTorch installation to one including both the CPU and the GPU libraries. But the GPU libraries are large and there is no point in having those lying around on CPU-only machines (or on machines with GPU(s) for which you have bothered to load appropraite hardware libraries).

If you want to upgrade to the just the CPU version, then go to the PyTorch page, scroll down, and grab the correct command. Then add the switch --no-cache-dir.

Something like this:

/usr/bin/pip3 --no-cache-dir install torch==1.6.0+cpu torchvision==0.7.0+cpu -f https://download.pytorch.org/whl/torch_stable.html