Skip to main content

Overview

Note

Self-Hosted Deployment Note: If your organization has deployed Penfield in a self-hosted model (where the Penfield application is hosted on your corporate infrastructure), the Privacy service will communicate directly with your self-hosted Penfield backend, not with Penfield's hosted backend. The communication endpoint is determined by where your Penfield application is deployed.

This guide will walk you through the steps to set up, configure, and run the application.


System Requirements

  • OS: Windows 10 or higher
  • Python Version: 3.12.x
  • Conda: For managing Python environments
  • Git (optional): For cloning the repository
  • Tesseract: Required for OCR

Setup Instructions

Step 1: Install Miniconda

  1. If you don’t have Miniconda installed, download and install it from:
    Miniconda: https://www.anaconda.com/docs/getting-started/miniconda/install#quickstart-install-instructions

  2. Open Anaconda Prompt and run this command to add Conda to your PATH:

    conda init cmd.exe

Step 2: Install Tesseract

  1. Download Tesseract from https://github.com/UB-Mannheim/tesseract/wiki
  2. Once you download the installer, run it and install Tesseract.
  3. Once you install Tesseract, add it to your PATH.
  4. To add it to your PATH on windows, open the search bar and search for environment variables and click on Edit the system environment variables.
  5. In the System Properties window, click on the Environment Variables button.
  6. In the Environment Variables window, click on the Path variable and click on Edit.
  7. Click on New to add the path C:\Program Files\Tesseract-OCR to the PATH variable.
  8. Click on OK to save the changes.
  9. Click on OK to save the changes.
  10. Click on OK to save the changes.

Step 2: Download the code from the Gitlab repository

  1. Download the code from the Penfield Gitlab repository or Contact Penfield for the code.

Step 3: Create a Conda Environment

  1. Navigate to the Application Root:
    Before setting up the project, make sure you're in the directory where the environment.yml is located (the project root). Use the cd command to navigate there:

    cd path/to/privacy-service

    Replace path/to/privacy-service with the actual path to your project folder.

  2. Open the Anaconda PowerShell Prompt: Open the Prompt by going to start menu and search for Anaconda PowerShell Prompt and run next steps in that prompt.

  3. Create the Conda Environment (Optional):
    Create the Conda environment using the environment.yml file, if you already have a conda environment created, you can skip this step.

    conda env create -f environment.yml

    It will ask you to accept the Terms of Service, So please accept it.

Step 4: Activate and Verify Setup

  1. Activate the Conda Environment:
    After creating the Conda environment, activate it to ensure all the installed dependencies are available:

    conda activate win_sensor
  2. Verify Installation:
    Once the environment is activated, you can verify that everything is installed properly by listing the installed packages:

    conda list

    This will display all installed dependencies within the win_sensor environment.


Running the Windows sensor Application

Once the setup is complete, you can run the application using the following steps:

Step 1: Activate the Conda Environment

 conda activate win_sensor

Step 2: Navigate to the Application Directory

You need to navigate to the app directory where the main application script is located. If you're in the root project directory, run the following command:

cd path/to/privacy-service/

Replace path/to/privacy-service with the actual path to your project folder.

Step 3: Run the Application

Once inside the privacy-service directory, run the following command to start the application:

python main.py

This will start the application and begin monitoring user interactions.

Step 5: Stopping the Application

To stop the application, press Ctrl + C in the terminal window where the application is running. This will stop any ongoing tasks and end the user session.