-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Labels
enhancementNew feature or requestNew feature or requestfl-clientFederated Learning client issuesFederated Learning client issuesfl-serverFederated Learning server issuesFederated Learning server issues
Description
The current Docker images for FL client and server components are excessively large due to several optimization opportunities:
Current Issues
- Large ML Dependencies: Both images include PyTorch (torch==1.13.1) and TorchVision (torchvision==0.14.1), which significantly increase image size
- Unnecessary Files: The entire src/ directory is copied including pycache and potentially unused files
- No Multi-stage Builds: Single-stage builds include build dependencies in final images
- Excessive Networking Tools: Multiple networking utilities installed that may not all be needed
- Cache Not Cleaned: pip and apt caches not properly cleaned
Impact
- Increased storage requirements
- Slower image pulls and deployments
- Higher bandwidth usage in GNS3 environments
- Longer build times
Proposed Solutions
- Multi-stage Builds: Use separate build and runtime stages
- Selective Dependencies: Only install required ML libraries or use lighter alternatives
- Minimal Base Images: Consider alpine-based images or distroless
- Clean Copy Operations: Use .dockerignore and exclude unnecessary files
- Runtime Optimizations: Use python -m py_compile for bytecode, remove pip cache
Files to Update
- docker/flopynet_fl_client.Dockerfile
- docker/flopynet_fl_server.Dockerfile
- docker/requirements/fl-client-requirements.txt
- docker/requirements/fl-server-requirements.txt
Acceptance Criteria
- Reduce image size by at least 50%
- Maintain all required functionality
- No breaking changes to container interfaces
- Document size improvements in build logs
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestfl-clientFederated Learning client issuesFederated Learning client issuesfl-serverFederated Learning server issuesFederated Learning server issues