Depending on how you want to set up OpenFL, choose one of the following installation procedure.
Install the Package
Follow this procedure to prepare the environment and install the OpenFL package. Perform this procedure on every node in the federation.
Install a Python 3.8 (>=3.6, <3.9) virtual environment using venv.
See the Venv installation guide for details.
Create a new Virtualenv environment for the project.
python3 -m venv venv
Activate the virtual environment.
Install the OpenFL package.
Installation from PyPI:
python -m pip install openfl
Installation from source:
Clone the OpenFL repository:
git clone https://github.com/intel/openfl.git
Install build tools, before installing OpenFL:
python -m pip install -U pip setuptools wheel cd openfl/ python -m pip install .
fxcommand in the virtual environment to confirm OpenFL is installed.
Output of the fx Command
OpenFL with Docker*
Follow this procedure to download or build a Docker* image of OpenFL, which you can use to run your federation in an isolated environment.
The Docker* version of OpenFL is to provide an isolated environment complete with the prerequisites to run a federation. When the execution is over, the container can be destroyed and the results of the computation will be available on a directory on the local host.
Install Docker on all nodes in the federation.
See the Docker installation guide for details.
Check that Docker is running properly with the Hello World command:
$ docker run hello-world Hello from Docker! This message shows that your installation appears to be working correctly. ... ... ...
Build an image from the latest official OpenFL release:
docker pull intel/openfl
If you prefer to build an image from a specific commit or branch, perform the following commands:
git clone https://github.com/intel/openfl.git cd openfl docker build -f openfl-docker/Dockerfile.base .