AI Server Module
DeGirum AI server launcher and model downloader.
Note
The functionality of this module is now exposed via PySDK CLI.
The purpose of this module is to start DeGirum AI server:
Other Parameters:
Name | Type | Description |
---|---|---|
--zoo |
str
|
Path to a local model zoo directory, containing AI models you want your AI server to serve.
|
--port |
int
|
TCP port to bind server to.
|
- When AI server is started, it runs indefinitely.
- If you started the server from a terminal, you may press
Enter
to shut it down. - If you started the server headless (for example, as a service), then to shut down the server you need to kill the Python process which runs the server.
The module also exposes download_models()
function which can be used to prepare local model zoo directory to be
served by AI server:
- You first download models from the model zoo repo of your choice into some local directory of your choice by calling degirum.server.download_models function.
- Then you start the AI server providing the path to that local directory as
--zoo
parameter.
degirum.server.download_models(path, *, url=ZooManager._default_cloud_url, token='', **kwargs)
Download all models from a model zoo repo specified by the URL.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
Local filesystem path to store models downloaded from a model zoo repo. |
required |
url |
str
|
Zoo repo URL.
|
ZooManager._default_cloud_url
|
token |
str
|
Zoo repo authorization token. |
''
|
Other Parameters:
Name | Type | Description |
---|---|---|
model_family |
str
|
Model family name filter.
|
device |
str
|
Target inference device -- string or list of strings of device names.
|
precision |
str
|
Model calculation precision -- string or list of strings of model precision labels.
|
pruned |
str
|
Model density -- string or list of strings of model density labels.
|
runtime |
str
|
Runtime agent type -- string or list of strings of runtime agent types.
|