Running the service outside of a docker container
It is recommended that the service be deployed as a docker container, following the instructions here. However you can run it outside of docker if you need to.
-
Build and install nlp-insights to a virtual environment
./gradlew install
-
Switch to the virtual env where nlp-insights is installed
source ./build/venv/bin/activate
-
Set the FLASK_APP environment variable to the installed package
export FLASK_APP=nlp_insights.app
-
Start the service (5000 is the default port, however this value can be changed to suit your needs)
python -m flask run --port=5000