Configuration
A Docker Model Runner is also configured via the dais.json file.
Docker Model only
The example below is the simplest configuration of a Docker Model Runner. It
has a single Docker Model container with the attribute type: "model".
{
"containers": [
{
"name": "model",
"context": ".",
"dockerfile": "model/Dockerfile",
"type": "model",
"maxModelDuration": 300
}
]
}
Docker Model with a Post-Processor
The Docker Model Runner framework also accepts a configuration which has the Docker Model paired with a Post-Processor service.
In the example configuration below, the pairing is enabled with the attribute
postProcessContainerId: "post-processor" in the Docker Model container.
{
"containers": [
{
"name": "model",
"context": ".",
"dockerfile": "model/Dockerfile",
"type": "model",
"maxModelDuration": 300,
"postProcessContainerId": "post-processor"
},
{
"name": "post-processor",
"context": ".",
"dockerfile": "post-processor/Dockerfile",
"port": 8080
}
]
}
With this configuration, Dais will notify the persistent service with name
identified in the the postProcessContainerId attribute, i.e. the
post-processor service, by sending it a summary of all the model runs.
Docker Model with a Pre- and a Post-Processor
Another dais.json configuration that the Docker Model Runner framework
accepts is one that has both a Pre-Processor (or Task-Generator) and a
Post-Processor services.
In addition to having the postProcessContainerId attribute, the Docker Model
in this configuration will also have the taskGeneratorContainerName
attribute. In the example below, the pre-processor service is identified to
provide the Pre-Processor service.
{
"containers": [
{
"name": "model",
"context": ".",
"dockerfile": "model/Dockerfile",
"type": "model",
"maxModelDuration": 300,
"taskGeneratorContainerName": "pre-processor",
"postProcessContainerId": "post-processor"
},
{
"name": "pre-processor",
"context": ".",
"dockerfile": "pre-processor/Dockerfile",
"port": 8080
},
{
"name": "post-processor",
"context": ".",
"dockerfile": "post-processor/Dockerfile",
"port": 8080
}
]
}
The persistent service named in the taskGeneratorContainerName attribute,
will be queried to generate a list of model inputs from a single base input
when a model run is triggered in the frontend.