Browse Source

Add developer guide

Change-Id: I6528622e943772ec03d6bb992459926b6a0a25cc
bharath 5 months ago
parent
commit
657be965a5
1 changed files with 53 additions and 0 deletions
  1. 53
    0
      doc/source/developer-guide.md

+ 53
- 0
doc/source/developer-guide.md View File

@@ -0,0 +1,53 @@
1
+# Developer Guide
2
+
3
+Openstack Gyan is the Machine Learning Infra as a service project. This document provides the following
4
+
5
+  - How to setup openstack with Gyan using devstack
6
+  - Describes the workflow in the Gyan
7
+  - How to run the example application provided in the Gyan examples directory
8
+
9
+# How to setup Gyan
10
+
11
+  - Clone the devstack master branch 
12
+    > git clone https://github.com/openstack-dev/devstack
13
+  - Copy the contents below to local.conf in devstack
14
+    > [[local|localrc]]
15
+    HOST_IP=192.168.1.188
16
+    SERVICE_HOST=192.168.1.188
17
+    DATABASE_PASSWORD=password
18
+    RABBIT_PASSWORD=password
19
+    SERVICE_TOKEN=password
20
+    SERVICE_PASSWORD=password
21
+    ADMIN_PASSWORD=password
22
+    enable_service rabbit mysql key
23
+    enable_plugin gyan https://git.openstack.org/openstack/gyan
24
+    enable_plugin heat https://git.openstack.org/openstack/heat
25
+    LIBS_FROM_GIT="python-gyanclient"
26
+    ENABLED_SERVICES+=gyan-api
27
+  - Run stack.sh
28
+     > ./stack.sh
29
+ 
30
+# Workflow of Gyan:
31
+  - Create hints.yaml to specify the size of the compute node. For example
32
+    > python_version: 2.7
33
+      cpu: 2
34
+      memory: 1024 Mb
35
+      disk: 20 Gb
36
+      driver: TensorflowDriver
37
+      additional_details: {}
38
+  - After that create the flavor using hints template
39
+    > gyan flavor-create --hints-path flavor.yaml tensorflow
40
+  - Compress your ML model that is already trained  and create a Gyan model
41
+    > gyan create-model --trained-model model.zip --type Tensorflow MNIST
42
+  - Deploy model that was created in the previous step.
43
+    > gyan deploy-model <model-id>
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.
45
+  - 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` 
47
+
48
+# 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.
50
+  -  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.
52
+  -  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.

Loading…
Cancel
Save