This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

Setting up the features

The steps to set up the features.

Install the features that you require to use and test the product.

1 - Setting up Data Discovery

Installation instructions for the Data Discovery feature.

Prerequisites

Ensure that the following prerequisites are met before running these examples for Data Discovery:

  • Docker CLI, Docker Compose, and Python are installed. For more information, refer to Setting Up AI Developer Edition.
  • For shell samples: Bash version greater than or equal to 5.1.8 and curl version greater than or equal to 7.76.1.
  • For notebook samples: JupyterLab version greater than or equal to 4.5.6.

Installation

Use the containers to set up the Data Discovery components required for identifying sensitive data.

  1. Open a command prompt.

  2. Navigate to the cloned repository location for protegrity-ai-developer-edition.

  3. Run the following command to download and start the containers. The dependent containers are large in size. Based on the network connection, the containers might take time to download and deploy.

    cd data-discovery
    docker compose up -d
    

    Based on your configuration use the docker-compose up -d command. Ensure that you bring down the containers using docker compose down before switching between starting just Data Discovery containers or Data Discovery and Semantic Guardrails containers.

    Note: By default images are obtained from ghcr.io. To obtain images from public.ecr.aws, navigate to the data-discovery directory and copy the .env.example file to .env. Open the .env file and uncomment the REGISTRY=public.ecr.aws/protegrity-ai-developer-edition line in the file. Save the file and run the docker compose up -d command to download and start the containers.

  4. Verify that the containers started successfully.

    docker compose logs
    
  5. Set up the Jupyter notebook for working with the notebooks provided from the cloned repository location for protegrity-ai-developer-edition.

    pip install -r shared/requirements.txt
    
  1. Open a command prompt.

  2. Navigate to the cloned repository location for protegrity-ai-developer-edition.

  3. If the step to stop containers was missed earlier, then use the following commands to identify and remove the AI Developer Edition containers.

    docker compose down --remove-orphans
    
  4. Delete the docker network resources.

    docker network rm -f <network_name_or_id>
    

    For example,

    docker network rm -f protegrity-network
    
  5. Run the following command to download and start the containers. The dependent containers are large in size. Based on the network connection, the containers might take time to download and deploy.

    cd data-discovery
    docker compose up -d
    

    Based on your configuration use the docker-compose up -d command. Ensure that you bring down the containers using docker compose down before switching between starting just Data Discovery containers or Data Discovery and Semantic Guardrails containers.

  6. Verify that the containers started successfully.

    docker compose logs
    
  7. Set up the Jupyter notebook for working with the notebooks provided from the cloned repository location for protegrity-ai-developer-edition.

    pip install -r shared/requirements.txt
    

2 - Setting up Semantic Guardrails

Installation instructions for the Semantic Guardrails feature.

Prerequisites

Ensure that the following prerequisites are met before running these examples for Semantic Guardrails:

  • Docker CLI, Docker Compose, and Python are installed. For more information, refer to Setting Up AI Developer Edition.
  • For shell samples: Bash version greater than or equal to 5.1.8 and curl version greater than or equal to 7.76.1.
  • For notebook samples: JupyterLab version greater than or equal to 4.5.6.

Installation

Use the containers to set up Semantic Guardrails components required for identifying sensitive data.

  1. Open a command prompt.

  2. Navigate to the cloned repository location for protegrity-ai-developer-edition.

  3. Run the following command to download and start the containers. The dependent containers are large in size. Based on the network connection, the containers might take time to download and deploy.

    cd semantic-guardrail
    docker compose up -d
    

    Based on your configuration use the docker-compose up -d command. Ensure that you bring down the containers using docker compose down before switching between starting just Data Discovery containers or Data Discovery and Semantic Guardrails containers.

    Note: By default images are obtained from ghcr.io. To obtain images from public.ecr.aws, navigate to the semantic-guardrail directory and copy the .env.example file to .env. Open the .env file and uncomment the REGISTRY=public.ecr.aws/protegrity-ai-developer-edition line in the file. Save the file and run the docker compose up -d command to download and start the containers.

  4. Verify that the containers started successfully.

docker compose logs
  1. Set up the Jupyter notebook for working with the notebooks provided from the cloned repository location for protegrity-ai-developer-edition.

    pip install -r shared/requirements.txt
    
  1. Open a command prompt.

  2. Navigate to the cloned repository location for protegrity-ai-developer-edition.

  3. If the step to stop containers was missed earlier, then use the following commands to identify and remove the AI Developer Edition containers.

    docker compose down --remove-orphans
    
  4. Delete the docker network resources.

    docker network rm -f <network_name_or_id>
    

    For example,

    docker network rm -f protegrity-network
    
  5. Run the following command to download and start the containers. The dependent containers are large in size. Based on the network connection, the containers might take time to download and deploy.

    cd semantic-guardrail
    docker compose up -d
    

    Based on your configuration use the docker-compose up -d command. Ensure that you bring down the containers using docker compose down before switching between starting just Data Discovery containers or Data Discovery and Semantic Guardrails containers.

  6. Verify that the containers started successfully.

    docker compose logs
    
  7. Set up the Jupyter notebook for working with the notebooks provided from the cloned repository location for protegrity-ai-developer-edition.

    pip install -r shared/requirements.txt
    

3 - Setting up Synthetic Data

Installation instructions for the Synthetic Data feature.

Prerequisites

Ensure that the following prerequisites are met before running these examples for Synthetic Data:

  • Docker CLI, Docker Compose, and Python are installed. For more information, refer to Setting Up AI Developer Edition.
  • For shell samples: Bash version greater than or equal to 5.1.8 and curl version greater than or equal to 7.76.1.
  • For notebook samples: JupyterLab version greater than or equal to 4.5.6.

Installation

Use the containers to set up the Synthetic Data feature for data generation.

  1. Open a command prompt.

  2. Navigate to the cloned repository location for protegrity-ai-developer-edition.

  3. Run the following command to download and start the containers. The dependent containers are large in size. Based on the network connection, the containers might take time to download and deploy.

    cd synthetic-data
    docker compose up -d
    

    Based on your configuration use the docker-compose up -d command.

    Note: By default images are obtained from ghcr.io. To obtain images from public.ecr.aws, navigate to the synthetic-data directory and copy the .env.example file to .env. Open the .env file and uncomment the REGISTRY=public.ecr.aws/protegrity-ai-developer-edition line in the file. Save the file and run the docker compose up -d command to download and start the containers.

  4. Verify that the containers started successfully.

    docker compose logs
    
  5. Set up the Jupyter notebook for working with the notebooks provided from the cloned repository location for protegrity-ai-developer-edition.

    pip install -r shared/requirements.txt
    
  6. Install the Synthetic Data SDK package.

    pip install protegrity-synthetic-data-sdk
    
  1. Open a command prompt.

  2. Navigate to the cloned repository location for protegrity-ai-developer-edition.

  3. If the step to stop containers was missed earlier, then use the following commands to identify and remove the AI Developer Edition containers.

    docker compose down --remove-orphans
    
  4. Delete the docker network resources.

    docker network rm -f <network_name_or_id>
    

    For example,

    docker network rm -f protegrity-network
    
  5. Run the following command to download and start the containers. The dependent containers are large in size. Based on the network connection, the containers might take time to download and deploy.

    cd synthetic-data
    docker compose up -d
    

    Based on your configuration use the docker-compose up -d command.

  6. Verify that the containers started successfully.

    docker compose logs
    
  7. Set up the Jupyter notebook for working with the notebooks provided from the cloned repository location for protegrity-ai-developer-edition.

    pip install -r shared/requirements.txt
    
  8. Upgrade the Synthetic Data SDK package.

    pip install --upgrade protegrity-synthetic-data-sdk
    

4 - Setting up Anonymization

Installation instructions for the Anonymization feature.

Prerequisites

Ensure that the following prerequisites are met before running these examples for Anonymization:

  • Docker CLI, Docker Compose, and Python are installed. For more information, refer to Setting Up AI Developer Edition.
  • For shell samples: Bash version greater than or equal to 5.1.8 and curl version greater than or equal to 7.76.1.
  • For notebook samples: JupyterLab version greater than or equal to 4.5.6.

Installation

Use the containers to set up the Anonymization feature required for identifying sensitive data.

  1. Open a command prompt.

  2. Navigate to the cloned repository location for protegrity-ai-developer-edition.

  3. Run the following command to download and start the containers. The dependent containers are large in size. Based on the network connection, the containers might take time to download and deploy.

    cd anonymization
    docker compose up -d
    

    Based on your configuration use the docker-compose up -d command.

    Note: By default images are obtained from ghcr.io. To obtain images from public.ecr.aws, navigate to the anonymization directory and copy the .env.example file to .env. Open the .env file and uncomment the REGISTRY=public.ecr.aws/protegrity-ai-developer-edition line in the file. Save the file and run the docker compose up -d command to download and start the containers.

  4. Verify that the containers started successfully.

    docker compose logs
    
  5. Set up the Jupyter notebook for working with the notebooks provided from the cloned repository location for protegrity-ai-developer-edition.

    pip install -r shared/requirements.txt
    
  6. Install the Anonymization SDK package.

    pip install protegrity-anonymization-sdk
    

5 - Setting up Data Protection Features

Installation instructions for the Data Protection features.

Prerequisites

Ensure that the following prerequisites are met before running these examples for tokenizing data:

Note: The Java samples provided in this section are for Linux or macOS. For Windows, use <filename>.bat.

Installation

Steps to install the required modules and libraries for the Data Protection feature are provided below.

Installing the protegrity-ai-developer-python module

The module has built-in functions to find, redact, mask, and protect data.

  1. Open a command prompt.

  2. Install the protegrity-ai-developer-python module. It is recommended to install and activate the Python virtual environment before running this command.

    pip install protegrity-ai-developer-python
    

    The installation completes and the success message is displayed. To compile and install the Python module from source, refer to Building the Python module.

  1. Open a command prompt.

  2. Upgrade the protegrity-ai-developer-python module. It is recommended to install and activate the Python virtual environment before running the command.

    pip install --upgrade protegrity-ai-developer-python
    

    The package is successfully upgraded.

Installing the protegrity-ai-developer-java library

When you run the Java samples for the first time, Maven automatically pulls the protegrity-ai-developer-java library from Maven Central as a dependency. This ensures that all required classes and resources are available without manual download.

5.1 - Building the Python Module

Compiling and building the Python module.

The protegrity-ai-developer-python repository is part of the Protegrity AI Developer Edition suite. This repository provides the Python module for integrating Protegrity’s Data Discovery and Protection APIs into GenAI and traditional applications. Customize, compile, and use the module as per your requirement.

Note: This module should only be built and used if the source and default behavior are to be changed. Ensure that the Protegrity AI Developer Edition is set up before installing this module.
For setup instructions, refer to installation steps.

Prerequisites

  • Git is installed for cloning the repository.
  • Python v3.11 and above is installed for compiling the module.
  • For installing packages: pip
  • Python Virtual Environment is set up for installing the module and its dependencies.
  • Uninstall the protegrity_developer_python module from the Python virtual environment if it is already installed.
    pip uninstall protegrity_developer_python
    

Build the protegrity-ai-developer-python module

  1. Clone the repository.

    git clone https://github.com/Protegrity-AI-Developer-Edition/protegrity-ai-developer-python.git
    
  2. Navigate to the protegrity-ai-developer-python directory in the cloned location.

  3. Optional: Update the files in the Python source directory as required.

  4. Activate the Python virtual environment.

  5. Install the dependencies.

    pip install -r requirements.txt
    
  6. Build and install the Python module by running the following command from the root directory of the repository.

    pip install .
    

    The installation completes and the success message is displayed.

5.2 - Building the Java Libraries

Compiling and building the Java libraries.

The protegrity-ai-developer-java repository is part of the Protegrity AI Developer Edition suite. This repository provides the Java library for integrating Protegrity’s Data Discovery and Protection APIs into GenAI and traditional applications. Customize, compile, and use the Java library as per your requirement.

Note: This module should only be built and used if the source and default behavior are to be changed. Ensure that the Protegrity AI Developer Edition is set up before installing the Java library.
For setup instructions, refer to installation steps.

Prerequisites

Build and test the protegrity-ai-developer-java library

  1. Clone the repository.

    git clone https://github.com/Protegrity-AI-Developer-Edition/protegrity-ai-developer-java.git
    
  2. Navigate to the protegrity-ai-developer-java directory in the cloned location.

  3. Optional: Update the files in the Java source directory as required.

  4. Build the project using Maven wrapper. It is recommended to use this method.

    ./mvnw clean install
    

    OR Build the project using system Maven.

    mvn clean install
    

    The build completes and the success message is displayed. This creates:

    • application-protector-java/target/ApplicationProtectorJava-1.1.0.jar (fat JAR with dependencies)
    • protegrity-ai-developer-edition/target/ProtegrityDeveloperJava-1.1.0.jar (fat JAR with dependencies)
    • Maven artifacts in your local repository (.m2/repository)