Question:
A customer used our REST API to export the Model Image of their Published Model Api to an external container registry. Upon trying to deploy the Image and browse the webservice they weren't sure what the path needs to be in their url to invoke the webservice.
Answer:
The path is <your host>:<your port>/model . The port by default is 8888
Background:
The export is essentially dumping out a (docker) Image. The image contains your Python or R code for the model you developed, and it also contains a webservice wrapper/harness:
for Python models: Flask + uwsgi
for R models: Plumber
Domino creates several scripts that act as the harness or wrapper to provide the webservice which "wraps" your Model code. By using "docker inspect" you can confirm the port, you can also see the cmd is one of the scripts created behind the scenes during the Model Api publish/creation process:
"Cmd": [
"/domino/model-manager/launch"
Exec'ing into a running ModelAPI container reveals that "/domino/model-manager/launch"
is our script which calls /domino/model-manager/harness
which starts up uwsgi (in the case of Python) on port 8888 calling /domino/model-manager/harness.py
which leads to an /domino/model-manager/app.py
which lists /model as the route.
Summary:
Inside the Domino UI the url to reach your Model Api might be something like
https://ghud-sandbox.domino.tech:443/models/6213b6ee406b5b7553503c00/latest/model
or https://ghud-sandbox.domino.tech:443/models/6213b6ee406b5b7553503c00//v/2/model
,
But when you've started up the container in your host from your external registry you'll POST to <yourhost>:8888/model
Comments
0 comments
Please sign in to leave a comment.