summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorViswanath KSP <kspviswa.github@gmail.com>2018-11-17 19:19:41 +0530
committerViswanath KSP <kspviswa.github@gmail.com>2018-11-17 19:24:08 +0530
commit6a63677ec7494524209a0fa9dc5d401ab56c0961 (patch)
tree3dedc7dc817acbfdf718847239ff2e80ad75742d
parent96ec2e67c145684009e2d631cd889160ad10bb80 (diff)
Edited developer guideHEADmaster
Notes
Notes (review): Code-Review+2: Viswanath KSP <kspviswa.github@gmail.com> Workflow+1: Viswanath KSP <kspviswa.github@gmail.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Mon, 19 Nov 2018 13:07:33 +0000 Reviewed-on: https://review.openstack.org/618619 Project: openstack/gyan Branch: refs/heads/master
-rw-r--r--doc/source/developer-guide.md38
1 files changed, 26 insertions, 12 deletions
diff --git a/doc/source/developer-guide.md b/doc/source/developer-guide.md
index cff16bb..04e6a72 100644
--- a/doc/source/developer-guide.md
+++ b/doc/source/developer-guide.md
@@ -9,9 +9,12 @@ Openstack Gyan is the Machine Learning Infra as a service project. This document
9# How to setup Gyan 9# How to setup Gyan
10 10
11 - Clone the devstack master branch 11 - Clone the devstack master branch
12 > git clone https://github.com/openstack-dev/devstack 12 ```
13 git clone https://github.com/openstack-dev/devstack
14 ```
13 - Copy the contents below to local.conf in devstack 15 - Copy the contents below to local.conf in devstack
14 > [[local|localrc]] 16 ```
17 [[local|localrc]]
15 HOST_IP=192.168.1.188 18 HOST_IP=192.168.1.188
16 SERVICE_HOST=192.168.1.188 19 SERVICE_HOST=192.168.1.188
17 DATABASE_PASSWORD=password 20 DATABASE_PASSWORD=password
@@ -24,30 +27,41 @@ Openstack Gyan is the Machine Learning Infra as a service project. This document
24 enable_plugin heat https://git.openstack.org/openstack/heat 27 enable_plugin heat https://git.openstack.org/openstack/heat
25 LIBS_FROM_GIT="python-gyanclient" 28 LIBS_FROM_GIT="python-gyanclient"
26 ENABLED_SERVICES+=gyan-api 29 ENABLED_SERVICES+=gyan-api
30 ```
27 - Run stack.sh 31 - Run stack.sh
28 > ./stack.sh 32 ```
33 ./stack.sh
34 ```
29 35
30# Workflow of Gyan: 36# Workflow of Gyan:
31 - Create hints.yaml to specify the size of the compute node. For example 37 - Create hints.yaml to specify the size of the compute node. For example
32 > python_version: 2.7 38 ```
39 python_version: 2.7
33 cpu: 2 40 cpu: 2
34 memory: 1024 Mb 41 memory: 1024 Mb
35 disk: 20 Gb 42 disk: 20 Gb
36 driver: TensorflowDriver 43 driver: TensorflowDriver
37 additional_details: {} 44 additional_details: {}
45 ```
38 - After that create the flavor using hints template 46 - After that create the flavor using hints template
39 > gyan flavor-create --hints-path flavor.yaml tensorflow 47 ```
48 gyan flavor-create --hints-path flavor.yaml tensorflow
49 ```
40 - Compress your ML model that is already trained and create a Gyan model 50 - Compress your ML model that is already trained and create a Gyan model
41 > gyan create-model --trained-model model.zip --type Tensorflow MNIST 51 ```
52 gyan create-model --trained-model model.zip --type Tensorflow MNIST
53 ```
42 - Deploy model that was created in the previous step. 54 - Deploy model that was created in the previous step.
43 > gyan deploy-model <model-id> 55 ```
44 - The above command will launch the compute node based on the flavor details we gave in the first step. Once the compute node is launched, the gyan-compute will be installed and connected to gyan-server. 56 gyan deploy-model <model-id>
57 ```
58 - The above command will launch the compute node based on the flavor details we gave in the first step. Once the compute node is launched, the gyan-compute will be installed and connected to gyan-server.
45 - We should get new host in `gyan host-list`. 59 - We should get new host in `gyan host-list`.
46 - In the last step you should see the deployed url of the model. We can find out using `gyan model-list` 60 - In the last step you should see the deployed url of the model. We can find out using `gyan model-list`
47 61
48# How to use run sample example KnowThyNumber provided with Gyan: 62# How to use run sample example KnowThyNumber provided with Gyan:
49 - Make sure you have installed golang in your system and set the GOROOT and GOPATH properly. 63 - Make sure you have installed golang in your system and set the GOROOT and GOPATH properly.
50 - Copy the KnowThyNumber example from gyan/examples to GOPATH/src/github.com/<user-id>/KnowThyNumber. 64 - Copy the KnowThyNumber example from `gyan/examples` to `GOPATH/src/github.com/<user-id>/KnowThyNumber`
51 - Now run `go run server.go`. This will start local server on 9000 port. 65 - Now run `go run server.go`. This will start local server on `9000` port.
52 - We got deployed_url in the previous section. Get the openstack token using `openstack token issue`. 66 - We got deployed_url in the previous section. Get the openstack token using `openstack token issue`.
53 - Open the browser and navigate to http://localhost:9000. Provide the `deployed_url` and `token` in the app. Now you can draw any number in the canvas and use your model to predict it. 67 - Open the browser and navigate to `http://localhost:9000`. Provide the `deployed_url` and `token` in the app. Now you can draw any number in the canvas and use your model to predict it.