Triton Checksum Repository Agent
August 31, 2021 ยท View on GitHub
Triton Checksum Repository Agent
This repo contains an example repository agent for verifying file checksums before loading the model. Ask questions or report problems in the main Triton issues page.
Build the Checksum Repository Agent
Use a recent cmake to build. First install the required dependencies.
$ apt-get install openssl-dev
To build the repository agent:
$ mkdir build
$ cd build
$ cmake -DCMAKE_INSTALL_PREFIX:PATH=`pwd`/install ..
$ make install
The following required Triton repositories will be pulled and used in the build. By default the "main" branch/tag will be used for each repo but the following CMake arguments can be used to override.
- triton-inference-server/core: -DTRITON_CORE_REPO_TAG=[tag]
- triton-inference-server/common: -DTRITON_COMMON_REPO_TAG=[tag]
Using the Checksum Repository Agent
The checksum repository agent is configured by specifying expected checksum values in the ModelRepositoryAgents section of the model configuration. A separate parameter is used for each file checksum in the following way: the key specifies the message digest algorithm that is used to generate the checksum and the path to file relative to the model repository as <algorithm:relative/path/to/file> and the value specifies the expected checksum of the file. Currently the checksum repository agent only supports MD5 checksums. For example:
model_repository_agents
{
agents [
{
name: "checksum",
parameters
{
key: "MD5:embedding_table",
value: "d726e132f91f16ebee703d96f6f73cb1"
}
}
]
}
With the above configuration, the checksum repository agent will be invoked before loading the model and loading will fail if the MD5 checksum for file "embedding_table" does not match the specified value.