lintoai/linto-platform-service-manager

Sponsored OSS

By lintoai

Updated almost 3 years ago

Image
Integration & Delivery
Monitoring & Observability
Security
0

10K+

Linto-Platform-STT-Service-Manager

This service is mandatory in a LinTO platform stack as the main process for speech to text toolkit. It is used with stt-standalone-worker to run an API with docker swarm to manage STT services.

Usage

See documentation : doc.linto.ai

Deploy

With our proposed stack linto-platform-stack

Develop

Prerequisites

To use the STT-manager service, you'll have to make sure that dependent services are installed and launched:

  • mongodb: docker pull mongo
  • nginx: docker pull nginx
  • traefik: docker pull traefik

Download and Install

To install STT Service Manager you will need to download the source code :

git clone https://github.com/linto-ai/linto-platform-stt-service-manager.git
cd linto-platform-stt-service-manager

You will need to have Docker and Docker Compose installed on your machine. Then, to build the docker image, execute:

docker build -t lintoai/linto-platform-stt-standalone-worker .

Or using docker-compose:

docker-compose build

Otherwise, you can download the pre-built image from docker-hub:

docker pull lintoai/linto-platform-stt-standalone-worker:latest

NOTE: To install the service without docker, please follow the instructions defined in the Dockerfile (Build kaldi, Install NLP packages, Install npm modules).

Configuration

Once all the services are build, you need to manage your environment variables. A default file .envdefault is provided to allow a default setup. Please adapt it to your configurations and needs.

cp .envdefault .env
nano .env
Env variableDescriptionexample
LINTO_STACK_DOMAINDeployed domain. It is required when traefik controller is useddev.linto.local
LINTO_STACK_STT_SERVICE_MANAGER_HTTP_PORTSTT-manager service port80
LINTO_STACK_STT_SERVICE_MANAGER_DIRECTORYFolder path where to save the created models~/linto_shared_memory/
LINTO_STACK_STT_SERVICE_MANAGER_CLUSTER_MANAGERA container orchestration tool (accepted values: DockerSwarm)DockerSwarm
LINTO_STACK_STT_SERVICE_MANAGER_INGRESS_CONTROLLERController ingress used (accepted values: nginx|traefik)nginx
LINTO_STACK_STT_SERVICE_MANAGER_LINSTT_TOOLKITASR engine used (accepted values: kaldi)kaldi
LINTO_STACK_STT_SERVICE_MANAGER_NGINX_HOSTSTT-manager nginx hostlocalhost
LINTO_STACK_STT_SERVICE_MANAGER_MONGODB_HOSTSTT-manager mongodb hostlocalhost
LINTO_STACK_STT_SERVICE_MANAGER_MONGODB_PORTMongoDb service port27017
LINTO_STACK_STT_SERVICE_MANAGER_MONGODB_DBNAMEMongoDb service database namelinSTTAdmin
LINTO_STACK_STT_SERVICE_MANAGER_MONGODB_REQUIRE_LOGINEnable/Disable MongoDb service authenticationtrue
LINTO_STACK_STT_SERVICE_MANAGER_MONGODB_USERMongoDb service usernameroot
LINTO_STACK_STT_SERVICE_MANAGER_MONGODB_PSWDMongoDb service password userroot
LINTO_STACK_LINSTT_OFFLINE_IMAGELinSTT docker image to use for offline decoding modelintoai/linto-platform-stt-standalone-worker
LINTO_STACK_LINSTT_STREAMING_IMAGELinSTT docker image to use for online decoding modelintoai/linto-platform-stt-standalone-worker-streaming
LINTO_STACK_LINSTT_NETWORKLinSTT docker network to connectlinto-net
LINTO_STACK_LINSTT_PREFIXLinSTT service prefix to use with controller ingressstt
LINTO_STACK_IMAGE_TAGDocker image tag to uselatest
LINTO_STACK_LINSTT_NAMEDocker stack namestt

If you run STT-manager without docker, you need to change the following environment variables:

Env variableDescriptionexample
SAVE_MODELS_PATHSaved model path. Set it to the same path as LINTO_STACK_STT_SERVICE_MANAGER_DIRECTORY~/linto_shared_memory/
LINTO_STACK_STT_SERVICE_MANAGER_SWAGGER_PATHSTT-manager swagger file path~/linto-platform-stt-service-manager/config/swagger.yml
LINTO_STACK_STT_SERVICE_MANAGER_NGINX_CONFSTT-manager nginx config file path~/linto-platform-stt-service-manager/config/nginx.conf

NOTE: if you want to use the user interface, you need also to configure the swagger file ~/linto-platform-stt-service-manager/config/swagger.yml. Specifically, in the section host, specify the host and the address of the machine in which the service is deployed.

Execute

In order to run the service alone, you have first to run the ingress controller service (LINTO_STACK_STT_SERVICE_MANAGER_INGRESS_CONTROLLER). Then, you only need to execute:

cd linto-platform-stt-service-manager
docker-compose up

Then you can acces it on localhost:8000. You can use the user interface on localhost:8000/api-doc/

Docker Pull Command

docker pull lintoai/linto-platform-service-manager