Skip to content

updated nvflare-docker-run.sh and drive_admin_api.py - #98

Open
tonybuschiazzo wants to merge 1 commit into
mainfrom
update_nvflare-docker-run
Open

updated nvflare-docker-run.sh and drive_admin_api.py#98
tonybuschiazzo wants to merge 1 commit into
mainfrom
update_nvflare-docker-run

Conversation

@tonybuschiazzo

Copy link
Copy Markdown
Contributor

updated nvflare-docker-run.sh and drive_admin_api.py with some QOL improvements as well as support for nvflare 2.6 and 2.7. Also added a markdown file for usage

…provements as well as support for nvflare 2.6 and 2.7. Also added a markdown file for usage
@tonybuschiazzo tonybuschiazzo self-assigned this Aug 3, 2026
@tal-rhino

Copy link
Copy Markdown
Contributor

Cool! Take a look at the conflicts with the main branch. Also what about NVFlare v2.8?

@tal-rhino tal-rhino left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks excellent overall! A few comments and suggestions.

## Prerequisites

- Docker
- **macOS only:** GNU coreutils (`brew install coreutils`)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this needed for? It wasn't needed in the past, would be nice not to require users to install this.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm assuming this is mostly bring in changes from the similar script in the fcp repo?


## Installation (Recommended)

Copy both scripts to `/usr/local/bin/`, dropping the `.sh` extension from the main script, and make it executable:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! But why drop the .sh? I think that could cause more confusion than benefit.

```bash
cp nvflare-docker-run.sh /usr/local/bin/nvflare-docker-run
cp drive_admin_api.py /usr/local/bin/drive_admin_api.py
chmod +x /usr/local/bin/nvflare-docker-run

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

both scripts should have chmod +x

Verify the script is installed and executable:

```bash
which nvflare-docker-run

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better to use command -v rather than which, the former is more standard and likely to be available on all systems.

Comment on lines +28 to +44
Verify that `/usr/local/bin/` is in your PATH:

```bash
echo $PATH
```

You should see `/usr/local/bin` in the output. If not, add it to your shell profile (e.g. `~/.bashrc` or `~/.zshrc`):

```bash
# For zsh (default on macOS):
echo 'export PATH="/usr/local/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc

# For bash (default on Ubuntu):
echo 'export PATH="/usr/local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
```

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is excessive here, since not having /usr/local/bin would be extremely strange. If you want to keep this, consider putting it in the "troubleshooting" section with a reference below.


This should return `/usr/local/bin/nvflare-docker-run`.

Alternatively, if you prefer to keep the files in your project directory, you can run the script directly without installation:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This requires chmod +x first.

echo ' --platform PLATFORM Platform to build container for, e.g. "linux/amd64",'
echo ' via `docker build --platform=PLATFORM`'
echo " --n-clients NUM Number of clients to run. (default: $n_clients)"
echo " --app_name NAME Name of the NVFlare app directory. (default: app)"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we support using a different name on FCP?

Comment on lines +158 to +163
# Check that each dataset subdirectory contains a dataset.csv.
for dataset_dir in "$site_dir"/*/; do
if [ ! -f "$dataset_dir/dataset.csv" ]; then
input_errors+=(" site-$clientnum: missing dataset.csv in $dataset_dir")
fi
done

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We now also support dataset.parquet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants