This repository contains the code of: FedScope – Federated Host Embeddings from Telescope Traffic: Design and Implementation
- Clone this repository
- Create and activate a virtual environment (recommended):
cd fedscope
python -m venv ./.venv
source ./.venv/bin/activate- Install Python dependencies:
pip install -r requirements.txt5 Manual replacement of the original flwr library with the one modified:
rm -r ./.venv/lib/[PYTHON_VERSION]/site-packages/flwr
mv -r ./flwr ./.venv/lib/[PYTHON_VERSION]/site-packagesThis project can be run inside Docker containers (server + one or more clients). Below are minimal steps to build the images and run them locally.
- Docker (and optionally Docker Compose /
docker composeplugin) - Linux is required for
network_mode: hostin the provided compose file
- Build the base image (it contains the library used by client and server):
docker build -f docker/base.Dockerfile -t fedscope_base_image:latest .- Build server and client images:
docker build -f docker/server.Dockerfile -t fedscope_server:latest .
docker build -f docker/client.Dockerfile -t fedscope_client:latest .Tip: If you intend to push images to a registry, tag them as
<NAME>/fedscope_server:latestand<NAME>/fedscope_client:latestbefore pushing.
The compose file at docker/compose.yaml references images like <NAME>/fedscope_server:latest. Either replace <NAME>/ with your registry/username or remove it to use the locally-built images.
Then start containers:
docker compose -f docker/compose.yaml up