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.

  1. Install a Python 3.8 (>=3.6, <3.9) virtual environment using venv.

See the Venv installation guide for details.

  1. Create a new Virtualenv environment for the project.

    python3 -m venv venv
  2. Activate the virtual environment.

    source venv/bin/activate
  3. Install the OpenFL package.

    1. Installation from PyPI:

      python -m pip install openfl
    2. Installation from source:

      1. Clone the OpenFL repository:

        git clone
      2. Install build tools, before installing OpenFL:

        python -m pip install -U pip setuptools wheel
        cd openfl/
        python -m pip install .
  4. Run the fx command 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.

  1. Install Docker on all nodes in the federation.

See the Docker installation guide for details.

  1. 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.
  2. 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
    cd openfl
    docker build -f openfl-docker/Dockerfile.base .