Flower Server Build
The build action creates a container image for a Flower server that orchestrates federated learning. This action packages the server code along with its dependencies into a deployable container image.
Overview
The runtime builds a Docker container image containing the Flower server code. The resulting container image can be deployed to orchestrate federated learning tasks. See how to deploy the server.
Quick example with bare minimum parameters
import digitalhub as dh
# Create Flower server function
f = dh.new_function(
name="my-flower-server",
kind="flower-server",
base_image="some-base-image"
)
# Build the server
run = f.run(action="build", instructions=["... bash instructions ..."])
Parameters
Function Parameters
Must be specified when creating the function.
| Name | Type | Description |
|---|---|---|
| project | str | Project name. Required only when creating from the library; otherwise MUST NOT be set. |
| name | str | Name that identifies the object. Required. |
| kind | str | Function kind. Required. MUST BE flower-server |
| uuid | str | Object ID in UUID4 format. |
| description | str | Description of the object. |
| labels | list[str] | List of labels. |
| embedded | bool | Whether the object should be embedded in the project. |
| image | str | Docker image name for the built Flower server container. (informational only for build). |
| base_image | str | Base Docker image to use for building. |
| requirements | list[str] | Additional Python package requirements. |
Task Parameters
Can only be specified when calling function.run().
| Name | Type | Description |
|---|---|---|
| action | str | Task action. Required. MUST BE build |
| node_selector | list[dict] | Node selector for build execution. |
| volumes | list[dict] | List of volumes for build execution. |
| resources | dict | Resource limits/requests for build execution. |
| affinity | dict | Affinity configuration for build execution. |
| tolerations | list[dict] | Tolerations for build execution. |
| envs | list[dict] | Environment variables for build execution. |
| secrets | list[str] | List of secret names for build execution. |
| profile | str | Profile template for build execution. |
| instructions | list[str] | Custom build instructions to execute during container build. |
Run Parameters
Can only be specified when calling function.run().
No specific parameters for run of this action.
Entity methods
Run methods
There are no additional run methods for this action.