Skip to content

londonaicentre/flip-fl-base-flower

Repository files navigation

FLIP-FL-base-Flower

flip-flower-logo

Docker - flower-fl-base Docker - flower-superlink Docker - flower-supernode Python 3.12+ Documentation StatusLicense

This repository contains the federated learning base code to run Flower deployments with FLIP, plus tutorial Flower applications.

It includes Docker images and runtime wiring for:

  • Flower SuperLink
  • Flower SuperNode workers
  • FLIP Flower API (fl-api)
  • A shared Flower base image (flwr-base)

Repository layout

.
├── data/                         # Local sample data mounted into supernodes
├── deploy/compose.yml            # Main Docker Compose stack for local runtime
├── docs/images/                  # Project assets
├── fl_services/
│   ├── fl-base/                  # Base Flower image
│   ├── fl-api-flower/            # FastAPI service for run control and status
│   ├── superlink/                # SuperLink image
│   └── supernode/                # SuperNode image
├── tutorials/
│   ├── numpy/                    # Minimal NumPy Flower app
│   └── monai/                    # MONAI-based Flower app
└── Makefile                      # Convenience commands (build/up/down/clean)

Prerequisites

  • Docker Engine with Docker Compose v2
  • GNU Make

Optional:

  • uv (if developing/testing Python services locally outside containers)

Quick start (local FL runtime)

From the repository root:

make build
make up

This starts:

  • superlink (ports 9093, health at 9097)
  • supernode-1 and supernode-2 (health at 9098)
  • fl-api on http://localhost:8000

To stop:

make down

To remove local images and prune:

make clean

Validate the stack

With containers running:

curl http://localhost:8000/health
curl http://localhost:8000/check_server_status
curl http://localhost:8000/check_client_status

API docs are available at:

  • http://localhost:8000/docs (Swagger)
  • http://localhost:8000/openapi.json
  • http://localhost:8000/redoc

Submit a tutorial run

The compose setup mounts tutorials/ into the FL API container as /app/src, so apps can be submitted by folder name.

Examples:

# Start a NumPy tutorial run
curl -X POST http://localhost:8000/submit_run/numpy

# Start a MONAI tutorial run
curl -X POST http://localhost:8000/submit_run/monai

# List runs
curl http://localhost:8000/list_runs

# Abort a run (replace <run_id>)
curl -X DELETE http://localhost:8000/abort_run/<run_id>

Configuration

Default runtime wiring is defined in:

  • deploy/compose.yml
  • .env.flwr.development

Important environment variables include:

  • ALLOWED_JOB_FOLDERS (default: numpy,monai)
  • SUPERLINK_ADDRESS
  • SUPERLINK_HEALTH_ADDRESS
  • SUPERNODE_HEALTH_ADDRESSES
  • FLOWER_HEALTHCHECK_TIMEOUT_SECONDS

Tutorials

FL API service

See the dedicated service documentation for endpoint behavior and development details:

Contributing

Contribution guidelines are documented in:

License

Licensed under the Apache License, Version 2.0. See LICENSE.

About

FLIP FL components using Flower

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages