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

Return to the regular view of this page.

Setting up AI Developer Edition

The steps to set up the product.

Complete the prerequisites, register for access to AI Developer Edition API Service, set up, verify, and run the required files for using Protegrity AI Developer Edition.

1 - Prerequisites

The prerequisites for setting up AI Developer Edition.

General requirements

The system requirements for the AI Developer Edition are provided here.

Hardware requirements

For the local docker deployment mode, a machine with the following specifications enables the user to experiment with the main features:

  • RAM: 16 GB
  • CPU: 8 core
  • GPU: 4 GB VRAM, for Synthetic Data only
  • Hard Disk: 50GB available

Software requirements

  • Python v3.11 and above is installed. For more information about installing Python, refer to the Python website. Ensure that the Python command points to a supported python3 version, for example, Python 3.11.11. Verify using the python --version command.
  • For installing packages: pip.
  • Python Virtual Environment.
  • Docker CLI is installed to manage Docker containers.
  • Docker Compose is installed for local containerized deployments. This application supports Docker Compose V2.30 and later. Ensure that your installation supports this version.
  • Git is installed for cloning the repository.
  • Java 11 or later.
  • Maven 3.6+ for AP Java.
  • Cursor, an AI-powered code editor.
  • Python v3.11 and above is installed. For more information about installing Python, refer to the Python website. Ensure that the Python command points to a supported python3 version, for example, Python 3.11. Verify using the python --version command.
  • For installing packages: pip.
  • Python Virtual Environment.
  • Docker CLI is installed to manage Docker containers.
  • Docker Compose is installed for local containerized deployments. This application supports Docker Compose V2.30 and later. Ensure that your installation supports this version.
  • Git is installed for cloning the repository.
  • Java 11 or later.
  • Maven 3.6+ for AP Java.
  • Python v3.11 and above is installed. For more information about installing Python, refer to the Python website. Ensure that the Python command points to a supported python3 version, for example, Python 3.11. Verify using the python --version command.
  • For installing packages: pip.
  • Python Virtual Environment.
  • Docker Desktop or Colima is installed.
  • Docker Compose is installed for local containerized deployments. This application supports Docker Compose V2.30 and later. Ensure that your installation supports this version.
  • Git is installed for cloning the repository.
  • Java 11 or later.
  • Maven 3.6+ for AP Java.

Additional settings for macOS

macOS requires additional steps for Docker and for systems with Apple Silicon chips. Complete the following steps before using AI Developer Edition.

  1. Complete one of the following options to apply the settings.

    • For Colima:
      1. Open a command prompt.
      2. Run the following command.
        colima start --vm-type vz --vz-rosetta --memory 8
        
    • For Docker Desktop:
      1. Open Docker Desktop.
      2. Go to Settings > General.
      3. Enable the following check boxes:
        • Use Virtualization framework
        • Use Rosetta for x86_64/amd64 emulation on Apple Silicon
      4. Click Apply & restart.
  2. Update one of the following options for resolving certificate related errors.

    • For Colima:
      1. Open a command prompt.

      2. Navigate and open the following file.

        ~/.colima/default/colima.yaml
        
      3. Update the following configuration in colima.yaml to add the path for obtaining the required images.

        Before update:

        docker: {}
        

        After update:

        docker:
            insecure-registries:
                - ghcr.io
        
      4. Save and close the file.

      5. Stop colima.

        colima stop
        
      6. Close and start the command prompt.

      7. Start colima.

        colima start --vm-type vz --vz-rosetta --memory 8
        
    • For Docker Desktop:
      1. Open Docker Desktop.

      2. Click the gear or settings icon.

      3. Click Docker Engine from the sidebar. The editor opens the current Docker daemon configuration daemon.json.

      4. Locate and add the insecure-registries key in the root JSON object. Ensure that a comma is added after the last value in the existing configuration.

        After update:

        {
            .
            .
            <existing configuration>,
            "insecure-registries": [
                "ghcr.io",
                "githubusercontent.com"
            ]
        }
        
      5. Click Apply & Restart to save the changes and restart Docker Desktop.

      6. Verify: After Docker restarts, run docker info in your terminal and confirm that the required registry is listed under Insecure Registries.

  3. Optional: If the The requested image’s platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested error is displayed.

    1. Start a command prompt.

    2. Navigate and open the following file.

      ~/.docker/config.json
      
    3. Add the following parameter.

      "default-platform": "linux/amd64"
      
    4. Save and close the file.

    5. Run docker compose up -d from the protegrity-ai-developer-edition directory if already cloned, else continue with the setup.

2 - Obtaining access to the AI Developer Edition API Service

Creating a user account and completing the registration.

The tokenization and encryption features are processed by the AI Developer Edition API Service. Free registration is required to access this service.

Note: Registration is only required for running the APIs to protect, unprotect, and reprotect data. The find and redact that uses Data Discovery, Semantic Guardrails, and Synthetic Data features can be used without registration. Skip this section if find and protect that uses the tokenization and encryption feature is not required.

Registering for access

Sign up for access to the AI Developer Edition API Service. This is required for obtaining access to use the APIs.

  1. Open a web browser.
  2. Navigate to https://www.protegrity.com/developers/dev-edition-api.
  3. Specify the following details:
    • First Name
    • Last Name
    • Work Email
    • Job Title
    • Company Name
    • Country
  4. Click the Terms & Conditions link and read the terms and conditions.
  5. Select the check box to accept the terms and conditions.
  6. Click Get Started.

The request is analyzed. After the request is approved, a password and API key to access the AI Developer Edition API Service are sent to the Work Email specified. If the account already exists, then the details are re-sent to the email address. The email takes a minute or two to arrive. If the email does not arrive in the specified email’s inbox, check the spam or junk folder first, before retrying.

Before running requests, verify that the AI Developer Edition Service is running. The service availability can be monitored on the status page, refer to AI Developer Edition System Status.

Note: Use the online notebook with the credentials to test tokenization, refer to Protegrity Data Protection Jupyter notebook.

Specifying the authentication information

Set the credentials from your registration email as environment variables to access the AI Developer Edition API Service.

Note: It is recommended to add the details to the environment variables to avoid specifying the information every time the environment is initialized.

  1. Open a command prompt.
  2. Initialize a Python virtual environment.
  3. Add the email address of the user.
export DEV_EDITION_EMAIL='<Email_used_for_registration>'
$env:DEV_EDITION_EMAIL = '<Email_used_for_registration>' 
export DEV_EDITION_EMAIL='<Email_used_for_registration>'
  1. Specify the password provided in the registration email.
export DEV_EDITION_PASSWORD='<Password_provided_in_email>'
$env:DEV_EDITION_PASSWORD = '<Password_provided_in_email>' 
export DEV_EDITION_PASSWORD='<Password_provided_in_email>'
  1. Specify the API key for accessing the AI Developer Edition API Service.
export DEV_EDITION_API_KEY='<API_key_provided_in_email>'
$env:DEV_EDITION_API_KEY = '<API_key_provided_in_email>'  
export DEV_EDITION_API_KEY='<API_key_provided_in_email>'
  1. Verify that the variables are set.
test -n "$DEV_EDITION_EMAIL" && echo "EMAIL $DEV_EDITION_EMAIL set" || echo "EMAIL missing"
test -n "$DEV_EDITION_PASSWORD" && echo "PASSWORD $DEV_EDITION_PASSWORD set" || echo "PASSWORD missing"
test -n "$DEV_EDITION_API_KEY" && echo "API KEY $DEV_EDITION_API_KEY set" || echo "API KEY missing"
if ($env:DEV_EDITION_EMAIL) { Write-Output "EMAIL $env:DEV_EDITION_EMAIL set"} else { Write-Output "EMAIL missing"} 
if ($env:DEV_EDITION_PASSWORD) { Write-Output "PASSWORD $env:DEV_EDITION_PASSWORD set" } else { Write-Output "PASSWORD missing" } 
if ($env:DEV_EDITION_API_KEY) { Write-Output "API KEY $env:DEV_EDITION_API_KEY set" } else { Write-Output "API KEY missing" } 
test -n "$DEV_EDITION_EMAIL" && echo "EMAIL $DEV_EDITION_EMAIL set" || echo "EMAIL missing"
test -n "$DEV_EDITION_PASSWORD" && echo "PASSWORD $DEV_EDITION_PASSWORD set" || echo "PASSWORD missing"
test -n "$DEV_EDITION_API_KEY" && echo "API KEY $DEV_EDITION_API_KEY set" || echo "API KEY missing"

AI Developer Edition API Service usage guidelines

To ensure fair use of the API service, a rate limit is enforced on API requests to the AI Developer Edition API Service.

These limits are:

  • Request rate: 50 per second
  • Burst: up to 100
  • Quota: 10,000 requests per user per day
  • Maximum payload size: 1MB

3 - Obtaining the packages

Downloading the packages.

The following packages are available for download:

  • protegrity-ai-developer-edition: Contains Docker Compose files, sample applications, and configuration templates.
  • protegrity-ai-developer-python: Contains the source files for customizing and using the Python module.
  • protegrity-ai-developer-java: Contains the source files for customizing and using the Java library.

Cloning the repositories

Sync the repositories to download the packages onto your local system. You can use the git clone command to clone the repositories.

  1. Navigate to the Protegrity AI Developer Edition repository.

  2. Clone or download protegrity-ai-developer-edition for testing the features.

    git clone https://github.com/Protegrity-AI-Developer-Edition/protegrity-ai-developer-edition.git
    
  3. Clone or download protegrity-ai-developer-python for customizing the Python module.

    git clone https://github.com/Protegrity-AI-Developer-Edition/protegrity-ai-developer-python.git
    
  4. Clone or download protegrity-ai-developer-java for customizing the Java library.

    git clone https://github.com/Protegrity-AI-Developer-Edition/protegrity-ai-developer-java.git
    
  5. Verify the files in the package. The list of files in the git package can be obtained from the files list.

  1. Back up the Protegrity AI Developer Edition repository if the Python and configuration files are updated.

    Note: The supported entities are updated. For more information about the entities, refer to Supported Entities.

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

  3. Run the following command to stop the containers.

    docker compose down
    

    Based on your configuration use the docker-compose down command.

  4. Sync to update the repositories on the local system using the git pull command.

  5. Verify the files in the package. The list of files in the git package can be obtained from the files list.

Setting up feature containers

After downloading the common packages, set up the containers for the features you want to use. Refer to the setup instructions in each feature section:

Setting up Jupyter notebook

Set up the Jupyter notebook for working with the notebooks provided from the cloned repository location for protegrity-ai-developer-edition. Ensure that the Python virtual environment is activated before running this command.

pip install -r shared/requirements.txt

4 - Verifying the repository structure

The list of files available in the AI Developer Edition repositories.

protegrity-ai-developer-edition repository

This repository contains the files for obtaining and running the sample application.

  • CHANGELOG.md: Tracks version updates and changes.
  • CODE_OF_CONDUCT.md: Details the policies of equality followed at Protegrity.
  • CONTRIBUTING.md: The guidelines for contributing to the project.
  • LICENSE: The license file with the terms and conditions for using the application.
  • README.md: The readme file specifying the steps to set up the product.
  • .gitignore: The files and directories to ignore in version control.
  • anonymization: The directory with the sample application and scripts for Anonymization.
  • binder: The files for running the binder.
  • community-solutions: The solutions and projects provided by the community for showcasing and using AI Developer Edition.
  • data-discovery: The directory with the sample application and scripts for Data Discovery.
  • data-protection: The directory with the sample application and scripts for protecting, unprotecting, and reprotecting data.
  • semantic-guardrail: The directory with the sample scripts for Semantic Guardrails.
  • synthetic-data: The directory with the sample scripts for Synthetic Data.
  • samples: The directory with the sample application and scripts for testing the features.
    • python: The directory with the sample scripts for testing the features using Python.
  • shared: The directory with the configuration for AI Developer Edition features.
  • solutions: The directory with end-to-end solutions by Protegrity that combine multiple features.

protegrity-ai-developer-python repository

This repository contains the source files for customizing and building the Python module.

  • LICENSE: The license file with the terms and conditions for using the application.
  • README.md: The readme file for working with the Python file.
  • pyproject.toml: The configuration file for the script.
  • pytest.ini: The configuration file for the Pytest framework.
  • requirements.txt: The file lists the Python package dependencies required by the module.
  • setup.cfg: The additional settings for packaging and tools.
  • conda-recipe: The configuration files for building and distributing the module as a Conda package.
  • src: The core implementation of the Python module.
  • tests: The unit and integration tests to ensure that the Python module works as expected.
  • .gitignore: The files and directories to ignore in version control.
  • .pylintrc: The linting rules for code quality are defined here.
  • CHANGELOG.md: The file tracks version updates and changes.
  • CONTRIBUTIONS.md: The guidelines for contributing to the project.

protegrity-ai-developer-java repository

This repository contains the source files for customizing and building the Java library.

  • LICENSE: The license file with the terms and conditions for using the application.
  • README.md: The readme file for working with the Java library.
  • pom.xml: The Maven Project Object Model file for building the Java project.
  • .gitignore: The files and directories to ignore in version control.
  • mvnw and mvnw.cmd: The Maven Wrapper scripts for Linux, Mac, and Windows.
  • protegrity-ai-developer-edition: The additional modules or extensions for the Developer Edition.
  • integration-tests: The integration tests for validating the Java library functionality.
  • application-protector-java: The Java library implementation for the Application Protector service. It includes source code and configuration files.
  • .mvn/wrapper: The Maven Wrapper configuration files.

5 - Setting up the features

The steps to set up the features.

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

5.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
    

5.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
    

5.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
    

5.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.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.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.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)