Thanks to Mycroft Community Member (Mycroft SysAdmin in a former life) @arron for getting this working!
Running Mycroft using this method has been tested on:
2017 MacBook Pro running Mojave
Lenovo Ideapad 300-15isk running Windows 10
So far Mycroft seems to work well on both platforms, although at least two issues have come up with this approach and more may show up as others use this virtualization approach to running Mycroft.
While the TTS (text-to-speech) audio and Spotify audio sounds good the News Skills has issues with playback.
The audio process has crashed unexpectedly, although only once. This can be restarted by running:
mycroft-start restart audio
Download and install VirtualBox (https://www.virtualbox.org/). You will want to use the latest version (v6.010 and up) as older versions have had audio quality issues.
Open the VirtualBox application and click 'New'
Name the machine, select Linux and Ubuntu (64-bit)
Continue through the rest of the VM configuration screens using the default selections. More RAM would not hurt, but 1GB should be fine.
Download the Ubuntu Server ISO (18.04 LTS and 19.04 both work) and put it in the folder of the VM you created (e.g. ~/VirtualBox VMs/Mycroft-Ubuntu)
(Optional) You can install Ubuntu Desktop instead of Ubuntu Server if you would like a complete Linux desktop environment, however this is not required to run Mycroft and uses significantly more system resources including RAM.
(Optional) Assign additional CPUs to VM by selecting the System tab at the top and then the Processor tab to select the number of CPUs.
Select the VM you created on the left and click Start!
It will prompt you to select a virtual disk file. Press the folder icon to select the Ubuntu Server ISO downloaded earlier.
Ubuntu will start up and you will have to go through the default setup. Again, defaults should be good the whole way through.
The VM will reboot at the end of the process. To get to login screen you will need to press the enter key a couple times during the boot process. Then login with the credentials you selected during setup.
Congratulations you have a working Ubuntu VM working on MacOS! Now let’s get Mycroft set up.
Run these commands:
sudo apt-get update
sudo apt-get install -y alsa pulseaudio
git clone https://github.com/MycroftAI/mycroft-core.git
This has a few interactive prompts before it begins. A couple minutes in Ubuntu will ask if you want to automatically restart services. You can select Yes. This process may take over an hour if you have only the baseline CPU/RAM allocations.
Now you have a fully operational install of Mycroft.
To start Mycroft run:
Or to start it and launch the CLI interface:
If you chose not to add the executables to
$PATH during installation, you can manually run
./start-mycroft.sh from your
If you want to be able to start the VM in headless mode and interact through SSH you will need to add port forwarding to the network configuration. You will also need OpenSSH which can be installed with
sudo apt-get install openssh-server.
First get the IP address of the VM with
ifconfig | grep inet. Should be 10.0.2.x. Then open the VM settings, go to the Network tab, expand the Advanced section and click the Port Forwarding button. Then enter these settings:
Name: SSHProtocol: TCPHost IP: 127.0.0.1Host Port: 2222Guest IP: 10.0.2.15 # replace this with the IP address you just obtainedGuest Port: 22
Reboot and VM and you will be able to SSH in with this command:
ssh username@localhost -p 2222. You can also select the Start dropdown menu to start the VM in Headless mode.