17.5 Installing MLHub
20200220 MLHub is specifically developed and built to run on Ubuntu, implemented in Python3. MLHub can be installed from the PyPI Python library repository. If your Ubuntu platform already has Python3 installed, including pip, then it is a single command to install mlhub:
$ pip3 install mlhub
If you have just set up a new Ubuntu server, or you have not previously had Python installed, the following steps will be useful. To simplify using the Ubuntu system we will use the wajig system administration suite. Wajig is available from the Debian and Ubuntu repositories with the latest updates available from PyPI. 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 $ pip3 install wajig
Be sure to log out and log back in after the pip3 install so that the system will notice your local installations.
Now we are ready to install and configure MLHub:
$ pip3 install mlhub $ ml configure
If you now find that the ml command is not found then you
may like to log out and back in again. This will refresh the PATH
where commands are found. The default in Ubuntu 20.04 LTS is that the
path will include
~/.local/bin if it exists, which won’t be the
case for the first time. Pip3 will install the
ml command there and this is checked at login. If all else
fails then the following could be useful (but not usually required):
$ echo 'PATH=~/.local/bin:$PATH' >> ~/.bashrc
MLHub exposes a github repository as a collection of quickly accessible and ready to run, explore, rebuild, and even deploy, pre-built machine learning models and data science technology. The models and technology are accessed and managed using the ml command from the mlhub package available for quick installation from pypi. A growing number of machine learning models and data science technology are becoming available, as well as cloud based services.
The configure of ml as above will install quite a comprehensive collection of AI technology to have your computer AI-ready. This will include several hundred packages (mostly small) that are downloaded and installed. For each of the major packages you will be asked to confirm that it is okay to install it. This could take up to 5 minutes.
This will install quite a collection of free and open source packages that begins to form a foundation for doing AI and ML and Data Science on Ubuntu. Included is the R Statistical Software package.
As the instructions will suggest, run the following to immediately turn on tab expansion for mlhub commands and model names. This will be available anyhow on the next login.
$ source /etc/bash_completion.d/ml.bash
Your donation will support ongoing development 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-2021 Graham.Williams@togaware.com Creative Commons Attribution-ShareAlike 4.0.