- Use Ansible to easily run distributed federated learning framework FedTree in 1 command
- install ansible https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html
- install FedTree https://github.com/Xtra-Computing/FedTree
- set ssh connection for ansible clients https://docs.ansible.com/ansible/latest/inventory_guide/connection_details.html
- set alias (server / client1 ...) in /etc/hosts
- set ssh connection from fedtree clients to fedtree server
-
setting ansible hosts:
vi /etc/ansible/hosts
[fedtree_server] server1 ansible_ssh_host=<ip0> [fedtree_client] client1 ansible_ssh_host=<ip1> client2 ansible_ssh_host=<ip2> client3 ansible_ssh_host=<ip3>
-
set host_vars machine_index for each client
vi /etc/ansible/group_vars/client1
machine_index: 0
vi /etc/ansible/group_vars/client2
machine_index: 1
vi /etc/ansible/group_vars/client3
machine_index: 2
-
after dataset is ready and both fedtree conf and start_training.yml are modified, run following cmd in terminal:
ansible-playbook start_training.yml