Nodejs MNIST model Deployment

  • Wrap a nodejs tensorflow model for use as a prediction microservice in seldon-core
  • Run locally on Docker to test

Dependencies

Train locally using npm commands

This model takes in mnist images of size 28x28x1 as input and outputs an array of size 10 with prediction of each digits from 0-9

[1]:
!make train && make clean_build
npm install
        ......] \ refresh-package-json:argparse: timing action:finalize Co
> @tensorflow/[email protected] install /home/clive/work/seldon-core/fork-seldon-core/examples/models/nodejs_mnist/node_modules/@tensorflow/tfjs-node
> node scripts/install.js

* Downloading libtensorflow
[                              ] 1180235/bps 0% 16.7s[                              ] 1875303/bps 0% 10.5s[                              ] 2741939/bps 1% 7.2s[                              ] 3032508/bps 1% 6.5s[=                             ] 4188852/bps 2% 4.6s[=                             ] 4196020/bps 2% 4.6s[=                             ] 3919906/bps 3% 4.9s[=                             ] 4554618/bps 3% 4.2s[=                             ] 5345319/bps 4% 3.5s[==                            ] 5635676/bps 5% 3.3s[==                            ] 7673917/bps 7% 2.4s[===                           ] 8695962/bps 9% 2.1s[===                           ] 8116991/bps 10% 2.2s[====                          ] 8513097/bps 12% 2.0s[====                          ] 8410939/bps 13% 2.1s[====                          ] 8673246/bps 14% 2.0s[=====                         ] 9525507/bps 16% 1.7s[=====                         ] 10068442/bps 18% 1.6s[======                        ] 10564293/bps 20% 1.5s[======                        ] 10311254/bps 20% 1.5s[======                        ] 10324710/bps 21% 1.5s[=======                       ] 10551756/bps 23% 1.4s[=======                       ] 10651449/bps 24% 1.4s[=======                       ] 10507130/bps 24% 1.4s[========                      ] 11083294/bps 27% 1.3s[=========                     ] 10975382/bps 29% 1.3s[=========                     ] 11084185/bps 30% 1.2s[=========                     ] 11108293/bps 31% 1.2s[==========                    ] 11150222/bps 33% 1.2s[==========                    ] 11199892/bps 33% 1.2s[==========                    ] 11255565/bps 35% 1.1s[===========                   ] 11298406/bps 36% 1.1s[===========                   ] 11279950/bps 37% 1.1s[===========                   ] 11335154/bps 38% 1.1s[============                  ] 11461561/bps 39% 1.0s[============                  ] 11322851/bps 40% 1.0s[============                  ] 11328628/bps 41% 1.0s[=============                 ] 11569110/bps 43% 1.0s[=============                 ] 11394723/bps 43% 1.0s[=============                 ] 11119219/bps 44% 1.0s[==============                ] 11200476/bps 46% 1.0s[==============                ] 11327456/bps 47% 0.9s[==============                ] 11185786/bps 48% 0.9s[===============               ] 11092156/bps 49% 0.9s[===============               ] 11057818/bps 50% 0.9s[===============               ] 11169269/bps 51% 0.9s[===============               ] 11017133/bps 52% 0.9s[================              ] 11178032/bps 53% 0.8s[================              ] 11042508/bps 53% 0.8s[================              ] 11034122/bps 55% 0.8s[=================             ] 11136514/bps 56% 0.8s[=================             ] 11187099/bps 57% 0.8s[==================            ] 11267984/bps 59% 0.7s[==================            ] 11277706/bps 60% 0.7s[==================            ] 11120431/bps 61% 0.7s[===================           ] 11001318/bps 62% 0.7s[===================           ] 10961331/bps 63% 0.7s[===================           ] 11194304/bps 65% 0.6s[====================          ] 11293962/bps 66% 0.6s[====================          ] 11124598/bps 67% 0.6s[=====================         ] 11200894/bps 69% 0.5s[=====================         ] 11152804/bps 70% 0.5s[=====================         ] 11284431/bps 72% 0.5s[======================        ] 11148271/bps 72% 0.5s[======================        ] 11149697/bps 73% 0.5s[======================        ] 11250762/bps 75% 0.4s[=======================       ] 11291676/bps 76% 0.4s[=======================       ] 11344624/bps 78% 0.4s[=======================       ] 11224529/bps 78% 0.4s[========================      ] 11293257/bps 80% 0.3s[========================      ] 11269785/bps 81% 0.3s[=========================     ] 11268995/bps 82% 0.3s[=========================     ] 11256269/bps 83% 0.3s[=========================     ] 11148678/bps 83% 0.3s[=========================     ] 11177869/bps 85% 0.3s[==========================    ] 11138957/bps 85% 0.3s[==========================    ] 11235963/bps 87% 0.2s[==========================    ] 11239572/bps 88% 0.2s[===========================   ] 11305796/bps 90% 0.2s[===========================   ] 11334843/bps 91% 0.2s[============================  ] 11302114/bps 92% 0.1s[============================  ] 11233882/bps 93% 0.1s[============================  ] 11240417/bps 94% 0.1s[============================  ] 11171803/bps 94% 0.1s[============================  ] 11133717/bps 95% 0.1s[============================= ] 11128391/bps 96% 0.1s[============================= ] 11139209/bps 97% 0.1s[============================= ] 11140363/bps 98% 0.0s[============================= ] 11116375/bps 98% 0.0s[==============================] 11154472/bps 100% 0.0s[==============================] 11158360/bps 100% 0.0s
* Building TensorFlow Node.js bindings

> [email protected] postinstall /home/clive/work/seldon-core/fork-seldon-core/examples/models/nodejs_mnist/node_modules/protobufjs
> node scripts/postinstall

npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN [email protected] No repository field.
npm WARN [email protected] No license field.

added 50 packages from 58 contributors and audited 64 packages in 8.793s
found 0 vulnerabilities

npm start      .....] - prepare:nodejs_mnist: sill install printInstalled

> [email protected] start /home/clive/work/seldon-core/fork-seldon-core/examples/models/nodejs_mnist
> node train.js --epoch 1 --batch_size 128 --model_save_path /

2019-04-16 15:13:12.477002: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX AVX2 FMA
1 128 '/home/clive/work/seldon-core/fork-seldon-core/examples/models/nodejs_mnist/'
  * Downloading from: https://storage.googleapis.com/cvdf-datasets/mnist/train-images-idx3-ubyte.gz
  * Downloading from: https://storage.googleapis.com/cvdf-datasets/mnist/train-labels-idx1-ubyte.gz
  * Downloading from: https://storage.googleapis.com/cvdf-datasets/mnist/t10k-images-idx3-ubyte.gz
  * Downloading from: https://storage.googleapis.com/cvdf-datasets/mnist/t10k-labels-idx1-ubyte.gz
_________________________________________________________________
Layer (type)                 Output shape              Param #
=================================================================
conv2d_Conv2D1 (Conv2D)      [null,26,26,32]           320
_________________________________________________________________
conv2d_Conv2D2 (Conv2D)      [null,24,24,32]           9248
_________________________________________________________________
max_pooling2d_MaxPooling2D1  [null,12,12,32]           0
_________________________________________________________________
conv2d_Conv2D3 (Conv2D)      [null,10,10,64]           18496
_________________________________________________________________
conv2d_Conv2D4 (Conv2D)      [null,8,8,64]             36928
_________________________________________________________________
max_pooling2d_MaxPooling2D2  [null,4,4,64]             0
_________________________________________________________________
flatten_Flatten1 (Flatten)   [null,1024]               0
_________________________________________________________________
dropout_Dropout1 (Dropout)   [null,1024]               0
_________________________________________________________________
dense_Dense1 (Dense)         [null,512]                524800
_________________________________________________________________
dropout_Dropout2 (Dropout)   [null,512]                0
_________________________________________________________________
dense_Dense2 (Dense)         [null,10]                 5130
=================================================================
Total params: 594922
Trainable params: 594922
Non-trainable params: 0
_________________________________________________________________
2019-04-16 15:13:14.898522: W tensorflow/core/framework/allocator.cc:108] Allocation of 188160000 exceeds 10% of system memory.
Epoch 1 / 1
2019-04-16 15:13:15.271799: W tensorflow/core/framework/allocator.cc:108] Allocation of 27205632 exceeds 10% of system memory.
2019-04-16 15:13:15.305068: W tensorflow/core/framework/allocator.cc:108] Allocation of 27205632 exceeds 10% of system memory.
2019-04-16 15:13:15.671412: W tensorflow/core/framework/allocator.cc:108] Allocation of 27205632 exceeds 10% of system memory.
2019-04-16 15:13:15.701788: W tensorflow/core/framework/allocator.cc:108] Allocation of 27205632 exceeds 10% of system memory.
-------------------------------------------------------------------------: 152.4-------------------------------------------------------------------------: 145.1>------------------------------------------------------------------------: 143.2>------------------------------------------------------------------------: 147.7>------------------------------------------------------------------------: 146.9>------------------------------------------------------------------------: 146.5>------------------------------------------------------------------------: 148.6>------------------------------------------------------------------------: 146.7=>-----------------------------------------------------------------------: 144.8=>-----------------------------------------------------------------------: 144.6=>-----------------------------------------------------------------------: 143.8=>-----------------------------------------------------------------------: 142.5=>-----------------------------------------------------------------------: 142.6==>----------------------------------------------------------------------: 141.2==>----------------------------------------------------------------------: 139.6==>----------------------------------------------------------------------: 138.5==>----------------------------------------------------------------------: 138.3==>----------------------------------------------------------------------: 138.0==>----------------------------------------------------------------------: 137.1===>---------------------------------------------------------------------: 137.1===>---------------------------------------------------------------------: 136.3===>---------------------------------------------------------------------: 135.5===>---------------------------------------------------------------------: 135.7===>---------------------------------------------------------------------: 135.8====>--------------------------------------------------------------------: 135.8====>--------------------------------------------------------------------: 136.1====>--------------------------------------------------------------------: 136.0====>--------------------------------------------------------------------: 135.6====>--------------------------------------------------------------------: 135.9====>--------------------------------------------------------------------: 135.7=====>-------------------------------------------------------------------: 135.4=====>-------------------------------------------------------------------: 135.7=====>-------------------------------------------------------------------: 135.9=====>-------------------------------------------------------------------: 135.6======>------------------------------------------------------------------: 135.4======>------------------------------------------------------------------: 135.5======>------------------------------------------------------------------: 135.6======>------------------------------------------------------------------: 135.0======>------------------------------------------------------------------: 134.6=======>-----------------------------------------------------------------: 134.5=======>-----------------------------------------------------------------: 134.1=======>-----------------------------------------------------------------: 133.7=======>-----------------------------------------------------------------: 134.5=======>-----------------------------------------------------------------: 135.2========>----------------------------------------------------------------: 134.9========>----------------------------------------------------------------: 134.5========>----------------------------------------------------------------: 134.9========>----------------------------------------------------------------: 135.3========>----------------------------------------------------------------: 134.8=========>---------------------------------------------------------------: 134.6=========>---------------------------------------------------------------: 134.0=========>---------------------------------------------------------------: 133.5=========>---------------------------------------------------------------: 133.2=========>---------------------------------------------------------------: 132.6=========>---------------------------------------------------------------: 132.2==========>--------------------------------------------------------------: 132.1==========>--------------------------------------------------------------: 131.8==========>--------------------------------------------------------------: 131.4==========>--------------------------------------------------------------: 131.1==========>--------------------------------------------------------------: 130.7===========>-------------------------------------------------------------: 130.2===========>-------------------------------------------------------------: 130.0===========>-------------------------------------------------------------: 129.6===========>-------------------------------------------------------------: 129.1===========>-------------------------------------------------------------: 128.9===========>-------------------------------------------------------------: 128.6============>------------------------------------------------------------: 128.2============>------------------------------------------------------------: 128.0============>------------------------------------------------------------: 127.7============>------------------------------------------------------------: 127.5============>------------------------------------------------------------: 127.0=============>-----------------------------------------------------------: 126.4=============>-----------------------------------------------------------: 126.1=============>-----------------------------------------------------------: 125.7=============>-----------------------------------------------------------: 125.5=============>-----------------------------------------------------------: 125.2=============>-----------------------------------------------------------: 124.7==============>----------------------------------------------------------: 124.3==============>----------------------------------------------------------: 123.8==============>----------------------------------------------------------: 123.4==============>----------------------------------------------------------: 123.1==============>----------------------------------------------------------: 122.8===============>---------------------------------------------------------: 122.4===============>---------------------------------------------------------: 122.1===============>---------------------------------------------------------: 121.9===============>---------------------------------------------------------: 121.6===============>---------------------------------------------------------: 121.2===============>---------------------------------------------------------: 121.0================>--------------------------------------------------------: 120.6================>--------------------------------------------------------: 120.2================>--------------------------------------------------------: 120.0================>--------------------------------------------------------: 119.5================>--------------------------------------------------------: 119.0=================>-------------------------------------------------------: 118.7=================>-------------------------------------------------------: 118.2=================>-------------------------------------------------------: 117.8=================>-------------------------------------------------------: 117.5=================>-------------------------------------------------------: 117.0=================>-------------------------------------------------------: 116.6==================>------------------------------------------------------: 116.3==================>------------------------------------------------------: 115.9==================>------------------------------------------------------: 115.5==================>------------------------------------------------------: 115.2==================>------------------------------------------------------: 114.8===================>-----------------------------------------------------: 114.6===================>-----------------------------------------------------: 114.2===================>-----------------------------------------------------: 114.0===================>-----------------------------------------------------: 113.7===================>-----------------------------------------------------: 113.3===================>-----------------------------------------------------: 112.8====================>----------------------------------------------------: 112.5====================>----------------------------------------------------: 112.1====================>----------------------------------------------------: 111.7====================>----------------------------------------------------: 111.4====================>----------------------------------------------------: 111.0=====================>---------------------------------------------------: 110.7=====================>---------------------------------------------------: 110.3=====================>---------------------------------------------------: 109.8=====================>---------------------------------------------------: 109.4=====================>---------------------------------------------------: 109.0======================>--------------------------------------------------: 108.5======================>--------------------------------------------------: 108.1======================>--------------------------------------------------: 107.8======================>--------------------------------------------------: 107.4======================>--------------------------------------------------: 107.0======================>--------------------------------------------------: 106.7=======================>-------------------------------------------------: 106.2=======================>-------------------------------------------------: 105.8=======================>-------------------------------------------------: 105.5=======================>-------------------------------------------------: 105.4========================>------------------------------------------------: 105.0========================>------------------------------------------------: 104.6========================>------------------------------------------------: 104.2========================>------------------------------------------------: 103.8========================>------------------------------------------------: 103.3========================>------------------------------------------------: 102.9=========================>-----------------------------------------------: 102.5=========================>-----------------------------------------------: 102.0=========================>-----------------------------------------------: 101.7=========================>-----------------------------------------------: 101.3=========================>-----------------------------------------------: 100.9==========================>----------------------------------------------: 100.5==========================>----------------------------------------------: 100.1==========================>-----------------------------------------------: 99.7==========================>-----------------------------------------------: 99.2===========================>----------------------------------------------: 98.8===========================>----------------------------------------------: 98.3===========================>----------------------------------------------: 97.9===========================>----------------------------------------------: 97.5===========================>----------------------------------------------: 97.1============================>---------------------------------------------: 96.7============================>---------------------------------------------: 96.3============================>---------------------------------------------: 95.8============================>---------------------------------------------: 95.4============================>---------------------------------------------: 95.0============================>---------------------------------------------: 94.6=============================>--------------------------------------------: 94.2=============================>--------------------------------------------: 93.7=============================>--------------------------------------------: 93.3=============================>--------------------------------------------: 92.9=============================>--------------------------------------------: 92.5==============================>-------------------------------------------: 92.1==============================>-------------------------------------------: 91.7==============================>-------------------------------------------: 91.4==============================>-------------------------------------------: 90.9==============================>-------------------------------------------: 90.6===============================>------------------------------------------: 90.2===============================>------------------------------------------: 89.8===============================>------------------------------------------: 89.4===============================>------------------------------------------: 89.0===============================>------------------------------------------: 88.5===============================>------------------------------------------: 88.1================================>-----------------------------------------: 87.7================================>-----------------------------------------: 87.3================================>-----------------------------------------: 86.9================================>-----------------------------------------: 86.5================================>-----------------------------------------: 86.0=================================>----------------------------------------: 85.7=================================>----------------------------------------: 85.2=================================>----------------------------------------: 84.8=================================>----------------------------------------: 84.5=================================>----------------------------------------: 84.0=================================>----------------------------------------: 83.6==================================>---------------------------------------: 83.2==================================>---------------------------------------: 82.8==================================>---------------------------------------: 82.4==================================>---------------------------------------: 82.0==================================>---------------------------------------: 81.6===================================>--------------------------------------: 81.2===================================>--------------------------------------: 80.8===================================>--------------------------------------: 80.4===================================>--------------------------------------: 80.0===================================>--------------------------------------: 79.6====================================>-------------------------------------: 79.2====================================>-------------------------------------: 78.8====================================>-------------------------------------: 78.5====================================>-------------------------------------: 78.1====================================>-------------------------------------: 77.7====================================>-------------------------------------: 77.3=====================================>------------------------------------: 77.0=====================================>------------------------------------: 76.7=====================================>------------------------------------: 76.3=====================================>------------------------------------: 75.9=====================================>------------------------------------: 75.5======================================>-----------------------------------: 75.1======================================>-----------------------------------: 74.7======================================>-----------------------------------: 74.3======================================>-----------------------------------: 73.9======================================>-----------------------------------: 73.5=======================================>----------------------------------: 73.1=======================================>----------------------------------: 72.7=======================================>----------------------------------: 72.3=======================================>----------------------------------: 72.0=======================================>----------------------------------: 71.6=======================================>----------------------------------: 71.3========================================>---------------------------------: 71.0========================================>---------------------------------: 70.5========================================>---------------------------------: 70.1========================================>---------------------------------: 69.7========================================>---------------------------------: 69.3=========================================>--------------------------------: 68.9=========================================>--------------------------------: 68.6=========================================>--------------------------------: 68.5=========================================>--------------------------------: 68.2=========================================>--------------------------------: 67.7=========================================>--------------------------------: 67.3==========================================>-------------------------------: 67.0==========================================>-------------------------------: 66.6==========================================>-------------------------------: 66.2==========================================>-------------------------------: 65.8==========================================>-------------------------------: 65.4===========================================>------------------------------: 65.0===========================================>------------------------------: 64.6===========================================>------------------------------: 64.2===========================================>------------------------------: 63.8===========================================>------------------------------: 63.4============================================>-----------------------------: 63.0============================================>-----------------------------: 62.6============================================>-----------------------------: 62.2============================================>-----------------------------: 61.8============================================>-----------------------------: 61.4============================================>-----------------------------: 61.0=============================================>----------------------------: 60.6=============================================>----------------------------: 60.3=============================================>----------------------------: 60.0=============================================>----------------------------: 59.6=============================================>----------------------------: 59.3==============================================>---------------------------: 59.0==============================================>---------------------------: 58.7==============================================>---------------------------: 58.4==============================================>---------------------------: 58.1==============================================>---------------------------: 57.7==============================================>---------------------------: 57.3===============================================>--------------------------: 57.0===============================================>--------------------------: 56.6===============================================>--------------------------: 56.3===============================================>--------------------------: 55.9===============================================>--------------------------: 55.5================================================>-------------------------: 55.1================================================>-------------------------: 54.8================================================>-------------------------: 54.4================================================>-------------------------: 54.1================================================>-------------------------: 53.7=================================================>------------------------: 53.3=================================================>------------------------: 52.9=================================================>------------------------: 52.6=================================================>------------------------: 52.2=================================================>------------------------: 51.8=================================================>------------------------: 51.4==================================================>-----------------------: 51.0==================================================>-----------------------: 50.6==================================================>-----------------------: 50.2==================================================>-----------------------: 49.9==================================================>-----------------------: 49.5===================================================>----------------------: 49.1===================================================>----------------------: 48.7===================================================>----------------------: 48.3===================================================>----------------------: 47.9===================================================>----------------------: 47.5===================================================>----------------------: 47.1====================================================>---------------------: 46.7====================================================>---------------------: 46.3====================================================>---------------------: 45.9====================================================>---------------------: 45.5====================================================>---------------------: 45.0=====================================================>--------------------: 44.6=====================================================>--------------------: 44.2=====================================================>--------------------: 43.8=====================================================>--------------------: 43.4=====================================================>--------------------: 43.0======================================================>-------------------: 42.6======================================================>-------------------: 42.2======================================================>-------------------: 41.8======================================================>-------------------: 41.5======================================================>-------------------: 41.1======================================================>-------------------: 40.7=======================================================>------------------: 40.3=======================================================>------------------: 39.9=======================================================>------------------: 39.5=======================================================>------------------: 39.1=======================================================>------------------: 38.7========================================================>-----------------: 38.3========================================================>-----------------: 37.9========================================================>-----------------: 37.5========================================================>-----------------: 37.0========================================================>-----------------: 36.6========================================================>-----------------: 36.2=========================================================>----------------: 35.8=========================================================>----------------: 35.4=========================================================>----------------: 35.0=========================================================>----------------: 34.6=========================================================>----------------: 34.1==========================================================>---------------: 33.7==========================================================>---------------: 33.3==========================================================>---------------: 32.9==========================================================>---------------: 32.5==========================================================>---------------: 32.1===========================================================>--------------: 31.7===========================================================>--------------: 31.2===========================================================>--------------: 30.8===========================================================>--------------: 30.4===========================================================>--------------: 30.0===========================================================>--------------: 29.6============================================================>-------------: 29.2============================================================>-------------: 28.8============================================================>-------------: 28.4============================================================>-------------: 28.0============================================================>-------------: 27.6=============================================================>------------: 27.2=============================================================>------------: 26.8=============================================================>------------: 26.4=============================================================>------------: 26.0=============================================================>------------: 25.6==============================================================>-----------: 25.2==============================================================>-----------: 24.8==============================================================>-----------: 24.4==============================================================>-----------: 24.0==============================================================>-----------: 23.6==============================================================>-----------: 23.1===============================================================>----------: 22.7===============================================================>----------: 22.3===============================================================>----------: 21.9===============================================================>----------: 21.5===============================================================>----------: 21.1================================================================>---------: 20.7================================================================>---------: 20.3================================================================>---------: 19.9================================================================>---------: 19.5================================================================>---------: 19.1================================================================>---------: 18.7=================================================================>--------: 18.3=================================================================>--------: 17.9=================================================================>--------: 17.5=================================================================>--------: 17.1=================================================================>--------: 16.6==================================================================>-------: 16.2==================================================================>-------: 15.8==================================================================>-------: 15.4==================================================================>-------: 15.0==================================================================>-------: 14.6===================================================================>------: 14.2===================================================================>------: 13.8===================================================================>------: 13.4===================================================================>------: 13.0===================================================================>------: 12.6===================================================================>------: 12.2====================================================================>-----: 11.8====================================================================>-----: 11.4====================================================================>-----: 11.0====================================================================>-----: 10.6====================================================================>-----: 10.2=====================================================================>-----: 9.7======================================================================>----: 9.3======================================================================>----: 8.9======================================================================>----: 8.5======================================================================>----: 8.1======================================================================>----: 7.7=======================================================================>---: 7.3=======================================================================>---: 6.9=======================================================================>---: 6.5=======================================================================>---: 6.1=======================================================================>---: 5.7========================================================================>--: 5.3========================================================================>--: 4.9========================================================================>--: 4.5========================================================================>--: 4.1========================================================================>--: 3.7========================================================================>--: 3.3=========================================================================>-: 2.8=========================================================================>-: 2.4=========================================================================>-: 2.0=========================================================================>-: 1.6=========================================================================>-: 1.2==========================================================================>: 0.8==========================================================================>: 0.4==========================================================================>: 0.0
Loss: 0.240 (train), 0.058 (val); Accuracy: 0.923 (train), 0.982 (val) (3.30 ms/step)

Evaluation result:
  Loss = 0.054; Accuracy = 0.983
Saved model to path: /home/clive/work/seldon-core/fork-seldon-core/examples/models/nodejs_mnist/


   ╭───────────────────────────────────────────────────────────────╮
                                                                  
          New minor version of npm available! 6.4.16.9.0       
      Changelog: https://github.com/npm/cli/releases/tag/v6.9.0   
                  Run npm install -g npm to update!               
                                                                  
   ╰───────────────────────────────────────────────────────────────╯

rm -f *ubyte
rm -rf node_modules
rm -f package-lock.json

Training creates a model.json file and a weights.bin file which is utilized for prediction

Prediction using REST API on the docker container

[2]:
!s2i build . seldonio/seldon-core-s2i-nodejs:0.2-SNAPSHOT node-s2i-mnist-model:0.1
---> Installing application source...
---> Installing dependencies ...

> @tensorflow/[email protected] install /microservice/model/node_modules/@tensorflow/tfjs-node
> node scripts/install.js

* Downloading libtensorflow

* Building TensorFlow Node.js bindings

> [email protected] postinstall /microservice/model/node_modules/protobufjs
> node scripts/postinstall

npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN [email protected] No repository field.
npm WARN [email protected] No license field.

added 50 packages from 58 contributors and audited 64 packages in 16.212s
found 0 vulnerabilities

Build completed successfully
[3]:
!docker run --name "nodejs_mnist_predictor" -d --rm -p 5000:5000 node-s2i-mnist-model:0.1
a41526a3110245adad542b85a8ac0c5822e35d0cb0530f3cffe46c10e421cfff

Send some random features that conform to the contract

[4]:
!seldon-core-tester contract.json 0.0.0.0 5000 -p -t
----------------------------------------
SENDING NEW REQUEST:

[[[[0.109]
   [0.536]
   [0.906]
   [0.169]
   [0.342]
   [0.662]
   [0.834]
   [0.724]
   [0.466]
   [0.199]
   [0.503]
   [0.502]
   [0.899]
   [0.761]
   [0.155]
   [0.105]
   [0.225]
   [0.296]
   [0.198]
   [0.917]
   [0.483]
   [0.881]
   [0.283]
   [0.919]
   [0.817]
   [0.509]
   [0.08 ]
   [0.965]]

  [[0.564]
   [0.931]
   [0.953]
   [0.001]
   [0.858]
   [0.332]
   [0.942]
   [0.699]
   [0.95 ]
   [0.486]
   [0.876]
   [0.727]
   [0.163]
   [0.535]
   [0.881]
   [0.937]
   [0.369]
   [0.556]
   [0.985]
   [0.574]
   [0.022]
   [0.835]
   [0.174]
   [0.615]
   [0.041]
   [0.916]
   [0.619]
   [0.342]]

  [[0.874]
   [0.522]
   [0.911]
   [0.163]
   [0.341]
   [0.233]
   [0.626]
   [0.528]
   [0.194]
   [0.566]
   [0.644]
   [0.897]
   [0.659]
   [0.065]
   [0.383]
   [0.778]
   [0.746]
   [0.492]
   [0.496]
   [0.628]
   [0.245]
   [0.07 ]
   [0.647]
   [0.159]
   [0.97 ]
   [0.407]
   [0.395]
   [0.4  ]]

  [[0.466]
   [0.914]
   [0.617]
   [0.202]
   [0.285]
   [0.183]
   [0.137]
   [0.952]
   [0.608]
   [0.434]
   [0.89 ]
   [0.293]
   [0.555]
   [0.034]
   [0.988]
   [0.548]
   [0.743]
   [0.066]
   [0.683]
   [0.205]
   [0.739]
   [0.205]
   [0.35 ]
   [0.297]
   [0.918]
   [0.928]
   [0.562]
   [0.747]]

  [[0.143]
   [0.686]
   [0.432]
   [0.701]
   [0.243]
   [0.503]
   [0.469]
   [0.553]
   [0.206]
   [0.444]
   [0.065]
   [0.711]
   [0.614]
   [0.722]
   [0.885]
   [0.754]
   [0.594]
   [0.124]
   [0.455]
   [0.276]
   [0.363]
   [0.125]
   [0.41 ]
   [0.078]
   [0.902]
   [0.321]
   [0.279]
   [0.164]]

  [[0.903]
   [0.556]
   [0.266]
   [0.927]
   [0.958]
   [0.2  ]
   [0.095]
   [0.761]
   [0.419]
   [0.047]
   [0.055]
   [0.831]
   [0.527]
   [0.404]
   [0.512]
   [0.653]
   [0.652]
   [0.325]
   [0.456]
   [0.681]
   [0.791]
   [0.601]
   [0.514]
   [0.255]
   [0.415]
   [0.831]
   [0.394]
   [0.02 ]]

  [[0.904]
   [0.89 ]
   [0.793]
   [0.342]
   [0.125]
   [0.039]
   [0.423]
   [0.714]
   [0.546]
   [0.299]
   [0.902]
   [0.717]
   [0.507]
   [0.355]
   [0.174]
   [0.836]
   [0.473]
   [0.635]
   [0.887]
   [0.755]
   [0.62 ]
   [0.508]
   [0.479]
   [0.915]
   [0.1  ]
   [0.665]
   [0.148]
   [0.421]]

  [[0.724]
   [0.336]
   [0.596]
   [0.432]
   [0.848]
   [0.737]
   [0.971]
   [0.408]
   [0.395]
   [0.371]
   [0.588]
   [0.778]
   [0.428]
   [0.687]
   [0.534]
   [0.427]
   [0.723]
   [0.161]
   [0.532]
   [0.739]
   [0.855]
   [0.37 ]
   [0.512]
   [0.862]
   [0.061]
   [0.817]
   [0.768]
   [0.735]]

  [[0.464]
   [0.604]
   [0.541]
   [0.349]
   [0.102]
   [0.704]
   [0.24 ]
   [0.38 ]
   [0.884]
   [0.131]
   [0.944]
   [0.494]
   [0.794]
   [0.934]
   [0.81 ]
   [0.015]
   [0.612]
   [0.399]
   [0.484]
   [0.18 ]
   [0.596]
   [0.347]
   [0.582]
   [0.47 ]
   [0.759]
   [0.232]
   [0.827]
   [0.635]]

  [[0.362]
   [0.976]
   [0.588]
   [0.466]
   [0.371]
   [0.139]
   [0.201]
   [0.927]
   [0.998]
   [0.063]
   [0.439]
   [0.483]
   [0.07 ]
   [0.478]
   [0.827]
   [0.77 ]
   [0.971]
   [0.318]
   [0.42 ]
   [0.835]
   [0.751]
   [0.84 ]
   [0.838]
   [0.654]
   [0.204]
   [0.153]
   [0.441]
   [0.015]]

  [[0.489]
   [0.252]
   [0.   ]
   [0.417]
   [0.92 ]
   [0.442]
   [0.307]
   [0.073]
   [0.784]
   [0.481]
   [0.154]
   [0.334]
   [0.276]
   [0.163]
   [0.156]
   [0.145]
   [0.348]
   [0.356]
   [0.276]
   [0.68 ]
   [0.431]
   [0.238]
   [0.404]
   [0.284]
   [0.848]
   [0.865]
   [0.052]
   [0.433]]

  [[0.19 ]
   [0.266]
   [0.835]
   [0.469]
   [0.808]
   [0.189]
   [0.424]
   [0.127]
   [0.766]
   [0.638]
   [0.283]
   [0.494]
   [0.459]
   [0.299]
   [0.764]
   [0.368]
   [0.248]
   [0.28 ]
   [0.328]
   [0.356]
   [0.083]
   [0.067]
   [0.616]
   [0.994]
   [0.683]
   [0.975]
   [0.96 ]
   [0.706]]

  [[0.198]
   [0.879]
   [0.205]
   [0.14 ]
   [0.251]
   [0.814]
   [0.808]
   [0.61 ]
   [0.762]
   [0.847]
   [0.115]
   [0.894]
   [0.043]
   [0.342]
   [0.967]
   [0.269]
   [0.507]
   [0.072]
   [0.126]
   [0.091]
   [0.023]
   [0.917]
   [0.984]
   [0.007]
   [0.668]
   [0.992]
   [0.846]
   [0.062]]

  [[0.786]
   [0.823]
   [0.279]
   [0.888]
   [0.02 ]
   [0.12 ]
   [0.56 ]
   [0.383]
   [0.08 ]
   [0.013]
   [0.525]
   [0.078]
   [0.012]
   [0.242]
   [0.162]
   [0.088]
   [0.359]
   [0.276]
   [0.968]
   [0.219]
   [0.441]
   [0.957]
   [0.954]
   [0.779]
   [0.419]
   [0.109]
   [0.312]
   [0.708]]

  [[0.993]
   [0.588]
   [0.856]
   [0.924]
   [0.43 ]
   [0.725]
   [0.285]
   [0.961]
   [0.251]
   [0.631]
   [0.458]
   [0.416]
   [0.478]
   [0.872]
   [0.833]
   [0.285]
   [0.28 ]
   [0.669]
   [0.589]
   [0.238]
   [0.467]
   [0.706]
   [0.067]
   [0.665]
   [0.397]
   [0.021]
   [0.597]
   [0.76 ]]

  [[0.057]
   [0.769]
   [0.938]
   [0.901]
   [0.288]
   [0.145]
   [0.305]
   [0.275]
   [0.222]
   [0.04 ]
   [0.84 ]
   [0.734]
   [0.329]
   [0.106]
   [0.879]
   [0.876]
   [0.245]
   [0.179]
   [0.892]
   [0.731]
   [0.08 ]
   [0.307]
   [0.368]
   [0.668]
   [0.673]
   [0.867]
   [0.187]
   [0.583]]

  [[0.393]
   [0.241]
   [0.192]
   [0.787]
   [0.469]
   [0.128]
   [0.006]
   [0.271]
   [0.013]
   [0.79 ]
   [0.447]
   [0.557]
   [0.844]
   [0.303]
   [0.628]
   [0.339]
   [0.413]
   [0.441]
   [0.538]
   [0.235]
   [0.241]
   [0.229]
   [0.228]
   [0.374]
   [0.433]
   [0.838]
   [0.922]
   [0.24 ]]

  [[0.903]
   [0.151]
   [0.391]
   [0.079]
   [0.574]
   [0.94 ]
   [0.742]
   [0.677]
   [0.622]
   [0.969]
   [0.9  ]
   [0.785]
   [0.271]
   [0.373]
   [0.253]
   [0.03 ]
   [0.771]
   [0.717]
   [0.483]
   [0.004]
   [0.939]
   [0.301]
   [0.208]
   [0.081]
   [0.282]
   [0.288]
   [0.253]
   [0.556]]

  [[0.324]
   [0.683]
   [0.038]
   [0.487]
   [0.537]
   [0.955]
   [0.901]
   [0.862]
   [0.846]
   [0.544]
   [0.844]
   [0.451]
   [0.234]
   [0.34 ]
   [0.739]
   [0.18 ]
   [0.958]
   [0.674]
   [0.443]
   [0.389]
   [0.762]
   [0.836]
   [0.868]
   [0.437]
   [0.976]
   [0.478]
   [0.018]
   [0.971]]

  [[0.062]
   [0.232]
   [0.729]
   [0.697]
   [0.257]
   [0.599]
   [0.503]
   [0.49 ]
   [0.046]
   [0.781]
   [0.222]
   [0.566]
   [0.329]
   [0.379]
   [0.951]
   [0.421]
   [0.57 ]
   [0.333]
   [0.18 ]
   [0.96 ]
   [0.156]
   [0.116]
   [0.112]
   [0.063]
   [0.348]
   [0.878]
   [0.251]
   [0.041]]

  [[0.535]
   [0.085]
   [0.914]
   [0.981]
   [0.593]
   [0.098]
   [0.129]
   [0.803]
   [0.457]
   [0.177]
   [0.062]
   [0.26 ]
   [0.074]
   [0.865]
   [0.092]
   [0.607]
   [0.725]
   [0.402]
   [0.486]
   [0.392]
   [0.983]
   [0.715]
   [0.511]
   [0.334]
   [0.595]
   [0.875]
   [0.553]
   [0.619]]

  [[0.336]
   [0.758]
   [0.818]
   [0.907]
   [0.41 ]
   [0.397]
   [0.013]
   [0.874]
   [0.312]
   [0.242]
   [0.939]
   [0.318]
   [0.985]
   [0.135]
   [0.115]
   [0.92 ]
   [0.223]
   [0.166]
   [0.737]
   [0.023]
   [0.588]
   [0.995]
   [0.57 ]
   [0.376]
   [0.367]
   [0.278]
   [0.387]
   [0.406]]

  [[0.783]
   [0.672]
   [0.019]
   [0.94 ]
   [0.839]
   [0.976]
   [0.604]
   [0.692]
   [0.859]
   [0.383]
   [0.601]
   [0.247]
   [0.983]
   [0.84 ]
   [0.94 ]
   [0.227]
   [0.395]
   [0.424]
   [0.342]
   [0.01 ]
   [0.2  ]
   [0.077]
   [0.047]
   [0.024]
   [0.678]
   [0.862]
   [0.958]
   [0.209]]

  [[0.484]
   [0.186]
   [0.686]
   [0.531]
   [0.487]
   [0.642]
   [0.717]
   [0.178]
   [0.537]
   [0.681]
   [0.895]
   [0.645]
   [0.365]
   [0.943]
   [0.786]
   [0.346]
   [0.505]
   [0.576]
   [0.224]
   [0.984]
   [0.823]
   [0.361]
   [0.7  ]
   [0.111]
   [0.651]
   [0.986]
   [0.083]
   [0.367]]

  [[0.858]
   [0.919]
   [0.071]
   [0.45 ]
   [0.41 ]
   [0.162]
   [0.586]
   [0.842]
   [0.667]
   [0.902]
   [0.97 ]
   [0.606]
   [0.873]
   [0.804]
   [0.403]
   [0.805]
   [0.386]
   [0.311]
   [0.282]
   [0.913]
   [0.528]
   [0.118]
   [0.851]
   [0.371]
   [0.784]
   [0.736]
   [0.053]
   [0.819]]

  [[0.457]
   [0.274]
   [0.906]
   [0.006]
   [0.008]
   [0.772]
   [0.657]
   [0.84 ]
   [0.022]
   [0.08 ]
   [0.643]
   [0.808]
   [0.732]
   [0.681]
   [0.778]
   [0.664]
   [0.248]
   [0.254]
   [0.066]
   [0.527]
   [0.126]
   [0.297]
   [0.891]
   [0.836]
   [0.276]
   [0.478]
   [0.96 ]
   [0.263]]

  [[0.841]
   [0.094]
   [0.367]
   [0.519]
   [0.811]
   [0.803]
   [0.63 ]
   [0.704]
   [0.92 ]
   [0.963]
   [0.497]
   [0.833]
   [0.606]
   [0.136]
   [0.209]
   [0.191]
   [0.764]
   [0.143]
   [0.22 ]
   [0.787]
   [0.365]
   [0.428]
   [0.952]
   [0.994]
   [0.287]
   [0.164]
   [0.096]
   [0.413]]

  [[0.014]
   [0.904]
   [0.188]
   [0.77 ]
   [0.85 ]
   [0.858]
   [0.674]
   [0.679]
   [0.377]
   [0.581]
   [0.286]
   [0.742]
   [0.862]
   [0.113]
   [0.4  ]
   [0.047]
   [0.53 ]
   [0.958]
   [0.673]
   [0.499]
   [0.504]
   [0.041]
   [0.011]
   [0.252]
   [0.781]
   [0.142]
   [0.783]
   [0.933]]]]
RECEIVED RESPONSE:
data {
  names: "t:0"
  names: "t:1"
  names: "t:2"
  names: "t:3"
  names: "t:4"
  names: "t:5"
  names: "t:6"
  names: "t:7"
  names: "t:8"
  names: "t:9"
  tensor {
    shape: 1
    shape: 10
    values: 0.019353602081537247
    values: 0.022517181932926178
    values: 0.3373313546180725
    values: 0.0516216903924942
    values: 0.010216832160949707
    values: 0.03270014375448227
    values: 0.025425242260098457
    values: 0.02032855898141861
    values: 0.46700385212898254
    values: 0.013501551002264023
  }
}


[5]:
!docker rm nodejs_mnist_predictor --force
nodejs_mnist_predictor

Prediction using GRPC API on the docker container

[6]:
!s2i build -E ./.s2i/environment_grpc . seldonio/seldon-core-s2i-nodejs:0.2-SNAPSHOT node-s2i-mnist-model:0.2
---> Installing application source...
---> Installing dependencies ...

> @tensorflow/[email protected] install /microservice/model/node_modules/@tensorflow/tfjs-node
> node scripts/install.js

* Downloading libtensorflow

* Building TensorFlow Node.js bindings

> [email protected] postinstall /microservice/model/node_modules/protobufjs
> node scripts/postinstall

npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN [email protected] No repository field.
npm WARN [email protected] No license field.

added 50 packages from 57 contributors and audited 64 packages in 8.297s
found 0 vulnerabilities

Build completed successfully
[7]:
!docker run --name "nodejs_mnist_predictor" -d --rm -p 5000:5000 node-s2i-mnist-model:0.2
7059dc3cd930b287c0eff2649034e338ddbaff4ce868c9fc695428bd426c04bd

Send some random features that conform to the contract

[8]:
!seldon-core-tester contract.json 0.0.0.0 5000 -p -t --grpc
----------------------------------------
SENDING NEW REQUEST:
RECEIVED RESPONSE:
Success:True message:
Request:
data {
  tensor {
    shape: 1
    shape: 28
    shape: 28
    shape: 1
    values: 0.401
    values: 0.774
    values: 0.944
    values: 0.816
    values: 0.069
    values: 0.403
    values: 0.572
    values: 0.724
    values: 0.972
    values: 0.433
    values: 0.697
    values: 0.868
    values: 0.523
    values: 0.937
    values: 0.06
    values: 0.921
    values: 0.726
    values: 0.336
    values: 0.635
    values: 0.242
    values: 0.648
    values: 0.104
    values: 0.615
    values: 0.873
    values: 0.224
    values: 0.88
    values: 0.99
    values: 0.92
    values: 0.234
    values: 0.723
    values: 0.462
    values: 0.346
    values: 0.034
    values: 0.037
    values: 0.426
    values: 0.656
    values: 0.24
    values: 0.375
    values: 0.818
    values: 0.998
    values: 0.129
    values: 0.108
    values: 0.1
    values: 0.633
    values: 0.518
    values: 0.742
    values: 0.248
    values: 0.671
    values: 0.898
    values: 0.59
    values: 0.414
    values: 0.749
    values: 0.639
    values: 0.974
    values: 0.218
    values: 0.021
    values: 0.82
    values: 0.944
    values: 0.249
    values: 0.678
    values: 0.638
    values: 0.427
    values: 0.64
    values: 0.94
    values: 0.976
    values: 0.151
    values: 0.056
    values: 0.439
    values: 0.955
    values: 0.604
    values: 0.968
    values: 0.192
    values: 0.036
    values: 0.279
    values: 0.947
    values: 0.955
    values: 0.93
    values: 0.707
    values: 0.579
    values: 0.373
    values: 0.636
    values: 0.628
    values: 0.052
    values: 0.755
    values: 0.111
    values: 0.03
    values: 0.429
    values: 0.585
    values: 0.658
    values: 0.661
    values: 0.732
    values: 0.705
    values: 0.358
    values: 0.8
    values: 0.13
    values: 0.471
    values: 0.477
    values: 0.267
    values: 0.511
    values: 0.913
    values: 0.497
    values: 0.242
    values: 0.869
    values: 0.171
    values: 0.774
    values: 0.42
    values: 0.778
    values: 0.253
    values: 0.309
    values: 0.552
    values: 0.233
    values: 0.199
    values: 0.941
    values: 0.731
    values: 0.917
    values: 0.435
    values: 0.26
    values: 0.578
    values: 0.365
    values: 0.261
    values: 0.348
    values: 0.725
    values: 0.428
    values: 0.987
    values: 0.157
    values: 0.048
    values: 0.457
    values: 0.529
    values: 0.883
    values: 0.999
    values: 0.763
    values: 0.575
    values: 0.519
    values: 0.979
    values: 0.979
    values: 0.408
    values: 0.096
    values: 0.352
    values: 0.21
    values: 0.977
    values: 0.669
    values: 0.826
    values: 0.466
    values: 0.081
    values: 0.612
    values: 0.421
    values: 0.972
    values: 0.407
    values: 0.288
    values: 0.725
    values: 0.153
    values: 0.508
    values: 0.989
    values: 0.718
    values: 0.797
    values: 0.973
    values: 0.968
    values: 0.729
    values: 0.229
    values: 0.44
    values: 0.842
    values: 0.971
    values: 0.472
    values: 0.238
    values: 0.611
    values: 0.68
    values: 0.36
    values: 0.16
    values: 0.905
    values: 0.869
    values: 0.545
    values: 0.09
    values: 0.837
    values: 0.699
    values: 0.113
    values: 0.735
    values: 0.201
    values: 0.241
    values: 0.527
    values: 0.227
    values: 0.702
    values: 0.026
    values: 0.532
    values: 0.93
    values: 0.982
    values: 0.446
    values: 0.103
    values: 0.926
    values: 0.335
    values: 0.591
    values: 0.013
    values: 0.107
    values: 0.973
    values: 0.97
    values: 0.476
    values: 0.038
    values: 0.501
    values: 0.633
    values: 0.075
    values: 0.965
    values: 0.161
    values: 0.383
    values: 0.336
    values: 0.415
    values: 0.482
    values: 0.822
    values: 0.36
    values: 0.452
    values: 0.913
    values: 0.346
    values: 0.873
    values: 0.282
    values: 0.225
    values: 0.924
    values: 0.458
    values: 0.79
    values: 0.861
    values: 0.813
    values: 0.762
    values: 0.394
    values: 0.893
    values: 0.038
    values: 0.327
    values: 0.397
    values: 0.296
    values: 0.681
    values: 0.68
    values: 0.088
    values: 0.058
    values: 0.942
    values: 0.483
    values: 0.689
    values: 0.09
    values: 0.217
    values: 0.263
    values: 0.872
    values: 0.407
    values: 0.322
    values: 0.875
    values: 0.019
    values: 0.796
    values: 0.492
    values: 0.71
    values: 0.122
    values: 0.725
    values: 0.164
    values: 0.555
    values: 0.421
    values: 0.577
    values: 0.011
    values: 0.583
    values: 0.802
    values: 0.008
    values: 0.928
    values: 0.41
    values: 0.903
    values: 0.062
    values: 0.918
    values: 0.468
    values: 0.372
    values: 0.504
    values: 0.69
    values: 0.572
    values: 0.058
    values: 0.761
    values: 0.05
    values: 0.475
    values: 0.686
    values: 0.696
    values: 0.963
    values: 0.864
    values: 0.746
    values: 0.1
    values: 0.024
    values: 0.71
    values: 0.289
    values: 0.826
    values: 0.819
    values: 0.508
    values: 0.303
    values: 0.231
    values: 0.17
    values: 0.156
    values: 0.935
    values: 0.01
    values: 0.01
    values: 0.305
    values: 0.071
    values: 0.248
    values: 0.379
    values: 0.219
    values: 0.597
    values: 0.977
    values: 0.916
    values: 0.401
    values: 0.19
    values: 0.679
    values: 0.791
    values: 0.397
    values: 0.763
    values: 0.961
    values: 0.109
    values: 0.062
    values: 0.655
    values: 0.924
    values: 0.497
    values: 0.955
    values: 0.921
    values: 0.201
    values: 0.837
    values: 0.689
    values: 0.417
    values: 0.667
    values: 0.463
    values: 0.19
    values: 0.414
    values: 0.525
    values: 0.905
    values: 0.585
    values: 0.191
    values: 0.997
    values: 0.477
    values: 0.214
    values: 0.081
    values: 0.106
    values: 0.568
    values: 0.978
    values: 0.88
    values: 0.202
    values: 0.766
    values: 0.16
    values: 0.422
    values: 0.07
    values: 0.87
    values: 0.211
    values: 0.074
    values: 0.944
    values: 0.304
    values: 0.383
    values: 0.793
    values: 0.984
    values: 0.735
    values: 0.669
    values: 0.308
    values: 0.73
    values: 0.418
    values: 0.099
    values: 0.637
    values: 0.493
    values: 0.705
    values: 0.307
    values: 0.966
    values: 0.532
    values: 0.867
    values: 0.665
    values: 0.601
    values: 0.443
    values: 0.589
    values: 0.296
    values: 0.256
    values: 0.524
    values: 0.898
    values: 0.816
    values: 0.001
    values: 0.673
    values: 0.156
    values: 0.302
    values: 0.979
    values: 0.722
    values: 0.479
    values: 0.635
    values: 0.479
    values: 0.879
    values: 0.394
    values: 0.078
    values: 0.354
    values: 0.741
    values: 0.182
    values: 0.796
    values: 0.792
    values: 0.59
    values: 0.305
    values: 0.056
    values: 0.536
    values: 0.041
    values: 0.487
    values: 0.679
    values: 0.491
    values: 0.586
    values: 0.358
    values: 0.444
    values: 0.967
    values: 0.739
    values: 0.556
    values: 0.959
    values: 0.214
    values: 0.919
    values: 0.636
    values: 0.734
    values: 0.171
    values: 0.96
    values: 0.193
    values: 0.402
    values: 0.896
    values: 0.694
    values: 0.523
    values: 0.431
    values: 0.305
    values: 0.624
    values: 0.892
    values: 0.252
    values: 0.422
    values: 0.11
    values: 0.573
    values: 0.989
    values: 0.548
    values: 0.097
    values: 0.829
    values: 0.547
    values: 0.337
    values: 0.334
    values: 0.769
    values: 0.76
    values: 0.539
    values: 0.269
    values: 0.54
    values: 0.424
    values: 0.491
    values: 0.488
    values: 0.029
    values: 0.9
    values: 0.635
    values: 0.934
    values: 0.926
    values: 0.291
    values: 0.556
    values: 0.361
    values: 0.235
    values: 0.588
    values: 0.389
    values: 0.753
    values: 0.748
    values: 0.117
    values: 0.166
    values: 0.382
    values: 0.163
    values: 0.43
    values: 0.595
    values: 0.067
    values: 0.908
    values: 0.217
    values: 0.717
    values: 0.721
    values: 0.858
    values: 0.363
    values: 0.568
    values: 0.32
    values: 0.071
    values: 0.099
    values: 0.91
    values: 0.774
    values: 0.67
    values: 0.308
    values: 0.616
    values: 0.109
    values: 0.339
    values: 0.311
    values: 0.023
    values: 0.368
    values: 0.462
    values: 0.158
    values: 0.965
    values: 0.338
    values: 0.374
    values: 0.048
    values: 0.195
    values: 0.972
    values: 0.57
    values: 0.623
    values: 0.898
    values: 0.244
    values: 0.457
    values: 0.845
    values: 0.381
    values: 0.89
    values: 0.814
    values: 0.713
    values: 0.309
    values: 0.73
    values: 0.739
    values: 0.596
    values: 0.556
    values: 0.712
    values: 0.843
    values: 0.568
    values: 0.386
    values: 0.095
    values: 0.041
    values: 0.551
    values: 0.556
    values: 0.446
    values: 0.049
    values: 0.21
    values: 0.537
    values: 0.685
    values: 0.225
    values: 0.84
    values: 0.034
    values: 0.703
    values: 0.725
    values: 0.542
    values: 0.338
    values: 0.628
    values: 0.022
    values: 0.338
    values: 0.568
    values: 0.528
    values: 0.475
    values: 0.911
    values: 0.312
    values: 0.898
    values: 0.362
    values: 0.68
    values: 0.111
    values: 0.77
    values: 0.505
    values: 0.847
    values: 0.468
    values: 0.086
    values: 0.127
    values: 0.775
    values: 0.758
    values: 0.423
    values: 0.442
    values: 0.721
    values: 0.181
    values: 0.733
    values: 0.308
    values: 0.705
    values: 0.147
    values: 0.42
    values: 0.148
    values: 0.576
    values: 0.048
    values: 0.018
    values: 0.225
    values: 0.231
    values: 0.942
    values: 0.196
    values: 0.968
    values: 0.515
    values: 0.856
    values: 0.461
    values: 0.935
    values: 0.92
    values: 0.574
    values: 0.693
    values: 0.87
    values: 0.36
    values: 0.533
    values: 0.749
    values: 0.908
    values: 0.019
    values: 0.796
    values: 0.462
    values: 0.603
    values: 0.81
    values: 0.076
    values: 0.612
    values: 0.542
    values: 0.08
    values: 0.859
    values: 0.218
    values: 0.127
    values: 0.998
    values: 0.824
    values: 0.712
    values: 0.216
    values: 0.788
    values: 0.327
    values: 0.786
    values: 0.651
    values: 0.329
    values: 0.413
    values: 0.071
    values: 0.444
    values: 0.005
    values: 0.89
    values: 0.152
    values: 0.186
    values: 0.359
    values: 0.527
    values: 0.202
    values: 0.308
    values: 0.161
    values: 0.642
    values: 0.272
    values: 0.662
    values: 0.075
    values: 0.948
    values: 0.104
    values: 0.949
    values: 0.613
    values: 0.231
    values: 0.342
    values: 0.011
    values: 0.664
    values: 0.792
    values: 0.939
    values: 0.659
    values: 0.023
    values: 0.498
    values: 0.154
    values: 0.318
    values: 0.973
    values: 0.822
    values: 0.828
    values: 0.118
    values: 0.602
    values: 0.712
    values: 0.076
    values: 0.178
    values: 0.311
    values: 0.747
    values: 0.116
    values: 0.11
    values: 0.633
    values: 0.38
    values: 0.153
    values: 0.202
    values: 0.522
    values: 0.632
    values: 0.602
    values: 0.205
    values: 0.288
    values: 0.878
    values: 0.948
    values: 0.745
    values: 0.019
    values: 0.542
    values: 0.531
    values: 0.611
    values: 0.188
    values: 0.416
    values: 0.861
    values: 0.329
    values: 0.438
    values: 0.434
    values: 0.983
    values: 0.065
    values: 0.496
    values: 0.657
    values: 0.142
    values: 0.181
    values: 0.685
    values: 0.635
    values: 0.767
    values: 0.336
    values: 0.914
    values: 0.135
    values: 0.99
    values: 0.34
    values: 0.101
    values: 0.138
    values: 0.905
    values: 0.056
    values: 0.487
    values: 0.627
    values: 0.109
    values: 0.06
    values: 0.089
    values: 0.761
    values: 0.043
    values: 0.229
    values: 0.253
    values: 0.379
    values: 0.541
    values: 0.756
    values: 0.654
    values: 0.654
    values: 0.83
    values: 0.598
    values: 0.349
    values: 0.689
    values: 0.606
    values: 0.335
    values: 0.139
    values: 0.67
    values: 0.641
    values: 0.907
    values: 0.563
    values: 0.188
    values: 0.43
    values: 0.412
    values: 0.635
    values: 0.051
    values: 0.445
    values: 0.086
    values: 0.157
    values: 0.482
    values: 0.699
    values: 0.805
    values: 0.849
    values: 0.812
    values: 0.381
    values: 0.459
    values: 0.974
    values: 0.257
    values: 0.879
    values: 0.42
    values: 0.008
    values: 0.931
    values: 0.028
    values: 0.968
    values: 0.891
    values: 0.408
    values: 0.253
    values: 0.174
    values: 0.608
    values: 0.847
    values: 0.908
    values: 0.488
    values: 0.287
    values: 0.656
    values: 0.013
    values: 0.377
    values: 0.638
    values: 0.851
    values: 0.631
    values: 0.726
    values: 0.528
    values: 0.405
    values: 0.315
    values: 0.629
    values: 0.812
    values: 0.734
    values: 0.01
    values: 0.417
    values: 0.731
    values: 0.615
    values: 0.384
    values: 0.902
    values: 0.16
    values: 0.703
    values: 0.24
    values: 0.493
    values: 0.899
    values: 0.047
    values: 0.41
    values: 0.576
    values: 0.581
    values: 0.425
    values: 0.483
    values: 0.592
    values: 0.817
    values: 0.675
    values: 0.49
    values: 0.033
    values: 0.672
    values: 0.638
    values: 0.173
    values: 0.504
    values: 0.829
    values: 0.445
    values: 0.369
    values: 0.54
    values: 0.146
    values: 0.332
    values: 0.716
    values: 0.485
    values: 0.741
    values: 0.427
    values: 0.607
    values: 0.437
    values: 0.082
    values: 0.302
    values: 0.177
    values: 0.22
    values: 0.795
    values: 0.129
    values: 0.834
    values: 0.905
    values: 0.04
    values: 0.193
  }
}

Response:
data {
  names: "t:0"
  names: "t:1"
  names: "t:2"
  names: "t:3"
  names: "t:4"
  names: "t:5"
  names: "t:6"
  names: "t:7"
  names: "t:8"
  names: "t:9"
  tensor {
    shape: 1
    shape: 10
    values: 0.016527308151125908
    values: 0.03343753144145012
    values: 0.13515257835388184
    values: 0.2837943434715271
    values: 0.046536825597286224
    values: 0.04741676151752472
    values: 0.015463653951883316
    values: 0.01107808854430914
    values: 0.37488991022109985
    values: 0.03570308908820152
  }
}


[9]:
!docker rm nodejs_mnist_predictor --force
nodejs_mnist_predictor

Test using Minikube

Due to a `minikube/s2i issue <https://github.com/SeldonIO/seldon-core/issues/253>`__ you will need `s2i >= 1.1.13 <https://github.com/openshift/source-to-image/releases/tag/v1.1.13>`__

[10]:
!minikube start --memory 4096
😄  minikube v0.34.1 on linux (amd64)
🔥  Creating virtualbox VM (CPUs=2, Memory=4096MB, Disk=20000MB) ...
📶  "minikube" IP address is 192.168.99.100
🐳  Configuring Docker as the container runtime ...
✨  Preparing Kubernetes environment ...
🚜  Pulling images required by Kubernetes v1.13.3 ...
🚀  Launching Kubernetes v1.13.3 using kubeadm ...
🔑  Configuring cluster permissions ...
🤔  Verifying component health .....
💗  kubectl is now configured to use "minikube"
🏄  Done! Thank you for using minikube!
[11]:
!kubectl create clusterrolebinding kube-system-cluster-admin --clusterrole=cluster-admin --serviceaccount=kube-system:default
clusterrolebinding.rbac.authorization.k8s.io/kube-system-cluster-admin created
[12]:
!helm init
$HELM_HOME has been configured at /home/clive/.helm.

Tiller (the Helm server-side component) has been installed into your Kubernetes Cluster.

Please note: by default, Tiller is deployed with an insecure 'allow unauthenticated users' policy.
To prevent this, run `helm init` with the --tiller-tls-verify flag.
For more information on securing your installation see: https://docs.helm.sh/using_helm/#securing-your-helm-installation
Happy Helming!
[13]:
!kubectl rollout status deploy/tiller-deploy -n kube-system
Waiting for deployment "tiller-deploy" rollout to finish: 0 of 1 updated replicas are available...
deployment "tiller-deploy" successfully rolled out
[6]:
!helm install ../../../helm-charts/seldon-core-operator --name seldon-core --set usageMetrics.enabled=true --namespace seldon-system
NAME:   seldon-core
LAST DEPLOYED: Tue Apr 16 15:29:41 2019
NAMESPACE: seldon-system
STATUS: DEPLOYED

RESOURCES:
==> v1/ClusterRoleBinding
NAME                                 AGE
seldon-operator-manager-rolebinding  1s

==> v1/Service
NAME                                        TYPE       CLUSTER-IP      EXTERNAL-IP  PORT(S)  AGE
seldon-operator-controller-manager-service  ClusterIP  10.107.173.100  <none>       443/TCP  1s

==> v1beta1/Deployment
NAME                        DESIRED  CURRENT  UP-TO-DATE  AVAILABLE  AGE
seldon-spartakus-volunteer  1        0        0           0          1s

==> v1beta1/ClusterRole
NAME                        AGE
seldon-spartakus-volunteer  1s

==> v1beta1/ClusterRoleBinding
NAME                        AGE
seldon-spartakus-volunteer  1s

==> v1/Secret
NAME                                   TYPE    DATA  AGE
seldon-operator-webhook-server-secret  Opaque  0     1s

==> v1/ConfigMap
NAME                     DATA  AGE
seldon-spartakus-config  3     1s

==> v1beta1/CustomResourceDefinition
NAME                                         AGE
seldondeployments.machinelearning.seldon.io  1s

==> v1/Pod(related)
NAME                                  READY  STATUS             RESTARTS  AGE
seldon-operator-controller-manager-0  0/1    ContainerCreating  0         1s

==> v1/ClusterRole
NAME                          AGE
seldon-operator-manager-role  1s

==> v1/StatefulSet
NAME                                DESIRED  CURRENT  AGE
seldon-operator-controller-manager  1        1        1s

==> v1/ServiceAccount
NAME                        SECRETS  AGE
seldon-spartakus-volunteer  1        1s


NOTES:
NOTES: TODO


[7]:
!kubectl rollout status statefulset.apps/seldon-operator-controller-manager -n seldon-system
partitioned roll out complete: 1 new pods have been updated...

Setup Ingress

There are gRPC issues with the latest Ambassador, so we rewcommend 0.40.2 until these are fixed.

[8]:
!helm install stable/ambassador --name ambassador --set image.tag=0.40.2
NAME:   ambassador
LAST DEPLOYED: Tue Apr 16 15:30:27 2019
NAMESPACE: seldon
STATUS: DEPLOYED

RESOURCES:
==> v1/Pod(related)
NAME                         READY  STATUS             RESTARTS  AGE
ambassador-5b89d44544-b2snz  0/1    ContainerCreating  0         0s
ambassador-5b89d44544-ktd9h  0/1    ContainerCreating  0         0s
ambassador-5b89d44544-x8tcg  0/1    ContainerCreating  0         0s

==> v1/ServiceAccount
NAME        SECRETS  AGE
ambassador  1        0s

==> v1beta1/ClusterRole
NAME        AGE
ambassador  0s

==> v1beta1/ClusterRoleBinding
NAME        AGE
ambassador  0s

==> v1/Service
NAME               TYPE          CLUSTER-IP     EXTERNAL-IP  PORT(S)                     AGE
ambassador-admins  ClusterIP     10.98.139.122  <none>       8877/TCP                    0s
ambassador         LoadBalancer  10.98.135.113  <pending>    80:31109/TCP,443:30421/TCP  0s

==> v1/Deployment
NAME        DESIRED  CURRENT  UP-TO-DATE  AVAILABLE  AGE
ambassador  3        3        3           0          0s


NOTES:
Congratuations! You've successfully installed Ambassador.

For help, visit our Slack at https://d6e.co/slack or view the documentation online at https://www.getambassador.io.

To get the IP address of Ambassador, run the following commands:
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
     You can watch the status of by running 'kubectl get svc -w  --namespace seldon ambassador'

  On GKE/Azure:
  export SERVICE_IP=$(kubectl get svc --namespace seldon ambassador -o jsonpath='{.status.loadBalancer.ingress[0].ip}')

  On AWS:
  export SERVICE_IP=$(kubectl get svc --namespace seldon ambassador -o jsonpath='{.status.loadBalancer.ingress[0].hostname}')

  echo http://$SERVICE_IP:

[9]:
!kubectl rollout status deployment.apps/ambassador
Waiting for deployment "ambassador" rollout to finish: 0 of 3 updated replicas are available...
Waiting for deployment "ambassador" rollout to finish: 1 of 3 updated replicas are available...
Waiting for deployment "ambassador" rollout to finish: 2 of 3 updated replicas are available...
deployment "ambassador" successfully rolled out
[10]:
!eval $(minikube docker-env) && s2i build . seldonio/seldon-core-s2i-nodejs:0.2-SNAPSHOT node-s2i-mnist-model:0.1
---> Installing application source...
---> Installing dependencies ...

> @tensorflow/[email protected] install /microservice/model/node_modules/@tensorflow/tfjs-node
> node scripts/install.js

* Downloading libtensorflow

* Building TensorFlow Node.js bindings

> [email protected] postinstall /microservice/model/node_modules/protobufjs
> node scripts/postinstall

npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN [email protected] No repository field.
npm WARN [email protected] No license field.

added 50 packages from 58 contributors and audited 64 packages in 15.755s
found 0 vulnerabilities

Build completed successfully
[12]:
!kubectl create -f nodejs_mnist_deployment.json
seldondeployment.machinelearning.seldon.io/seldon-deployment-example created
[13]:
!kubectl rollout status deploy/nodejs-mnist-deployment-nodejs-mnist-predictor-5aa9edd
Waiting for deployment "nodejs-mnist-deployment-nodejs-mnist-predictor-5aa9edd" rollout to finish: 0 of 1 updated replicas are available...
deployment "nodejs-mnist-deployment-nodejs-mnist-predictor-5aa9edd" successfully rolled out
[14]:
!seldon-core-api-tester contract.json `minikube ip` `kubectl get svc ambassador -o jsonpath='{.spec.ports[0].nodePort}'` \
    seldon-deployment-example --namespace seldon -p
----------------------------------------
SENDING NEW REQUEST:

[[[[0.743]
   [0.335]
   [0.726]
   [0.051]
   [0.954]
   [0.716]
   [0.094]
   [0.447]
   [0.524]
   [0.431]
   [0.749]
   [0.034]
   [0.607]
   [0.342]
   [0.035]
   [0.744]
   [0.838]
   [0.29 ]
   [0.311]
   [0.091]
   [0.177]
   [0.049]
   [0.43 ]
   [0.469]
   [0.766]
   [0.137]
   [0.517]
   [0.814]]

  [[0.066]
   [0.168]
   [0.69 ]
   [0.733]
   [0.658]
   [0.838]
   [0.867]
   [0.485]
   [0.093]
   [0.405]
   [0.809]
   [0.592]
   [0.574]
   [0.449]
   [0.776]
   [0.988]
   [0.428]
   [0.912]
   [0.351]
   [0.406]
   [0.919]
   [0.832]
   [0.639]
   [0.342]
   [0.778]
   [0.31 ]
   [0.476]
   [0.828]]

  [[0.99 ]
   [0.076]
   [0.238]
   [0.941]
   [0.442]
   [0.998]
   [0.591]
   [0.486]
   [0.631]
   [0.312]
   [0.679]
   [0.214]
   [0.79 ]
   [0.207]
   [0.965]
   [0.912]
   [0.247]
   [0.851]
   [0.761]
   [0.833]
   [0.875]
   [0.284]
   [0.352]
   [0.884]
   [0.517]
   [0.547]
   [0.487]
   [0.13 ]]

  [[0.395]
   [0.259]
   [0.773]
   [0.935]
   [0.686]
   [0.526]
   [0.319]
   [0.254]
   [0.771]
   [0.428]
   [0.621]
   [0.546]
   [0.167]
   [0.678]
   [0.364]
   [0.173]
   [0.834]
   [0.298]
   [0.069]
   [0.427]
   [0.98 ]
   [0.53 ]
   [0.422]
   [0.303]
   [0.828]
   [0.857]
   [0.258]
   [0.837]]

  [[0.204]
   [0.755]
   [0.256]
   [0.964]
   [0.774]
   [0.533]
   [0.692]
   [0.152]
   [0.491]
   [0.913]
   [0.161]
   [0.909]
   [0.278]
   [0.436]
   [0.642]
   [0.598]
   [0.094]
   [0.39 ]
   [0.706]
   [0.882]
   [0.906]
   [0.402]
   [0.653]
   [0.792]
   [0.458]
   [0.106]
   [0.601]
   [0.867]]

  [[0.548]
   [0.711]
   [0.079]
   [0.998]
   [0.812]
   [0.547]
   [0.582]
   [0.086]
   [0.336]
   [0.223]
   [0.037]
   [0.945]
   [0.816]
   [0.354]
   [0.991]
   [0.817]
   [0.41 ]
   [0.591]
   [0.138]
   [0.485]
   [0.348]
   [0.503]
   [0.626]
   [0.037]
   [0.862]
   [0.258]
   [0.128]
   [0.828]]

  [[0.483]
   [0.789]
   [0.076]
   [0.618]
   [0.162]
   [0.201]
   [0.927]
   [0.436]
   [0.609]
   [0.123]
   [0.599]
   [0.038]
   [0.836]
   [0.506]
   [0.727]
   [0.783]
   [0.522]
   [0.925]
   [0.628]
   [0.938]
   [0.388]
   [0.07 ]
   [0.262]
   [0.163]
   [0.295]
   [0.632]
   [0.331]
   [0.129]]

  [[0.704]
   [0.126]
   [0.011]
   [0.974]
   [0.22 ]
   [0.693]
   [0.798]
   [0.579]
   [0.074]
   [0.76 ]
   [0.482]
   [0.651]
   [0.85 ]
   [0.972]
   [0.911]
   [0.297]
   [0.036]
   [0.71 ]
   [0.854]
   [0.489]
   [0.211]
   [0.778]
   [0.374]
   [0.454]
   [0.717]
   [0.142]
   [0.378]
   [0.087]]

  [[0.487]
   [0.761]
   [0.703]
   [0.202]
   [0.948]
   [0.699]
   [0.946]
   [0.444]
   [0.229]
   [0.612]
   [0.659]
   [0.45 ]
   [0.554]
   [0.13 ]
   [0.97 ]
   [0.215]
   [0.519]
   [0.627]
   [0.519]
   [0.948]
   [0.212]
   [0.087]
   [0.704]
   [0.853]
   [0.931]
   [0.484]
   [0.218]
   [0.998]]

  [[0.376]
   [0.14 ]
   [0.053]
   [0.322]
   [0.542]
   [0.357]
   [0.858]
   [0.903]
   [0.292]
   [0.812]
   [0.436]
   [0.049]
   [0.629]
   [0.679]
   [0.968]
   [0.974]
   [0.842]
   [0.936]
   [0.855]
   [0.371]
   [0.808]
   [0.243]
   [0.355]
   [0.221]
   [0.141]
   [0.972]
   [0.104]
   [0.729]]

  [[0.843]
   [0.73 ]
   [0.963]
   [0.455]
   [0.357]
   [0.34 ]
   [0.251]
   [0.939]
   [0.118]
   [0.237]
   [0.926]
   [0.853]
   [0.832]
   [0.59 ]
   [0.132]
   [0.55 ]
   [0.792]
   [0.974]
   [0.025]
   [0.417]
   [0.517]
   [0.083]
   [0.152]
   [0.01 ]
   [0.782]
   [0.036]
   [0.022]
   [0.244]]

  [[0.207]
   [0.481]
   [0.655]
   [0.173]
   [0.721]
   [0.283]
   [0.163]
   [0.418]
   [0.402]
   [0.006]
   [0.974]
   [0.953]
   [0.989]
   [0.952]
   [0.895]
   [0.112]
   [0.886]
   [0.226]
   [0.394]
   [0.566]
   [0.728]
   [0.959]
   [0.452]
   [0.296]
   [0.662]
   [0.372]
   [0.872]
   [0.443]]

  [[0.579]
   [0.698]
   [0.936]
   [0.521]
   [0.126]
   [0.216]
   [0.36 ]
   [0.208]
   [0.709]
   [0.747]
   [0.178]
   [0.201]
   [0.875]
   [0.518]
   [0.173]
   [0.453]
   [0.293]
   [0.571]
   [0.448]
   [0.16 ]
   [0.096]
   [0.572]
   [0.837]
   [0.276]
   [0.597]
   [0.151]
   [0.56 ]
   [0.653]]

  [[0.905]
   [0.3  ]
   [0.38 ]
   [0.8  ]
   [0.475]
   [0.52 ]
   [0.982]
   [0.077]
   [0.691]
   [0.204]
   [0.931]
   [0.573]
   [0.875]
   [0.084]
   [0.112]
   [0.312]
   [0.422]
   [0.393]
   [0.98 ]
   [0.145]
   [0.734]
   [0.21 ]
   [0.741]
   [0.666]
   [0.925]
   [0.987]
   [0.583]
   [0.84 ]]

  [[0.036]
   [0.916]
   [0.312]
   [0.495]
   [0.701]
   [0.547]
   [0.483]
   [0.231]
   [0.218]
   [0.912]
   [0.561]
   [0.881]
   [0.039]
   [0.969]
   [0.147]
   [0.615]
   [0.582]
   [0.554]
   [0.715]
   [0.607]
   [0.972]
   [0.898]
   [0.923]
   [0.08 ]
   [0.511]
   [0.111]
   [0.446]
   [0.984]]

  [[0.646]
   [0.753]
   [0.474]
   [0.689]
   [0.697]
   [0.093]
   [0.372]
   [0.584]
   [0.55 ]
   [0.768]
   [0.964]
   [0.414]
   [0.129]
   [0.021]
   [0.635]
   [0.766]
   [0.588]
   [0.454]
   [0.927]
   [0.898]
   [0.613]
   [0.992]
   [0.736]
   [0.888]
   [0.329]
   [0.931]
   [0.043]
   [0.12 ]]

  [[0.514]
   [0.151]
   [0.128]
   [0.178]
   [0.809]
   [0.338]
   [0.104]
   [0.454]
   [0.523]
   [0.391]
   [0.005]
   [0.045]
   [0.837]
   [0.023]
   [0.483]
   [0.148]
   [0.13 ]
   [0.457]
   [0.517]
   [0.344]
   [0.94 ]
   [0.461]
   [0.98 ]
   [0.368]
   [0.453]
   [0.71 ]
   [0.65 ]
   [0.838]]

  [[0.691]
   [0.838]
   [0.411]
   [0.18 ]
   [0.769]
   [0.928]
   [0.898]
   [0.237]
   [0.134]
   [0.892]
   [0.428]
   [0.977]
   [0.295]
   [0.917]
   [0.374]
   [0.494]
   [0.913]
   [0.889]
   [0.635]
   [0.633]
   [0.452]
   [0.76 ]
   [0.809]
   [0.593]
   [0.001]
   [0.708]
   [0.546]
   [0.826]]

  [[0.011]
   [0.106]
   [0.125]
   [0.169]
   [0.569]
   [0.88 ]
   [0.078]
   [0.221]
   [0.43 ]
   [0.703]
   [0.172]
   [0.228]
   [0.33 ]
   [0.829]
   [0.798]
   [0.759]
   [0.124]
   [0.137]
   [0.222]
   [0.547]
   [0.112]
   [0.304]
   [0.074]
   [0.344]
   [0.786]
   [0.569]
   [0.288]
   [0.192]]

  [[0.205]
   [0.676]
   [0.823]
   [0.66 ]
   [0.019]
   [0.135]
   [0.962]
   [0.68 ]
   [0.19 ]
   [0.238]
   [0.403]
   [0.228]
   [0.98 ]
   [0.419]
   [0.307]
   [0.726]
   [0.634]
   [0.732]
   [0.45 ]
   [0.757]
   [0.53 ]
   [0.869]
   [0.283]
   [0.143]
   [0.805]
   [0.232]
   [0.525]
   [0.55 ]]

  [[0.712]
   [0.512]
   [0.908]
   [0.655]
   [0.136]
   [0.133]
   [0.403]
   [0.518]
   [0.172]
   [0.984]
   [0.776]
   [0.06 ]
   [0.784]
   [0.46 ]
   [0.281]
   [0.698]
   [0.209]
   [0.862]
   [0.37 ]
   [0.98 ]
   [0.328]
   [0.195]
   [0.786]
   [0.222]
   [0.741]
   [0.524]
   [0.297]
   [0.021]]

  [[0.923]
   [0.54 ]
   [0.257]
   [0.1  ]
   [0.793]
   [0.992]
   [0.106]
   [0.435]
   [0.094]
   [0.53 ]
   [0.457]
   [0.15 ]
   [0.284]
   [0.019]
   [0.811]
   [0.835]
   [0.422]
   [0.112]
   [0.16 ]
   [0.314]
   [0.581]
   [0.238]
   [0.136]
   [0.118]
   [0.069]
   [0.826]
   [0.779]
   [0.35 ]]

  [[0.709]
   [0.162]
   [0.412]
   [0.893]
   [0.03 ]
   [0.818]
   [0.195]
   [0.523]
   [0.547]
   [0.168]
   [0.718]
   [0.294]
   [0.507]
   [0.405]
   [0.36 ]
   [0.483]
   [0.06 ]
   [0.9  ]
   [0.276]
   [0.877]
   [0.363]
   [0.197]
   [0.063]
   [0.076]
   [0.759]
   [0.427]
   [0.339]
   [0.942]]

  [[0.058]
   [0.93 ]
   [0.589]
   [0.873]
   [0.165]
   [0.784]
   [0.552]
   [0.648]
   [0.491]
   [0.291]
   [0.39 ]
   [0.966]
   [0.967]
   [0.652]
   [0.982]
   [0.474]
   [0.703]
   [0.869]
   [0.799]
   [0.102]
   [0.267]
   [0.106]
   [0.188]
   [0.568]
   [0.474]
   [0.69 ]
   [0.156]
   [0.855]]

  [[0.551]
   [0.414]
   [0.006]
   [0.677]
   [0.719]
   [0.958]
   [0.964]
   [0.422]
   [0.179]
   [0.798]
   [0.358]
   [0.966]
   [0.774]
   [0.519]
   [0.067]
   [0.717]
   [0.188]
   [0.587]
   [0.268]
   [0.804]
   [0.918]
   [0.818]
   [0.887]
   [0.377]
   [0.863]
   [0.882]
   [0.547]
   [0.455]]

  [[0.278]
   [0.23 ]
   [0.245]
   [0.029]
   [0.697]
   [0.623]
   [0.41 ]
   [0.385]
   [0.595]
   [0.043]
   [0.372]
   [0.076]
   [0.085]
   [0.565]
   [0.946]
   [0.461]
   [0.193]
   [0.138]
   [0.259]
   [0.042]
   [0.706]
   [0.087]
   [0.662]
   [0.76 ]
   [0.28 ]
   [0.827]
   [0.121]
   [0.903]]

  [[0.599]
   [0.265]
   [0.632]
   [0.924]
   [0.739]
   [0.816]
   [0.374]
   [0.822]
   [0.672]
   [0.349]
   [0.245]
   [0.071]
   [0.799]
   [0.73 ]
   [0.342]
   [0.196]
   [0.749]
   [0.987]
   [0.419]
   [0.667]
   [0.28 ]
   [0.526]
   [0.298]
   [0.241]
   [0.071]
   [0.544]
   [0.079]
   [0.126]]

  [[0.376]
   [0.599]
   [0.283]
   [0.94 ]
   [0.4  ]
   [0.318]
   [0.721]
   [0.594]
   [0.869]
   [0.025]
   [0.107]
   [0.626]
   [0.89 ]
   [0.792]
   [0.22 ]
   [0.33 ]
   [0.188]
   [0.651]
   [0.657]
   [0.991]
   [0.355]
   [0.854]
   [0.107]
   [0.802]
   [0.594]
   [0.125]
   [0.197]
   [0.995]]]]
RECEIVED RESPONSE:
meta {
  puid: "joula4u5bus83nk1jklaqsje4t"
  requestPath {
    key: "nodejs-mnist-classifier"
    value: "node-s2i-mnist-model:0.1"
  }
}
data {
  names: "t:0"
  names: "t:1"
  names: "t:2"
  names: "t:3"
  names: "t:4"
  names: "t:5"
  names: "t:6"
  names: "t:7"
  names: "t:8"
  names: "t:9"
  ndarray {
    values {
      list_value {
        values {
          number_value: 0.06535089015960693
        }
        values {
          number_value: 0.055538177490234375
        }
        values {
          number_value: 0.14983375370502472
        }
        values {
          number_value: 0.1822187453508377
        }
        values {
          number_value: 0.09671169519424438
        }
        values {
          number_value: 0.03943844884634018
        }
        values {
          number_value: 0.0619128979742527
        }
        values {
          number_value: 0.13100355863571167
        }
        values {
          number_value: 0.18306931853294373
        }
        values {
          number_value: 0.03492257371544838
        }
      }
    }
  }
}


[20]:
!minikube delete
🔥  Deleting "minikube" from virtualbox ...
💔  The "minikube" cluster has been deleted.
[ ]: