Module: service
add_service_container(recipe_id, dir, inputs, skip=False)
Add container configuration to the node config.json.
If no recipe ID is provided, the user will be prompted to enter the service configuration JSON manually. Otherwise, the recipe will be pulled from the services registry and inputs will be filled in, either from the provided JSON string or interactively via the CLI.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
recipe_id |
Optional[str]
|
The service ID, optionally followed by a version. |
required |
dir |
str
|
The directory containing the node configuration. |
required |
inputs |
Optional[dict[str, Any]]
|
The inputs to fill in the recipe. |
required |
skip |
bool
|
Whether to skip optional inputs. |
False
|
Source code in src/infernet_cli/service.py
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 |
|
remove_service_container(service_id, dir)
Remove a service from the node.
If no service ID is provided, all services will be removed.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
service_id |
Optional[str]
|
The service ID to remove. |
required |
dir |
str
|
The directory containing the configuration. |
required |