2.4 ml install

20211015

The simplest installation identifies a curated package name. The names of these packages are those in the left column of the output of available). For example:

ml install kmeans        # Install the curated package named kmeans.

The package’s MLHUB.yaml file, containing all information required by MLHub to install the package, is retrieved from a git repository identified through MLHub’s meta-data. All MLHub packages are hosted within a git repository.

We can explicitly identify the GitHub path, thus skipping the curated package list:

ml install acwkayon/kmeans  # Install kmeans from its GitHub repository.

The default action of the install command is to access MLHUB.yaml from the git repository. The above example will obtain the package’s configuration from https://raw.githubusercontent.com/acwkayon/kmeans/master/MLHUB.yaml. The repository’s default branch is accessed (master in this case). The ports package identified as acwkayon/ports uses main as the default branch and so the MLHUB.yaml file is retrieved as https://raw.githubusercontent.com/acwkayon/ports/main/MLHUB.yaml.

Specific branches and commits of a git repository can also be identified. This is particularly useful if an update has introduced bugs and you’d like to revert to a previous version.

ml install acwkayon/kmeans@dev            # From dev branch.
ml install acwkayon/kmeans@a24e268        # From specific commit.

Specific MLHUB.yaml files within a repository can also be supplied:

ml install acwkayon/kmeans:doc/MLHUB.yaml
ml install https://github.com/acwkayon/kmeans/testing/MLHUB.yaml

If MLHub.yaml is not provided in the command line it will be looked for anyhow.

The default git repository is GitHub, but it can be explicitly identified:

 ml install github:acwkayon/kmeans

Similarly other git servers supported include GitLab and BitBucket:

ml install gitlab:acwkayon/kmeans
ml install gitlab:acwkayon/kmeans@2fe89kh:doc/MLHUB.yaml

ml install bitbucket:acwkayon/kmeans

To override the package developer’s name for a package we can provide our own name (not yet implemented):

ml install   https://github.com/StafferOliver/rembg as u2net

After a package is installed the name by which you refer to it locally can be changed using the rename command.



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