Skip to content

Commit

Permalink
Added a new env variable and updated ReadMe
Browse files Browse the repository at this point in the history
  • Loading branch information
Habush committed Mar 26, 2019
1 parent 43d61e8 commit cf1bf8c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ 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 -- .
git pull
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
Expand Down
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 `<PORT_NUM>` to the port number you would like to run the result_ui app and `<ADDR>` 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 `<PORT_NUM>` to the port number you would like to run the result_ui app and `<SERVICE_ADDR>` 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=<PORT_NUM>
$ export SERVICE_ADDR=<ADDR>
$ export FLASK_SERVER=http://<ADDR>:<FLASK_PORT> # 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``

Expand All @@ -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 **_<options file>_** with a _.yaml_ file containing the moses and cross-validation **_<dataset file>_** 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.
Expand Down
2 changes: 1 addition & 1 deletion docker-compose-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ services:
build:
context: service-result/
args:
- SERVER_ADDR=$SERVICE_ADDR
- SERVER_ADDR=$FLASK_SERVER

container_name: result-ui
ports:
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ services:
build:
context: service-result/
args:
- SERVER_ADDR=$SERVICE_ADDR
- SERVER_ADDR=$FLASK_SERVER

container_name: result-ui
ports:
Expand Down

0 comments on commit cf1bf8c

Please sign in to comment.