Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
OpenShift on IBM DEMO site
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
osonoi
May 27, 2020
400
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
OpenShift on IBM DEMO site
osonoi
May 27, 2020
More Decks by osonoi
See All by osonoi
大洗 1日旅行プラン
osonoi
0
41
osonoi-2023-May
osonoi
0
40
歴史を知って散歩に出かけましょう!パート2、伊能忠敬、間宮林蔵
osonoi
0
56
清和天皇から新田初代、義重まで
osonoi
0
47
織田信雄
osonoi
0
70
江東区名所パート1
osonoi
0
47
日本書紀を勉強しよう!
osonoi
0
85
Auto AI を使ったらくらく機械学習
osonoi
0
170
Hack_the_TOYOTA_2021
osonoi
0
130
Featured
See All Featured
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.2k
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.5k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
190
Build your cross-platform service in a week with App Engine
jlugia
234
18k
Git: the NoSQL Database
bkeepers
PRO
432
67k
Darren the Foodie - Storyboard
khoart
PRO
3
3.4k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
350
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.1k
Designing Experiences People Love
moore
143
24k
Testing 201, or: Great Expectations
jmmastey
46
8.2k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
190
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
2k
Transcript
IBM DEMOサイトでの AI アプリのDeploy Yasushi Osonoi 2020/05/27
⼿順 1. デモサイトの準備 2. Visual Recognitionサービスの作成 3. アプリのDeploy
1.デモサイトの準備 こちらのサイトに登録をしてください。(無料) https://www.ibm.com/demos/
ログイン後下にスクロールして“Red Hat OpenShift on IBM Cloud”を選択
Launch Labを選択
右側のコマンド画⾯で操作できます。
OpenShiftへのログイン:下にスクロールし て”Launch the OpenShift web console”をクリック
右上の”Copy Login Command”をクリック
ログインコマンドをコピー
先ほどの画⾯でコマンドを貼り付け
2. Visual Recognitionサービスの作成 Visual Recognitionを新規に作成する⽅は次のページに進んでください。 既に以前に作成済みの⽅は、作成済みのものが使⽤できます。 作成済みの⽅は以下の⼿順を参照しVisual Recognitionの管理の画⾯を表⽰後、 http://ibm.biz/watson-service-screen 当資料「4.
Visual Recognitionサービスibm-credentials.env のダウンロード」まで進んでく ださい。 https://cloud.ibm.com/ にアクセスして、ダッシュボードを開きます。
2.1 上部のメニューにある「カタログ」をクリックします 次に左側のメニューから“サービス”を洗濯し
2.2 Visual Recognitionサービスの選択 1. 左側のメニューから「AI」をクリック 2. 下にスクロールして表⽰された「Visual Recognition」をクリック
• 地域の選択は「ダラス」、価格プランに「ライト」が選択されていることを確認して、 • 「作成」をクリック 2.3 Visual Recognitionサービスを作成する
2.4 Visual Recognitionサービスを作成確認、管理画⾯の表⽰ 左のメニューから「管理」をクリックして次に進 んでください。
2.5. Visual Recognitionサービス API鍵をコピー(クリップボードに)してください。
3.1. プロジェクトを作成する oc new-project watson-vr --display-name="watson-vr" -- description="Sample Watson Visual
Recognition Node.js app" ターミナルに下記コマンドを⼊⼒し、新しいアプリケーション⽤に新しいプ ロジェクトを作成します。 3. Openshift アプリの作成 出⼒例:
3.2. アプリケーションの作成 ターミナルに下記のコマンドを⼊⼒し、 githubのソースコードから、アプ リケーションを作成します。 oc new-app https://github.com/kyokonishito/watson-vr-node.git -e CLASSIFIER_ID=food
-e WATSON_VISION_COMBINED_APIKEY=<APIKEY> <APIKEY>に先ほどコピーしたAPI鍵を⼊れてくだ さい。<>は削除してください
3.2. アプリケーションの作成 出⼒例:
3.3 ビルドログを表⽰します oc logs -f bc/watson-vr-node ターミナルに下記のコマンドを⼊⼒しビルドログを表⽰し、 「 Push successful
」で終わるまで待ちます。 3.4 ロードバランサーのサービスを作成します oc expose dc watson-vr-node --port=3000 --type=LoadBalancer -- name=watson-vr-node-ingress ターミナルに下記のコマンドを⼊⼒し実⾏します。 (コマンドは1⾏です。コマンドは以下からコピペできます。 https://ibm.box.com/v/openshift-101-command)
3.5. ロードバランサーのサービスを公開します oc expose service watson-vr-node-ingress ターミナルに下記のコマンドを⼊⼒し実⾏します。 これで完了です!ターミナルに下記のコマンドを⼊⼒し実⾏し、その結果を 参照して、OpenShift で実⾏されているアプリケーションにアクセスでき
ます。 oc get route/watson-vr-node-ingress NAME HOST/PORT PATH SERVICES PORT TERMINATION WILDCARD watson-vr-node-ingress watson-vr-node-ingress-watson-vr.openshifttokyo17-0e3e0ef4c9c6d831e8aa6fe01f33bfc4-0002.jp- tok.containers.appdomain.cloud watson-vr-node-ingress 3000 None 以下のような出⼒があった場合は、 watson-vr-node-ingress-watson-vr.openshifttokyo17-0e3e0ef4c9c6d831e8aa6fe01f33bfc4-0002.jp- tok.containers.appdomain.cloud にブラウザでアクセスします。
3.6 ブラウザーでアプリケーションにアクセスします アプリケーションは表⽰できましたか? ボタンを押して動作確認してみましょう! 「ファイルの選択」から写真を選んだ後、各⻘ボタンをク リックして、Visual Recognitionの結果を確認します。 • Watsonで認識(Watson学習済みモデルを利⽤): •
Watsonが写真を認識した内容を表⽰します。 • Watsonで認識(カスタムモデルを利⽤): • IBM提供の⾷品に特化したカスタムモデルFoodで認識し たクラスを表⽰します。 ※スマートフォンでの確認 ⼀番下にQRコードが表⽰されているので、それをスマートフォン のカメラで読んでアプリケーションのURLにアクセすると、ス マートフォンでも結果を確認できます。 スマートフォンでは「ファイルの選択」ボタンでその場で撮った 写真も認識可能です。