README.md 3.95 KB
Newer Older
Valérian STG_CAZANAVE's avatar
Valérian STG_CAZANAVE committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
# Hublot

This is the repository for the Hublot project.

## Install Docker and Docker Compose

You will need to have Docker and Docker Compose installed on your machine. If they are already installed, you can skip this part.
Otherwise, you can install them referring to [https://docs.docker.com/engine/installation/](https://docs.docker.com/engine/installation/ "Install Docker"), and to [https://docs.docker.com/compose/install/](https://docs.docker.com/compose/install/ "Install Docker Compose").

## Get all the docker images

### Kaldi-gstreamer

You have two options:

* Run `git clone https://ci.linagora.com/linagora/lgs/labs/docker-kaldi-gstreamer-server.git`
In the docker-kaldi-gstreamer-server directory, run `docker build -t linagora/kaldi-gstreamer .`

* Or you can directly build the docker image running:
`docker build -t linagora/kaldi-gstreamer https://ci.linagora.com/linagora/lgs/labs/docker-kaldi-gstreamer-server.git`

### Recommender

* Clone the project:
`git clone https://ci.linagora.com/linagora/lgs/labs/openpaas-summary.git`

Don't forget to **add the config.properties file** in the openpaas-summary directory, and then you can build the docker image (being in the openpaas-summary directory):
Valérian STG_CAZANAVE's avatar
Valérian STG_CAZANAVE committed
28
`docker build -t linagora/recommender .`
Valérian STG_CAZANAVE's avatar
Valérian STG_CAZANAVE committed
29 30 31 32 33 34 35 36 37 38 39

### Selenium

If you want, you can pull the selenium image from Docker Hub: run `docker pull selenium/standalone-chrome`
This image will be pulled the first time you run `docker-compose up`, if you don't pull it now.

## Clone Hublot

Run `git clone https://ci.linagora.com/linagora/lgs/labs/hublot.git`
You can build the docker image of Hublot running `docker build -t linagora/hublot .` in the hublot directory, but if you don't do it, the image will be built the first time you run `docker-compose up`.

Valérian STG_CAZANAVE's avatar
Valérian STG_CAZANAVE committed
40
Note that if you have an old docker image tagged `linagora/hublot` on your machine, the image will never be built when you run `docker-compose up`, and the old image will be used. In order to have the latest version of the image, you must build it now. Every time you change some code in hublot, you will need to build the image, because docker compose will use `linagora/hublot` image if it exists. If you want the image to be built every time you run `docker-compose up`, remove the `image: linagora/hublot` line in docker-compose.yml
Valérian STG_CAZANAVE's avatar
Valérian STG_CAZANAVE committed
41 42 43 44 45 46 47 48

## Environment variables

Three environment variables are defined in the .env file:
* NB_WORKERS is the number of workers of the kaldi gstreamer server
* MODELS_PATH is the path of the directory containing the models used by kaldi
* YAML is the path of the yaml file describing the model that you want to use

Valérian STG_CAZANAVE's avatar
Valérian STG_CAZANAVE committed
49 50
There are different ways to set environment variables:
* You can modify the values of these environment variables in the .env file.
Valérian STG_CAZANAVE's avatar
Valérian STG_CAZANAVE committed
51

Valérian STG_CAZANAVE's avatar
Valérian STG_CAZANAVE committed
52
* If you don't want to edit the .env file, you can define environment variables in your shell (with the same names as above). The values of the variables defined in your shell will overwrite those defined in the .env file. You must know that if you define environment variables in your shell, their values set in the .env file will no longer be taken into consideration.
Valérian STG_CAZANAVE's avatar
Valérian STG_CAZANAVE committed
53

Valérian STG_CAZANAVE's avatar
Valérian STG_CAZANAVE committed
54
* The simpliest way to change values of environment variables without editing the .env file, and without setting permanent environment variables in your shell is to specify it when you run `docker-compose up`. For example, you can run:
Valérian STG_CAZANAVE's avatar
Valérian STG_CAZANAVE committed
55 56
`MODELS_PATH=/your/path/to/models YAML=/opt/models/gmm_hmm5.yaml docker-compose up`

Valérian STG_CAZANAVE's avatar
Valérian STG_CAZANAVE committed
57 58 59 60
## Fix the models issue before running Hublot

The MODELS\_PATH environment variable is by default set to `./models/`, and it should be set to a directory containing the yaml files describing the models. You can either create the models directory in hublot and put your models inside it, or you can set the MODELS_PATH value to the right directory in your machine, using one of the three options listed in the precedent section.

Valérian STG_CAZANAVE's avatar
Valérian STG_CAZANAVE committed
61 62 63 64 65
## Run Hublot

Be sure that you are in the hublot directory, and run `docker-compose up`. You can set environment variables in the same command line, as explained above.