Installation
There are two ways to install MetriCal. If you are using Ubuntu or Pop!_OS, you can install
MetriCal via the apt
package manager. If you are using a different operating system, or if your
system configuration needs it, you can install MetriCal via Docker.
- Apt Repository
- Docker
Install MetriCal via Apt Repository
Tangram Vision maintains a repository for MetriCal on a private Cloudsmith instance (cloudsmith.io).
Compatible OS:
- Ubuntu 20.04 (Focal Fossa)
- Ubuntu and Pop!_OS 22.04 (Jammy Jellyfish)
- Ubuntu and Pop!_OS 24.04 (Noble Numbat)
Stable Releases
curl -1sLf \
'https://dl.cloudsmith.io/public/tangram-vision/apt/setup.deb.sh' \
| sudo -E bash
sudo apt update;
sudo apt install metrical;
Release Candidates
curl -1sLf \
'https://dl.cloudsmith.io/public/tangram-vision/apt-rc/setup.deb.sh' \
| sudo -E bash
sudo apt update;
sudo apt install metrical;
Use MetriCal with Docker
Every version of MetriCal is available as a Docker image. Even visualization features can be run from Docker using Rerun as a separate process.
When you see a section like this in the documentation, it refers to a Docker-specific feature or method. Keep an eye out for them!
1. Install Docker
If you do not have Docker installed, follow the instructions to do so at https://docs.docker.com/get-docker/
2. Download MetriCal via Docker
There are two types of MetriCal releases. All releases can be found listed on Docker Hub.
Stable Release
Stable releases are an official version bump for MetriCal. These versions are verified and tested by Tangram Vision and MetriCal customers. They are guaranteed to have a stable API and follow SemVer. Find documentation for these releases under their version number in the nav bar.
Stable releases can be pulled using the following command:
docker pull tangramvision/cli:latest
Install a specific version with a command like:
docker pull tangramvision/cli:13.0.0
Release Candidates
Release candidates are versions of MetriCal that include useful updates, but are relatively untested or unproven and could contain bugs. As time goes on, release candidates will either evolve into stable releases or be replaced by newer release candidates.
The latest release candidate can be referenced with the dev-latest
alias, and can be installed by
running the following:
docker pull tangramvision/cli:dev-latest
Specific release candidates can be installed the same way you'd install any other versioned release (see above).
With that, you should now have a MetriCal instance on your machine! We'll assume the Stable release
(tangramvision/cli:latest
) for the rest of the introduction.
3. Create a MetriCal Docker Alias
Throughout the documentation, you will see references to metrical
in the code snippets. This is a
named bash function describing a larger docker command. For convenience, it can be useful to include
that function (outlined below) in your script or shell config file (e.g. ~/.bashrc
):
metrical() {
docker run --rm --tty --init --user="$(id -u):$(id -g)" \
--volume="$MOUNT":"/datasets" \
--volume=metrical-license-cache:/.cache/tangram-vision \
--workdir="/datasets" \
--add-host=host.docker.internal:host-gateway \
tangramvision/cli:latest \
"$@";
}
Now you should be able to run metrical
wherever!
--volume
and --workdir
The --volume
flag syntax represents a bridge between the host machine and the docker instance. If
your data is contained within the directory /home/user/datasets
, then you would replace $MOUNT
with /home/user/datasets
.
--workdir
indicates that we're now primarily working in the /datasets
directory within the
docker container. All subsequent MetriCal commands are run as if from that /datasets
directory.