2. Setup Environment

Before installing and configuring Cifer's FHE, it's important to properly prepare your environment. Follow these steps to ensure a smooth setup process:

Update Python

Cifer requires Python 3.8 or later. To check your Python version:

bash
python --version

If Python is not installed or you need to upgrade, download and install the latest version from python.org.

Set Up a Virtual Environment

It's recommended to use a virtual environment to avoid conflicts with other Python projects:

bash
python -m venv cifer_env

Activate the virtual environment:

  • On Linux or macOS:

bash
source cifer_env/bin/activate
  • On Windows:

bash
cifer_env\Scripts\activate

Upgrade pip

Ensure you have the latest version of pip:

bash
pip install --upgrade pip

Check GPU/TPU Availability (Optional)

If you plan to use GPU or TPU acceleration:

For NVIDIA GPUs:

bash
nvidia-smi

For TPUs (on Google Cloud):

bash
gcloud compute tpus list

Set Up Cloud Environment (for Collaboration Mode)

If you're planning to contribute your encrypted data as part of a collaborative Federated Learning.

  1. Ensure you have access to a cloud platform (e.g., AWS, Google Cloud, Azure).

  2. Set up firewall rules to allow communication on the required ports.

  3. Prepare a shared storage solution for model checkpoints (e.g., S3, Google Cloud Storage).

Prepare Your Dataset / Model

Organize your dataset or model as follows:

  • Split the data into appropriate training and validation sets as needed.

  • Store the raw files in a directory accessible to your local environment or the FHE client.

Important: The data must be preprocessed and converted into numerical array format prior to encryption. Cifer's FHE uses .npz as the standard input format. You will find detailed .npz preparation steps in the Configuration section.

Review System Requirements

Double-check that your system meets all the requirements listed in the previous section, including RAM, storage, and any specific hardware needs.

Last updated