This is the documentation for the FeTS Platform, developed by CBICA at UPenn, in collaboration with Intel Labs, Intel AI and Intel IOT
Home |
---|
Application Setup |
Process the Data |
Run the Application |
Extras |
ITCR Connectivity |
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
sudo apt install python3.6 python3.6-venv python3.6-dev python3-setuptools
sudo apt-get install wget zip unzip # required to download and unzip model weights
cd ${download_location}
chmod +x ./FeTS_${version}_Installer.bin # optional addition of execution permission
./FeTS_${version}_Installer.bin --target ${install_path} # change ${install_path} to appropriate location
# accept license
cd ${install_path}/squashfs-root/usr/ # this is the ${fets_root_dir}
cd bin/OpenFederatedLearning
nvidia-smi # note the ${cuda_version}
# install pytorch using appropriate ${cuda_version}; see https://pytorch.org/get-started/locally/
./venv/bin/pip install torch torchvision # installs latest stable pytorch using CUDA 10.2 (we have tested with 1.7.1 with cuda-10.2)
# for cuda 9.2, this would be './venv/bin/pip install torch==1.7.1+cu92 torchvision==0.8.2+cu92 torchaudio==0.7.2 -f https://download.pytorch.org/whl/torch_stable.html'
# for cuda 10.1, this would be './venv/bin/pip install torch==1.7.1+cu101 torchvision==0.8.2+cu101 torchaudio==0.7.2 -f https://download.pytorch.org/whl/torch_stable.html'
If you run into the following error (or something similiar, related to the cryptography package):
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-m0u0eez3/cryptography/
Run the following commands for the solution:
cd ${fets_root_dir}/bin/OpenFederatedLearning
./venv/bin/python3 -m pip install -U pip
make install_openfl
make install_fets
cd ../LabelFusion
./venv/bin/python3 -m pip install -U pip
./venv/bin/pip install .
We have not tested with Ubuntu 20.04 and there might be unforseen stability issues with dependencies. That being said, if there is no other way around it, there are some pointers that can be followed to get FeTS up and running on this platform:
echo "deb http://archive.ubuntu.com/ubuntu xenial main" | sudo tee /etc/apt/sources.list.d/xenial.list
sudo apt-get update
sudo update-alternatives --remove-all gcc
sudo update-alternatives --remove-all g++
sudo apt-get install gcc-5 g++-5
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 10
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 10
These commands are run along with the installer, but in case you receive an error during the python environment setup, please follow these instructions:
cd ${fets_root_dir}
cd bin/OpenFederatedLearning
make install_openfl
./venv/bin/pip install opencv-python==4.2.0.34 # https://stackoverflow.com/a/63669919/1228757
make install_fets
# after this, the federated backend is ready
./venv/bin/pip install -e ./submodules/fets_ai/Algorithms/GANDLF # gandlf
cd ../LabelFusion
python3 -m venv venv
./venv/bin/pip install -e . # label fusion
cd ${fets_root_dir} # see previous step for where this would be
cd bin/OpenFederatedLearning/bin/federations/pki
bash create-collaborator.sh ${collaborator_common_name} # keep a note of the ${collaborator_common_name}, as it will be used for authentication and to send/receive jobs to/from the aggregator at UPenn
# this command will generate the following items, which needs to be saved for collaborator verification:
## a CSR file at `./client/${collaborator_common_name}.csr``
## a string of alpha-numeric numbers for hash verification - SAVE THIS FOR VERIFICATION!!
${fets_root_dir}/bin/OpenFederatedLearning/bin/federations/pki/client/${collaborator_common_name}.csr
), and not the verificiation hash, to admin@fets.ai.bash sign-csr.sh ${collaborator_common_name}.csr ${hashVerification}
${collaborator_common_name}.crt
${fets_root_dir}/bin/OpenFederatedLearning/bin/federations/pki/client/
${collaborator_common_name}.crt
${collaborator_common_name}.csr
${collaborator_common_name}.key