Skip to content

Build SQLFlow on macOS with Vagrant

Yi Wang edited this page May 12, 2020 · 2 revisions

I have a workstation running Ubuntu 18.04. I want to build the sqlflow command-line client tool from the source code into macOS-native binary. To do so, I plan to run the build toolchain on a VirtualBox VM managed using Vagrant.

Install VirtualBox

To install VirtualBox, I followed this tutorial and ran the following command.

sudo apt-get install -y virtualbox

This installs not exactly the most recent version of VirtualBox. By running the following command, I can check its version.

virtualbox -h

Install VirtualBox Extension Pack

Knowing the version of VirtualBox installed, I can download the corresponding extension pack, which is necessary to support devices like USB 3.0.

wget https://download.virtualbox.org/virtualbox/5.2.35/Oracle_VM_VirtualBox_Extension_Pack-5.2.34.vbox-extpack

You might want to replace the version number in the above URL into yours.

Then, we can install the extension pack by running the following command.

sudo VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-5.2.34.vbox-extpack

Install Vagrant

From the official download page, I downloaded the Debian package and ran the following command to install it.

sudo dpkg -i vagrant_2.2.9_x86_64.deb

Create a Project

A Vagrant project is a directory