Install the features that you require to use and test the product.
This is the multi-page printable view of this section. Click here to print.
Setting up the features
- 1: Setting up Data Discovery
- 2: Setting up Semantic Guardrails
- 3: Setting up Synthetic Data
- 4: Setting up Anonymization
- 5: Setting up Data Protection Features
1 - Setting up Data Discovery
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.
Open a command prompt.
Navigate to the cloned repository location for protegrity-ai-developer-edition.
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 -dBased on your configuration use the
docker-compose up -dcommand. Ensure that you bring down the containers usingdocker compose downbefore 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 frompublic.ecr.aws, navigate to thedata-discoverydirectory and copy the.env.examplefile to.env. Open the.envfile and uncomment theREGISTRY=public.ecr.aws/protegrity-ai-developer-editionline in the file. Save the file and run thedocker compose up -dcommand to download and start the containers.Verify that the containers started successfully.
docker compose logsSet 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
Open a command prompt.
Navigate to the cloned repository location for protegrity-ai-developer-edition.
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-orphansDelete the docker network resources.
docker network rm -f <network_name_or_id>For example,
docker network rm -f protegrity-networkRun 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 -dBased on your configuration use the
docker-compose up -dcommand. Ensure that you bring down the containers usingdocker compose downbefore switching between starting just Data Discovery containers or Data Discovery and Semantic Guardrails containers.Verify that the containers started successfully.
docker compose logsSet 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
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.
Open a command prompt.
Navigate to the cloned repository location for protegrity-ai-developer-edition.
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 -dBased on your configuration use the
docker-compose up -dcommand. Ensure that you bring down the containers usingdocker compose downbefore 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 frompublic.ecr.aws, navigate to thesemantic-guardraildirectory and copy the.env.examplefile to.env. Open the.envfile and uncomment theREGISTRY=public.ecr.aws/protegrity-ai-developer-editionline in the file. Save the file and run thedocker compose up -dcommand to download and start the containers.Verify that the containers started successfully.
docker compose logs
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
Open a command prompt.
Navigate to the cloned repository location for protegrity-ai-developer-edition.
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-orphansDelete the docker network resources.
docker network rm -f <network_name_or_id>For example,
docker network rm -f protegrity-networkRun 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 -dBased on your configuration use the
docker-compose up -dcommand. Ensure that you bring down the containers usingdocker compose downbefore switching between starting just Data Discovery containers or Data Discovery and Semantic Guardrails containers.Verify that the containers started successfully.
docker compose logsSet 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
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.
Open a command prompt.
Navigate to the cloned repository location for protegrity-ai-developer-edition.
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 -dBased on your configuration use the
docker-compose up -dcommand.Note: By default images are obtained from
ghcr.io. To obtain images frompublic.ecr.aws, navigate to thesynthetic-datadirectory and copy the.env.examplefile to.env. Open the.envfile and uncomment theREGISTRY=public.ecr.aws/protegrity-ai-developer-editionline in the file. Save the file and run thedocker compose up -dcommand to download and start the containers.Verify that the containers started successfully.
docker compose logsSet 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.txtInstall the Synthetic Data SDK package.
pip install protegrity-synthetic-data-sdk
Open a command prompt.
Navigate to the cloned repository location for protegrity-ai-developer-edition.
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-orphansDelete the docker network resources.
docker network rm -f <network_name_or_id>For example,
docker network rm -f protegrity-networkRun 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 -dBased on your configuration use the
docker-compose up -dcommand.Verify that the containers started successfully.
docker compose logsSet 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.txtUpgrade the Synthetic Data SDK package.
pip install --upgrade protegrity-synthetic-data-sdk
4 - Setting up Anonymization
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.
Open a command prompt.
Navigate to the cloned repository location for protegrity-ai-developer-edition.
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 -dBased on your configuration use the
docker-compose up -dcommand.Note: By default images are obtained from
ghcr.io. To obtain images frompublic.ecr.aws, navigate to theanonymizationdirectory and copy the.env.examplefile to.env. Open the.envfile and uncomment theREGISTRY=public.ecr.aws/protegrity-ai-developer-editionline in the file. Save the file and run thedocker compose up -dcommand to download and start the containers.Verify that the containers started successfully.
docker compose logsSet 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.txtInstall the Anonymization SDK package.
pip install protegrity-anonymization-sdk
5 - Setting up Data Protection Features
Prerequisites
Ensure that the following prerequisites are met before running these examples for tokenizing data:
- Python, pip, Java, and Maven are installed. For more information, refer to Setting Up AI Developer Edition.
- Credentials to access AI Developer Edition API Service are obtained by registering for free. For more information, refer to Obtaining access to the AI Developer Edition API Service.
- Required modules and libraries are installed. For more information, refer to Installing the Python module and Installing the Java library.
- For shell samples: Bash version greater than or equal to 5.1.8 and curl version greater than or equal to 7.76.1.
- 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: 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.
Open a command prompt.
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-pythonThe installation completes and the success message is displayed. To compile and install the Python module from source, refer to Building the Python module.
Open a command prompt.
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-pythonThe 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
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_pythonmodule from the Python virtual environment if it is already installed.pip uninstall protegrity_developer_python
Build the protegrity-ai-developer-python module
Clone the repository.
git clone https://github.com/Protegrity-AI-Developer-Edition/protegrity-ai-developer-python.gitNavigate to the
protegrity-ai-developer-pythondirectory in the cloned location.Optional: Update the files in the Python source directory as required.
Activate the Python virtual environment.
Install the dependencies.
pip install -r requirements.txtBuild 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
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
- Git is installed for cloning the repository.
- Java 11 or later is installed for compiling the library.
- Maven 3.6 or later is installed or use the included Maven wrapper.
Build and test the protegrity-ai-developer-java library
Clone the repository.
git clone https://github.com/Protegrity-AI-Developer-Edition/protegrity-ai-developer-java.gitNavigate to the
protegrity-ai-developer-javadirectory in the cloned location.Optional: Update the files in the Java source directory as required.
Build the project using Maven wrapper. It is recommended to use this method.
./mvnw clean installOR Build the project using system Maven.
mvn clean installThe 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)