Deploying custom Docker images
Deeploy allows you to deploy custom Docker images.
With the Deeploy python client CLI you can easily create your own custom Docker images for models, explainers and transformers.
Make sure to follow the Deeploy python client installation instructions and then run the deeploy generate-template --help command.
The generate-template command initializes a folder with all files that you need in order to embed your own custom logic whilst adhering to the Deeploy best practices and API spec. Make sure to follow the steps in the README.md that is located in the created folder.
Reference the Docker image
To deploy a custom Docker image, you need to reference the image in your Repository using a reference.json file.
This is further explained in Repository Requirements.
This is an example of a reference.json file for a custom Docker image:
# this reference is used in example repository:
# https://gitlab.com/deeploy-ml/sample-models/example-custom-image-hello-world/
{
"reference": {
"docker": {
"image": "deeployml/example-custom-image-hello-world:0.3.0",
"port": 8080
}
}
}
| Parameter | Description | Example |
|---|---|---|
| image | The link to a Docker Image, including the tag | example/image:1.2.3 |
| uri (optional) | The URI on which to request predictions | /model:predict |
| port | The port number to expose | 8000 |