Browse Source

Fix common issues for deploy model

Change-Id: I29a88bf0ed0ea445ad7f280cb8dc9943f6593c5e
bharath 5 months ago
parent
commit
222ea5c3cd
3 changed files with 11 additions and 4 deletions
  1. 8
    2
      devstack/lib/gyan
  2. 2
    1
      gyan/common/utils.py
  3. 1
    1
      requirements.txt

+ 8
- 2
devstack/lib/gyan View File

@@ -154,6 +154,7 @@ function create_gyan_conf {
154 154
     iniset $GYAN_CONF DEFAULT debug "$ENABLE_DEBUG_LOG_LEVEL"
155 155
     iniset $GYAN_CONF DEFAULT my_ip "$HOST_IP"
156 156
     iniset $GYAN_CONF DEFAULT host  "$HOST_IP"
157
+    iniset $GYAN_CONF DEFAULT transport_url  "rabbit://stackrabbit:$RABBIT_PASSWORD@$SERVICE_HOST/"
157 158
     iniset $GYAN_CONF oslo_messaging_rabbit rabbit_userid $RABBIT_USERID
158 159
     iniset $GYAN_CONF oslo_messaging_rabbit rabbit_password $RABBIT_PASSWORD
159 160
     iniset $GYAN_CONF oslo_messaging_rabbit rabbit_host $RABBIT_HOST
@@ -180,6 +181,7 @@ function create_gyan_conf {
180 181
     iniset $GYAN_CONF keystone_authtoken www_authenticate_uri $KEYSTONE_SERVICE_URI_V3
181 182
     iniset $GYAN_CONF keystone_authtoken auth_url $KEYSTONE_AUTH_URI_V3
182 183
     iniset $GYAN_CONF keystone_authtoken auth_version v3
184
+    iniset $GYAN_CONF comput host $HOST_IP
183 185
 
184 186
 
185 187
     if is_fedora || is_suse; then
@@ -306,8 +308,12 @@ function start_gyan {
306 308
 
307 309
     # ``run_process`` checks ``is_service_enabled``, it is not needed here
308 310
     mkdir -p /opt/stack/data/gyan
309
-    start_gyan_api
310
-    start_gyan_compute
311
+    if is_service_enabled gyan-api; then
312
+        start_gyan_api
313
+    fi
314
+    if is_service_enabled gyan-compute; then
315
+        start_gyan_compute
316
+    fi
311 317
 }
312 318
 
313 319
 # stop_gyan() - Stop running processes (non-screen)

+ 2
- 1
gyan/common/utils.py View File

@@ -24,6 +24,7 @@ import inspect
24 24
 import json
25 25
 import mimetypes
26 26
 import os
27
+import zipfile
27 28
 
28 29
 from oslo_concurrency import processutils
29 30
 from oslo_context import context as common_context
@@ -270,4 +271,4 @@ def save_model(path, model):
270 271
         f.write(model.ml_data)
271 272
     zip_ref = zipfile.ZipFile(file_path+'.zip', 'r')
272 273
     zip_ref.extractall(file_path)
273
-    zip_ref.close()
274
+    zip_ref.close()

+ 1
- 1
requirements.txt View File

@@ -26,5 +26,5 @@ SQLAlchemy!=1.1.5,!=1.1.6,!=1.1.7,!=1.1.8,>=1.0.10 # MIT
26 26
 stevedore>=1.20.0 # Apache-2.0
27 27
 pypng
28 28
 numpy
29
-tensorflow
29
+tensorflow==1.5
30 30
 idx2numpy

Loading…
Cancel
Save