nvflare.lighter.impl.workspace module¶
- class WorkspaceBuilder(template_file)[source]¶
Bases:
Builder
Manages the folder structure for provisioned projects.
Sets the template_file containing scripts and configs to put into startup folders, creates directories for the participants, and moves the provisioned project to the final location at the end ($WORKSPACE/$PROJECT_NAME/prod_XX). WorkspaceBuilder manages and sets the number in prod_XX by incrementing from the last time provision was run for this project in this workspace, starting with 00 to a max of 99.
Each time the provisioning tool runs, it requires a workspace folder in the local file system. The workspace will have the following folder structure:
$WORKSPACE/ <--- this is assigned by -w option of provision command (default is workspace) $PROJECT_NAME/ <--- this is the name value in the project.yml file prod_00/ <--- a new prod_NN folder is created if provision does not have any errors. prod_01/ ... resources/ <--- this folder stores resources for other builders to load state/ <--- this folder stores persistent information (such as certificates) so subsequent runs of the provision command can load the state back. wip/ <--- this is only used during runtime, and will be removed when the provision command exits
- Parameters:
template_file – name of template file containing scripts and configs to put into startup folders