FLIP is an open-source platform for federated training and evaluation of medical imaging AI models across healthcare institutions, while ensuring data privacy and security.
FLIP is developed by the London AI Centre in collaboration with Guy's and St Thomas' NHS Foundation Trust and King's College London.
FLIP spans several repositories:
| Repository | Description |
|---|---|
| FLIP | This repo: Central Hub API, Trust APIs, UI, and Docker deployment |
| flip-fl-base | NVIDIA FLARE federated learning base application library, workflows, and tutorials |
| flip-fl-base-flower | Flower federated learning base application library, workflows, and tutorials |
This repository consolidates all FLIP services in a mono-repo that can be deployed together via Docker Compose. The federated learning images are pulled from flip-fl-base and flip-fl-base-flower.
- Docker with Swarm mode initialized
- Nvidia Container Toolkit
- Make
- UV - Python environment management tool
- postgresql-client (install with
apt install postgresql-client postgresql-client-commonon Debian/Ubuntu)
For developer tooling and IDE setup, see CONTRIBUTING.md.
To start the services, you can use the Makefile provided in the root directory. The Makefile provides several convenient commands to manage the services defined in the deploy/compose.development.yml file.
For example:
| Command | Description |
|---|---|
make up |
Run all services using Docker Swarm for XNAT (make build first if needed) |
make up-no-trust |
Run all services except the trust services related services |
make up-trusts |
Run the trust services related services (uses Docker Swarm for XNAT) |
make central-hub |
Run the central API service, including the database and UI |
make central-fl |
Run the FL API service |
make build |
Build all Docker images |
make down |
Stop all services and remove the containers (including Swarm stacks) |
make restart |
Stop and start all services |
make restart-no-trust |
Stop and start all services except the trust services related services |
make clean |
Remove all stopped containers, networks, and images |
make ci |
Run the CI pipeline locally using act |
make up-local-trust-stag |
Run a local (on-premises) trust in staging mode (HTTPS via nginx-tls) |
make unit_test |
Run the tests for all services |
You can add new commands to the Makefile to create smaller deployments for testing and development.
The XNAT services are deployed using Docker Swarm mode for better resource management and scalability. Docker Swarm is automatically used when running make up or make up-trusts.
Key features of Swarm deployment:
- Better resource allocation with CPU and memory limits
- Automatic service recovery with restart policies
- Overlay networking for secure service communication
- Support for multi-node deployment (if configured)
Swarm-specific commands:
- XNAT services are deployed as Docker stacks (
xnat1andxnat2) - The Swarm deployment uses the trust/xnat/docker-compose-stack.yml file
- Networks are created as overlay networks with
--attachableflag for flexibility
Note: Docker Swarm mode must be initialized on your system. If not already initialized, run:
docker swarm initAfter that, you will need to restart the docker networks used by the services:
there is a command to create the networks, but you will need to remove them manually first if they are already running:
docker network rm deploy_trust-network-1
docker network rm deploy_trust-network-2Then create the networks again:
make create-networksTo manually manage XNAT services (uses Docker Swarm):
cd trust/xnat
make up # Start XNAT services
make down # Stop XNAT services
make xnat-shell # Get a shell in the XNAT containerTo start the full platform locally:
make upThis will start all the services defined in the deploy/compose.development.yml file. The services will be started in detached
mode, so you can continue using your terminal. Use docker compose ps to see the status of the services and see which
ports they are running on.
To get a shell some of the services, you can run:
docker compose -f deploy/compose.development.yml exec < service-name > < command >For example:
docker compose -f deploy/compose.development.yml exec flip-ui /bin/shThis will give you a shell in the flip-ui container. You can run any command inside the container, including
installing new packages, running tests, and debugging the code.
Some aliases are defined in the Makefile to make this easier:
make downIf you want to run a single service you can run:
docker compose -f deploy/compose.development.yml run --rm < service name >The project supports NVIDIA FLARE and Flower Framework for federated learning. FLARE requires provisioned certificates and configuration files that are generated in the separate repository flip-fl-base (see that repository for instructions on how to provision the workspace).
-
Path Resolution: While
.env.developmentdefinesFL_PROVISIONED_DIRas a relative path (../flip-fl-base/workspace), the Makefile automatically converts this to an absolute path using:override FL_PROVISIONED_DIR := $(shell realpath $(dir $(lastword $(MAKEFILE_LIST)))/../flip-fl-base/workspace)
This ensures Docker volume mounts work correctly (Docker requires absolute paths) while maintaining portability across different machines.
-
Why This Matters: Docker Compose cannot resolve relative paths for volume mounts, so the absolute path conversion is essential for FL services to access their provisioned certificates and configuration files.
If you see errors like "fed_client.json does not exist" or "missing startup folder", verify that:
- The flip-fl-base repository is cloned as a sibling directory
- The workspace has been properly provisioned with NVFLARE certificates
- The
FL_PROVISIONED_DIRpath is correctly resolved (check Makefile output)
For production deployments on AWS, see the AWS Deployment Guide. This covers provisioning infrastructure with OpenTofu (Terraform), configuring AWS services, and deploying the platform at scale.
For hybrid on-premises trust deployments, see the Local Trust Deployment Guide.
The repository is organised as follows:
deploy: Contains the Docker deployment and infrastructure filesdocs: Contains the documentation filesflip-api: Contains the central hub API serviceflip-ui: Contains the UI servicetrust: Contains the services that would be deployed in individual trust environments.data-access-api: Contains the data access API serviceimaging-api: Contains the imaging API serviceomop-db: Contains a mocked OMOP databaseorthanc: Contains a mocked PACS service (uses Orthanc)trust-api: Contains the trust API servicenginx: Contains the nginx TLS termination proxy for trust HTTPS endpointsxnat: Contains a mocked XNAT service
Trust services are served over HTTPS via an nginx TLS termination proxy using self-signed CA certificates. The Central Hub verifies trust endpoints using a CA bundle containing all trust CAs. See trust/README.md for certificate generation and setup, and deploy/providers/local/README.md for hybrid on-premises deployment with HTTPS.
We welcome contributions from the community. See CONTRIBUTING.md for guidance on setting up a development environment, adding new services, coding standards, testing practices, and the pull request process.

