Running as a Service (Windows)

To install the Python REST Service as a Windows Service follow these steps:

  1. Make sure Python has been installed ‘for all users’ otherwise the system user which runs the service will not be able to see it.

    1. Python needs to be in the system PATH

  2. Edit the ‘run.bat’ so that it contains an absolute path to the ‘waitress_server.py’ file and your virtual environment

  3. Run a command line window as administrator

  4. Navigate to the Python REST Service subfolder in your InsightMaker distribution

  5. Execute: nssm install “InsightMaker Python REST Service”

  6. Set the path to run.bat

  7. Set the start up directory to be the path of the Python Rest Service

  8. Optionally configure which user the service runs as (see point 1)

  9. Run the service and check the log file

    1. The first time the app service runs it will download a series of modules and models. If this instance does not have internet access, please consult Aiimi for further information

Last updated