diff --git a/morphemic-forecasting-eshybrid/README.md b/morphemic-forecasting-eshybrid/README.md new file mode 100644 index 0000000000000000000000000000000000000000..dbede225d3b0512756a8c1faa9607d0de46edd49 --- /dev/null +++ b/morphemic-forecasting-eshybrid/README.md @@ -0,0 +1,111 @@ +ESHybrid +=== + +In order to run the component you need python 3.7.+ or you can selectively build and run the +included Dockerfile. + +Running using source +- + +*Setting up requirments* + +In order to run the component from source you will need to link/copy several Morphemic +components available in the source code, such as the messaging component. + +```shell +$ cd morphemic-preprocessor/morphemic-forecasting-eshybrid +$ ln -s ../amq-message-python-library messaging +``` + +```shell +$ cd morphemic-preprocessor/morphemic-forecasting-eshybrid +$ cp -R ../amq-message-python-library messaging +``` + +One you have done this your directory structure should look like this + +```shell +$ cd morphemic-preprocessor/morphemic-forecasting-eshybrid +$ ls +- ESRNN +- forecasting +- morphemic +- messaging -> ../amq-message-python-library +- main.py +- __init__.py +- requirements.txt +- Dockerfile +- docker-entrypoint.sh +- sync.cfg +- README.md +``` + +*Setting up Virtualenv and Requirements* + +We recommend that you set up a virtual environment using the Python venv module + +```shell +$ cd morphemic-preprocessor/morphemic-forecasting-eshybrid +$ mkdir local +$ python3 -m venv local/virtualenv +$ source local/virtualenv/bin/activate +$ pip install -U pip +$ pip install -r requirements.txt +``` + +*Configuring component* + +At the root of the project there is a sync.cfg file in which +you can set up the connection properties for the EMS as well as those +of the persistence component + +```shell +$ cd morphemic-preprocessor/morphemic-forecasting-eshybrid +$ cat sync.cfg + + [persistence] + application=default_application + host=localhost + port=8086 + username=morphemic + password=password + dbname=morphemic + path_dataset=/tmp/out/dataset-maker + + [messaging] + host=147.102.17.76 + port=61610 + username=aaa + password=111 + + [listener] + id=eshybrid +``` + +* Running the component * + +Once everything is set up you can run the eshybrid forecaster using +the following command + +```shell +$ cd morphemic-preprocessor/morphemic-forecasting-eshybrid +$ source local/virtualenv/bin/activate +$ python3 main.py --config sync.cfg +``` + + + +Running using docker +- + +In order to run the component using docker, you will need to buid the +docker image first + +```shell + +$ cd morphemic-preprocessor/morphemic-forecasting-eshybrid +$ docker build -t name imuresearch/eshybrid +$ docker run --rm -v `PWD`/sync.cfg:/app/sync.cfg -v `PWD`/local/out.log:/logs/eshybrid.logs imuresearch/eshybrid +``` + +