ChatGPT and Beyond - Elevating DevOps Productivity
Nimbix execution steps and sample exercise
1. Steps to Run Jupyter Notebook
on Nimbix and Sample DL
Usecase
OpenPOWER Academia
2. Execution
Below are the steps to run jupyter notebook on IBM PowerAI over
nimbix cloud
Login to the nimbix platform https://platform.jarvice.com/
Click on Compute and Search for IBM PowerAI in the search box
3. Execution
Click on the IBM PowerAI, to get it expanded
Click on Launch Button and select the machine type as per the
requirement.
4. Execution
Click on Submit button to start the machine.
Click on the Blue area desktop to login to the machine, it will open up a
new browser.
5. Execution
Open Terminal Emulater for shell and type below command to activate
Tensorflow, you can activate any DL framework supported.
source /opt/DL/tensorflow/bin/tensorflow-activate
6. Execution
Once Tensorflow activated start Jupyter notebook by typing
ipython notebook, then click on new Notebook.
7. Execution
In order to persist data, Nimbix provides File Manager to store the data
even after VM shuts down, this data is available from VM root
directory under data folder
To start File Manager, click on compute and search for File Manager,
then open up “Nimbix File Manager” icon then start it as we did for
Power AI. Once started click on Connect to open it in new browser
Copy the data folder inside nibmix File Manager inside data folder.
9. Introduction
Objective is to do a Optical Character Recognition vis Deep learning approach
using Tensorflow
This Demo is the execution of the work done by Nicholas Smith
https://nicholastsmith.wordpress.com/2017/10/14/deep-learning-ocr-using-
tensorflow-and-python/@
https://github.com/tensorflow/models/tree/master/research/object_detection
This program generate set of 32K OCR images as training dataset then it trains the
models based in that dataset.
It also generates 256 Test images too for testing.
10. Execution Steps
Login to nimbix platform.
Launch PowerAI VM with minimal configuration available.
Connect the VM via putty client with host and credential displayed on VM start in
nimbix
This demo requires python 3.5 and Tensorflow 1.5, by default PowerAI VMs do
not provide this combination it still runs on python 2.7,we need to install setup
python 3.5 and Tensorflow 1.5 and will not use the DL framework provides by
Power AI by default
Follow this blog to make the above environment ready
https://developer.ibm.com/code/howtos/install-tensorflow-on-power
Once tensorflow got set up clone the repository
https://github.com/nicholastoddsmith/pythonml.git
Code uses the font Consolas.ttf for image generation which is not provided by
default in Unix for that clone the fonts https://github.com/kakkoyun/linux.files.git
in /home/nimbix/pythonml/DeepOCR
11. Execution Steps
Edit OCRGen.py with this path TF = ImageFont.truetype('linux.files/fonts/Consolas.ttf', 18)
Create Trn and Tst directory inside /home/nimbix/pythonml/DeepOCR.
Install below dependencies
sudo apt-get update
sudo apt-get install libatlas-base-dev
pip3 install scikit-image (Will take 15-20 mins)
pip3 install sklearn
pip3 install TFANN
Run python3 OCRGen.py, this will generate 32K Training Image and 256 Testing
images in Trn and Tst folders respectively.
There is a pretrained model already created inside TFModel we can use that for
our testing
To convert images from Tst directory execute python3 DeepOCR.py Tst/00000.png
This is will display the converted text on console.
Code is written with specific image dimension, we need to tweak this code to
make it generic.