Custom Pre-packaged Server
Enterprise
Applicable to Enterprise tier only
For better flexibility, we can also build our pre-packaged server which can load models from the model URI. Here are the recommended steps to build your first pre-packaged server.
Read the document Package from Language Wrapper for python. This is the fundamental of a pre-packaged server.
Reference existing pre-packaged servers. Try to build and push the same pre-packaged server to your container registry (e.g. Dockerhub).
In the
__init__()
method of the model class, add the parametermodel_uri
to load the model. The value is a string that contains the path where the model files are downloaded. Currently, it is always/mnt/models
rather than the actual model URI the user configure.def __init__(self, model_uri): super().__init__() self.model = load_model(model_uri)