2.1 Installing MLHub on Ubuntu

20200220 MLHub runs on the Ubuntu platform and is implemented in Python3. All of the curated models that are registered with MLHub are tested against Ubuntu LTS (Long Term Support). MLHub can also be installed on MacOS and Windows though this is in development and you may need to manually install some dependencies, and many users have reported success on these platforms.

Ubuntu can be installed on almost anything from a Raspberry Pi to a desktop or laptop running Ubuntu directly or through a virtual machine, or via the Windows Subsystem for Linux (WSL). Ubuntu is the most widely deployed operating system on cloud servers, on smart devices (as Android), and is even the operating system of choice for the helicopter on Mars. The various options for installing Ubuntu are covered in the GNU/Linux Desktop Survival Guide. Once you have Ubuntu installed MLHub is easy.

For a new Ubuntu server we might first install wajig to simplify using Ubuntu. It is available from the PyPI software repository. Installation of wajig will usually take less than 5 minutes.

sudo apt update
sudo apt upgrade
sudo apt install wajig
wajig update 
wajig upgrade 
wajig install python3-pip
pip install wajig

Be sure to log out and log back in after the pip install so that the system will notice your local installations. This will refresh the PATH that is used to find applications. On Ubuntu Pip installs the wajig command in ~/.local/bin. If all else fails then the following could be useful (but not usually required):

echo 'PATH=~/.local/bin:$PATH' >> ~/.bashrc && source ~/.bashrc

We are now ready to install and configure MLHub from the PyPI software repository using the pip command:

pip install mlhub

After installation the system can be configured:

ml configure

This may take 5 to 10 minutes, depending on what other dependencies are already installed.

Also install the mlhub R package:

sudo Rscript -e 'install.packages("testthat", quiet=TRUE)'
sudo Rscript -e 'devtools::install_github("mlhubber/mlhub@main", quiet=TRUE)'

The ml command should now be ready to use.

Getting started is now simple. Choose from amongst the packages of interest to you from the package catalogue. As a data scientist you may be interested in visualisations (ports), beeswarm, and animations (animate). For traditional machine learning there are models for rain prediction (rain) and movie recommendation (movies). For pre-built deep neural network models you can find models to colorize photos (colorize), identify objects (objects), to make you computer see with computer vision (azcv), or to detect faces (facedetect).

Explore, enjoy, share, and empower. Above all, let’s work toward a collective purpose of ensuring we have a meaningful future for humanity.



Your donation will support ongoing availability and give you access to the PDF version of this book. Desktop Survival Guides include Data Science, GNU/Linux, and MLHub. Books available on Amazon include Data Mining with Rattle and Essentials of Data Science. Popular open source software includes rattle, wajig, and mlhub. Hosted by Togaware, a pioneer of free and open source software since 1984. Copyright © 1995-2022 Graham.Williams@togaware.com Creative Commons Attribution-ShareAlike 4.0