Overview
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
-
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 -
Open Anaconda Prompt and run this command to add Conda to your PATH:
conda init cmd.exe
Step 2: Install Tesseract
- Download Tesseract from https://github.com/UB-Mannheim/tesseract/wiki
- Once you download the installer, run it and install Tesseract.
- Once you install Tesseract, add it to your PATH.
- To add it to your PATH on windows, open the search bar and search for
environment variables
and click onEdit the system environment variables
. - In the System Properties window, click on the
Environment Variables
button. - In the Environment Variables window, click on the
Path
variable and click onEdit
. - Click on
New
to add the pathC:\Program Files\Tesseract-OCR
to the PATH variable. - Click on
OK
to save the changes. - Click on
OK
to save the changes. - Click on
OK
to save the changes.
Step 2: Download the code from the Gitlab repository
- Download the code from the Penfield Gitlab repository or Contact Penfield for the code.
Step 3: Create a Conda Environment
-
Navigate to the Application Root:
Before setting up the project, make sure you're in the directory where theenvironment.yml
is located (the project root). Use thecd
command to navigate there:cd path/to/privacy-service
Replace
path/to/privacy-service
with the actual path to your project folder. -
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.
-
Create the Conda Environment (Optional):
Create the Conda environment using theenvironment.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
-
Activate the Conda Environment:
After creating the Conda environment, activate it to ensure all the installed dependencies are available:conda activate win_sensor
-
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.