Edited developer guide

Change-Id: Iba98d20a7d80fa35a93269d19b68e2f2eaaee712
This commit is contained in:
Viswanath KSP 2018-11-17 19:19:41 +05:30
parent 96ec2e67c1
commit 6a63677ec7
1 changed files with 26 additions and 12 deletions

View File

@ -9,9 +9,12 @@ Openstack Gyan is the Machine Learning Infra as a service project. This document
# How to setup Gyan # How to setup Gyan
- Clone the devstack master branch - Clone the devstack master branch
> git clone https://github.com/openstack-dev/devstack ```
git clone https://github.com/openstack-dev/devstack
```
- Copy the contents below to local.conf in devstack - Copy the contents below to local.conf in devstack
> [[local|localrc]] ```
[[local|localrc]]
HOST_IP=192.168.1.188 HOST_IP=192.168.1.188
SERVICE_HOST=192.168.1.188 SERVICE_HOST=192.168.1.188
DATABASE_PASSWORD=password DATABASE_PASSWORD=password
@ -24,30 +27,41 @@ Openstack Gyan is the Machine Learning Infra as a service project. This document
enable_plugin heat https://git.openstack.org/openstack/heat enable_plugin heat https://git.openstack.org/openstack/heat
LIBS_FROM_GIT="python-gyanclient" LIBS_FROM_GIT="python-gyanclient"
ENABLED_SERVICES+=gyan-api ENABLED_SERVICES+=gyan-api
```
- Run stack.sh - Run stack.sh
> ./stack.sh ```
./stack.sh
```
# Workflow of Gyan: # Workflow of Gyan:
- Create hints.yaml to specify the size of the compute node. For example - Create hints.yaml to specify the size of the compute node. For example
> python_version: 2.7 ```
python_version: 2.7
cpu: 2 cpu: 2
memory: 1024 Mb memory: 1024 Mb
disk: 20 Gb disk: 20 Gb
driver: TensorflowDriver driver: TensorflowDriver
additional_details: {} additional_details: {}
```
- After that create the flavor using hints template - After that create the flavor using hints template
> gyan flavor-create --hints-path flavor.yaml tensorflow ```
gyan flavor-create --hints-path flavor.yaml tensorflow
```
- Compress your ML model that is already trained and create a Gyan model - Compress your ML model that is already trained and create a Gyan model
> gyan create-model --trained-model model.zip --type Tensorflow MNIST ```
gyan create-model --trained-model model.zip --type Tensorflow MNIST
```
- Deploy model that was created in the previous step. - Deploy model that was created in the previous step.
> gyan deploy-model <model-id> ```
- 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. gyan deploy-model <model-id>
```
- 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.
- We should get new host in `gyan host-list`. - We should get new host in `gyan host-list`.
- In the last step you should see the deployed url of the model. We can find out using `gyan model-list` - In the last step you should see the deployed url of the model. We can find out using `gyan model-list`
# How to use run sample example KnowThyNumber provided with Gyan: # How to use run sample example KnowThyNumber provided with Gyan:
- Make sure you have installed golang in your system and set the GOROOT and GOPATH properly. - Make sure you have installed golang in your system and set the GOROOT and GOPATH properly.
- Copy the KnowThyNumber example from gyan/examples to GOPATH/src/github.com/<user-id>/KnowThyNumber. - Copy the KnowThyNumber example from `gyan/examples` to `GOPATH/src/github.com/<user-id>/KnowThyNumber`
- Now run `go run server.go`. This will start local server on 9000 port. - Now run `go run server.go`. This will start local server on `9000` port.
- We got deployed_url in the previous section. Get the openstack token using `openstack token issue`. - We got deployed_url in the previous section. Get the openstack token using `openstack token issue`.
- 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. - 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.