5. Installation

Currently due to a certain amount of awkwardness of the python to Microsoft-SEAL bindings, the only “supported” installation method is by docker container. However we are working on fixing some of these issues in the near future, or at the very least supporting a second pure-python back-end so that installation is easier as a native library if that is desired.

5.1. Docker Registry

Dockerised images that you can play around with are available at: https://gitlab.com/deepcypher/python-fhez/container_registry/2063426

E.G, download and run interactively:

docker run -it registry.gitlab.com/deepcypher/python-reseal:master

5.2. Docker Build

If you would rather build this library locally/ for security reasons, you can issue the following build command from inside the projects root directory:

docker build -t archer/fhe -f Dockerfile_archlinux .


The build process could take several minutes to build, as it will compile, bind, and package the Microsoft-SEAL library in with itself.

5.2.1. Docker Documentation Build

To build the detailed documentation with all the autodoc functionality for the core classes, you can use your now built container to create these docs for you by:

docker run -v ${PWD}/docs/build/:/python-fhe/docs/build -it archer/fhe make -C /python-fhe/docs html

The docs will then be available in ${PWD}/docs/build/html for your viewing pleasure

5.2.2. Locally-Built Docker-Image Interactive Usage

To run the now locally built container you can issue the following command to gain interactive access, by selecting the tag (-t) that you named it previously (here it is archer/fhe):

docker run -it archer/fhe

5.3. FHE Modules/ Plugins

This library will support extensions that expose a uniform API which we call “errays” or encrypted-arrays much like numpy custom containers, of which as simple implementation can be achieved by inheriting from our erray class. We hope to add more modules over time and would welcome others implementations too. We ourselves support the following modules:

* Currently built in but being separated.


More instructions to follow on specific installation of modules once implementation is complete for them.

5.4. Build The Docs

If you would like to build the documentation manually, for example to auto-doc the API (which is not easy in RTD ) then from this directory:

  • build the Docker container (docker must be installed, repository must be cloned, and you must be in this directory)

sudo docker build -t archer/fhe -f Dockerfile_archlinux .  || exit 1
  • run the docker container with volume-mount, and trigger documentation build

sudo docker run -v ${PWD}/docs/build/:/python-fhe/docs/build -it archer/fhe make -C /python-fhe/docs html
  • you can then find the documentation in: ${PWD}/docs/build/html/

The docs will walk you through the rest. Enjoy.