Move the build process away from the controller.

Test Plan: Tested with curl.

Reviewers: jcarter

Reviewed By: jcarter

Differential Revision: https://phabricator.edgesysdesign.com/D98