Prerequisites
There are a number of prerequisites that are required for all AI Services.
Unzip the AI Service Distro
Create a folder called InsightMaker.Python.
This drive needs enough space for the Python virtual environment. These are around 6GB per service.
Extract the distro to a sub-folder with the same name as the original zip file.
AIEnrichmentService
AIModelService
Install Python
Check if you have a version of Python running on the server.
You can check the PATH and location of installed applications
Or, open a prompt and run the following:
If Python Doesn't Exist
Install Python
Install Python 3.12.2
To run Python REST services as a Window Service you need to install Python for ‘all users’.
Create a Python Virtual Environment
Create a venv folder in the root of the respective AI Service you are setting up.
.\InsightMaker.Python\AIEnrichmentService
.\InsightMaker.Python\AIModelService
Open command prompt.
Navigate to the venv folder.
Create the venv with the following python command:
python -m venv ./
If Python Exists
Install Python
Install Python 3.12.2
To run Python REST services as a Window Service you need to install Python for ‘all users’.
Do not add to the system variables or path as this may impact existing Python applications on the server.
Open an administrator command prompt.
Install virtualenv using the following command:
pip install virtualenv
Create a Python Virtual Environment
Create a venv folder in the root of the respective AI Service you are setting up.
.\InsightMaker.Python\AIEnrichmentService
.\InsightMaker.Python\AIModelService
Open command prompt.
Navigate to the venv folder.
Create the venv with the following python command:
python -m virtualenv ./ -p="C:\Program Files\Python312\python.exe"
Replace the -p parameter with the path to the Python 3.12.2 executable.
Configure and Install Prerequisites
Windows ONLY - Ensure long path support
Using Regedit:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem
LongPathsEnabled
DWORD = 1
Setup NLTK
Many of the AI Model Services and AI Enrichment Service require NLTK.
Install the nltk Python libraries using:
pip install nltk
Install the NLTK data (models) to a location on the server using:
python -m nltk.downloader all -d <LOCATION>
Set an environment variable to point at the NLTK data using:
NLTK_DATA=LOCATION
For more information see the NLTK documentation: https://www.nltk.org/data.html