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
410
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
江戸城 石垣めぐり
osonoi
0
12
秩父巡礼プラン
osonoi
0
42
大洗 1日旅行プラン
osonoi
0
63
osonoi-2026-July
osonoi
0
290
歴史を知って散歩に出かけましょう!パート2、伊能忠敬、間宮林蔵
osonoi
0
66
清和天皇から新田初代、義重まで
osonoi
0
57
織田信雄
osonoi
0
82
江東区名所パート1
osonoi
0
59
日本書紀を勉強しよう!
osonoi
0
98
Featured
See All Featured
How GitHub (no longer) Works
holman
316
150k
A Tale of Four Properties
chriscoyier
163
24k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
400
New Earth Scene 8
popppiees
3
2.5k
Information Architects: The Missing Link in Design Systems
soysaucechin
0
1.1k
Paper Plane (Part 1)
katiecoart
PRO
1
10k
How to Ace a Technical Interview
jacobian
281
24k
Building Adaptive Systems
keathley
44
3.2k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
890
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
230
The #1 spot is gone: here's how to win anyway
tamaranovitovic
3
1.1k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.6k
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にアクセすると、ス マートフォンでも結果を確認できます。 スマートフォンでは「ファイルの選択」ボタンでその場で撮った 写真も認識可能です。