Installation
Overview
There are four components that can be installed. You may install all of them or just the ones you need, depending on your requirements. Those components will allow you to use/depoly an existing model that is published or build your own models with: MES Tools or with the Python API
Releases
A prebuilt package (excluding MES Tools) is available for direct download of the latest version, eliminating the need to compile from source. The binaries are built on Ubuntu 24.04, and will run on any Linux distribution with glibc ≥ 2.39. You will also need to install OpenMP
Preliminary Steps to Build the Tools
These are the preliminary installation steps required:
1. Install Compiler and Build Tools (Ubuntu)
To install the essential compiler and build tools, run:
2. Install OpenMP Support (Ubuntu)
To enable OpenMP (used for parallel processing), install the following package:
NOTE: This is required step.
3. Install Boost Libraries (Ubuntu)
To install the required Boost components, on Ubuntu 24.04, use:
Note: On Ubuntu 22.04, Boost version 1.74 is available and is also compatible.
If you want to compile the AlgoMarker library or compile it against a different Boost library, please download and compile Boost manually and follow the Boost Compilation Steps. This project has been tested with Boost versions 1.67 through 1.85 and should work with other versions as well.
Boost Compilation Steps
Example installation steps for version 1.85.0:
1. AlgoMarker Library
Description
The AlgoMarker shared library is used for deploying the AlgoMarker model. This library works with your final binary model output to access the model, apply it, and retrieve results. It provides a C-level API.
The Git repository is available at MR_LIBS Git Repository.
Installation
- Clone the Git repository:
- Compile the Boost library. Refer to Install Boost Libraries. You must compile the Boost library since the
-fPIC
flag is needed, and it is not included in Ubuntu packages. - Edit
Internal/AlgoMarker/CMakeLists.txt
to include the following line:This should point to your Boost compiled home directory (WORK_BUILD_FOLDER
) from the compilation step. Ensure the compiled libraries are in/libs
and the headers are in/include
. - Execute:
2. AlgoMarker Wrapper
Description
The AlgoMarker Wrapper provides a REST API for the AlgoMarker C++ Library. There are two wrappers available:
- C++ Native Wrapper: Minimal dependencies, very fast, and efficient. Uses Boost Beast. Can be installed in a minimal Ubuntu Chiselled Docker image with just glibc.
- Python Wrapper: Built with FastAPI, more flexible for changes, and supports the old AlgoMarker API. It is slower and has more dependencies but is friendlier for testing.
Installation
C++ Native Wrapper:
- Set up Boost Libraries. No need to compile.
- Clone the repository:
- If you compiled the Boost library, edit
AlgoMarker_python_API/ServerHandler/CMakeLists.txt
to include the following line:This should point to your Boost compiled home directory (WORK_BUILD_FOLDER
) from the compilation step. Ensure the compiled libraries are in/libs
and the headers are in/include
. - Compile the wrapper:
-
Execute the server:
AM_CONFIG
: Path to the AlgoMarker configuration file.AM_LIB
: Path to the AlgoMarker shared library. Refer to AlgoMarker Library for compilation steps.
Python Wrapper:
- Clone the repository:
- Edit
AlgoMarker_python_API/run_server.sh
and update the following:
AM_CONFIG
: Path to the AlgoMarker configuration file.AM_LIB
: Path to the AlgoMarker shared library. Refer to AlgoMarker Library for compilation steps.- If using the old ColonFlag, follow the steps in the ColonFlag setup page to compile the ICU library. Add the ICU library path to
LD_LIBRARY_PATH
in the script before callinguvicorn
. 3. Make sure you have all python depenencies installed (The AlgoMarker.py itself has no dependencies if you want to use it directly with FastAPI):4. Run the ServerAlgoMarker_python_API/run_server.sh
For more details follow: Python AlgoMarker API Wrapper
3. MES Tools to Train and Test Models
Description
Executables for training and testing models, along with other tools developed by MES for command-line use.
Installation
- Set up Boost Libraries. No need to compile.
- Clone the repositories:
- Navigate to the
MR_Tools
directory: - Edit
All_Tools/CMakeLists.txt
to setLIBS_PATH
to the MR_LIBS cloned directory. The default structure is: With this structure, no edits are needed. If you chose to compile Boost Libraries, don't forget to setBOOST_ROOT
in the CMakeList.txt file - Execute:
4. Python API for MES Infrastructure
Description
A Python API Wrapper for the MES Infrastructure.
Installation
- Install the required libraries:
- Compile the Boost library.
- Edit
Internal/MedPyExport/generate_binding/CMakeLists.txt
to include the following line:This should point to your Boost compiled home directory (WORK_BUILD_FOLDER
) from the compilation step. Ensure the compiled libraries are in/libs
and the headers are in/include
. - Make sure you have NumPy installed:
This library is compatible with both NumPy 1.x and 2.x. For the broadest compatibility, you should compile with NumPy 2.x, as this will also work for clients who have NumPy 1.x. However, compiling with NumPy 1.x will not be compatible with clients using 2.x.
- Execute:
Code to Load All Tools into the Environment
Please edit LD_PATH
, MR_LIBS
, MR_TOOLS
, and MR_SCRIPTS
paths as needed.