diff --git a/.circleci/config.yml b/.circleci/config.yml index d292452..c13d651 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -33,6 +33,7 @@ jobs: if [ ! -d "moses-service" ]; then # clone the repo if it doesn't exist git clone --recursive https://github.com/Habush/moses-service.git + cd moses-service; else cd moses-service git checkout -- . @@ -40,8 +41,7 @@ jobs: fi export APP_PORT=8080 - export SERVICE_ADDR=https://mozi.ai:5000 - cd moses-service; + export FLASK_SERVER=https://mozi.ai:5000 docker-compose stop; # stop the containers if they are runnning diff --git a/README.md b/README.md index d1008f6..b9501e2 100644 --- a/README.md +++ b/README.md @@ -20,18 +20,21 @@ The purpose of this service is to use [MOSES](https://github.com/opencog/moses) 2. Go to the project folder to start the docker containers to run the gRPC server and its dependencies (redis, mongo, etc) - 2a. Define the `APP_PORT` and `SERVICE_ADDR` variables. Change `` to the port number you would like to run the result_ui app and `` to the address of the host where you are going to run the app. If you are running this locally, set SERVICE_ADDR to `localhost` + 2a. Define the `APP_PORT` and `SERVICE_ADDR` variables. Change `` to the port number you would like to run the result_ui app and `` to the address of the host where you are going to run the app. If you are running this locally, set SERVICE_ADDR to `localhost` $ export APP_PORT= $ export SERVICE_ADDR= + $ export FLASK_SERVER=http://: # e.g http://192.168.1.3:5000 2b. Start the docker containers: $ docker-compose up -3. Install the python dependencies for running the service client on your local system. Run: + N.B If you make any changes to the code make sure you rerun the containers with `--build` flask. That is, `docker-compose up --build` + +3. Open a new terminal and install the python dependencies for running the service client on your local system. Run: ``$ pip install grpcio grpcio-tools pyyaml`` @@ -41,7 +44,7 @@ The purpose of this service is to use [MOSES](https://github.com/opencog/moses) Note: Make sure you have set **execute permission** for `build.sh`. If not, just run `chmod +x build.sh` -5. On a new terminal, while still in the project directory, call the service client. +5. On the new terminal, while still in the project directory, call the service client. Replace **__** with a _.yaml_ file containing the moses and cross-validation **__** with the path to file you want to run analysis on Inputs: - `options`: yaml file with MOSES algorithm and cross-validation parameters. See [below](#options) for examples. diff --git a/docker-compose-dev.yml b/docker-compose-dev.yml index 86dddae..8601a76 100644 --- a/docker-compose-dev.yml +++ b/docker-compose-dev.yml @@ -33,7 +33,7 @@ services: build: context: service-result/ args: - - SERVER_ADDR=$SERVICE_ADDR + - SERVER_ADDR=$FLASK_SERVER container_name: result-ui ports: diff --git a/docker-compose.yml b/docker-compose.yml index 579c0e4..5b72aa0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -36,7 +36,7 @@ services: build: context: service-result/ args: - - SERVER_ADDR=$SERVICE_ADDR + - SERVER_ADDR=$FLASK_SERVER container_name: result-ui ports: