nvflare.lighter.impl.static_file module

class StaticFileBuilder(config_folder='', scheme='grpc', app_validator='', download_job_url='', docker_image='', overseer_agent: dict | None = None, components='')[source]

Bases: Builder

Build all static files from template.

Uses the information from project.yml through project to go through the participants and write the contents of each file with the template, and replacing with the appropriate values from project.yml.

Usually, two main categories of files are created in all FL participants, static and dynamic. Static files have similar contents among different participants, with small differences. For example, the differences in sub_start.sh are client name and python module. Those are basically static files. This builder uses template file and string replacement to generate those static files for each participant.

Parameters:
  • config_folder – usually “config”

  • app_validator – optional path to an app validator to verify that uploaded app has the expected structure

  • docker_image – when docker_image is set to a docker image name, docker.sh will be generated on

  • server/client/admin

build(project: Project, ctx: ProvisionContext)[source]
prepare_admin_config(admin, ctx: ProvisionContext)[source]