Skip to main content
Recommended
PPTX
Jenkins x Kubernetesが簡単だと思ったら大変だった話
PPTX
AKS (k8s) Hands on Lab Contents
PDF
ぼうけんにでかけよう Kubernetes KEDA
PPTX
kubernetes初心者がKnative Lambda Runtime触ってみた(Kubernetes Novice Tokyo #13 発表資料)
PPTX
Virtual Kubelet and Virtual Node
PPTX
Azure Functions&Logic Appではじめるサーバレスアプリケーション開発 - 応用編 -
PDF
Google Container Engine (GKE) & Kubernetes のアーキテクチャ解説
PPTX
PDF
PDF
CFの便利機能を他の環境でも。Open Service Broker
PPTX
PDF
DevOps on Azure Kubernetes
PPTX
PDF
Webアプリ開発向け ゆるふわDocker使いが Cloud Naive開発に必要なetc.
PPTX
明日からはじめられる Docker + さくらvpsを使った開発環境構築
PPTX
PDF
Microsoft azureで実装するwebserviceondocker
PPTX
Private Azure Kubernetes Service cluster を触ってみよう♪
PDF
Cloud Foundry Container-to-Container Networking
PDF
Kubernetesの良さを活かして開発・運用!Cloud Native入門 / An introductory Cloud Native #osc19tk
PPTX
PPTX
Ceonnect(): 2018 Japan AKS (Yoshio Terada)
PDF
PPTX
Container x azure x kubernetes
PPTX
Cloud Foundry as Containerized Services - Cloud Foundry Days Tokyo 2016
PPTX
コンテナベースサーバーレスプラットフォーム「Knative」はServerlessなのか?
PPTX
Knative Lambda Runtimeを試してみた
PPTX
20220302_TechDojo_OpenShift_BootCamp_1章概要
PDF
VMware が考えるコンテナと Kubernetes の世界
PDF
Kubernetes on Alibaba Cloud
More Related Content
PPTX
Jenkins x Kubernetesが簡単だと思ったら大変だった話
PPTX
AKS (k8s) Hands on Lab Contents
PDF
ぼうけんにでかけよう Kubernetes KEDA
PPTX
kubernetes初心者がKnative Lambda Runtime触ってみた(Kubernetes Novice Tokyo #13 発表資料)
PPTX
Virtual Kubelet and Virtual Node
PPTX
Azure Functions&Logic Appではじめるサーバレスアプリケーション開発 - 応用編 -
PDF
Google Container Engine (GKE) & Kubernetes のアーキテクチャ解説
PPTX
What's hot
PDF
PDF
CFの便利機能を他の環境でも。Open Service Broker
PPTX
PDF
DevOps on Azure Kubernetes
PPTX
PDF
Webアプリ開発向け ゆるふわDocker使いが Cloud Naive開発に必要なetc.
PPTX
明日からはじめられる Docker + さくらvpsを使った開発環境構築
PPTX
PDF
Microsoft azureで実装するwebserviceondocker
PPTX
Private Azure Kubernetes Service cluster を触ってみよう♪
PDF
Cloud Foundry Container-to-Container Networking
PDF
Kubernetesの良さを活かして開発・運用!Cloud Native入門 / An introductory Cloud Native #osc19tk
PPTX
PPTX
Ceonnect(): 2018 Japan AKS (Yoshio Terada)
PDF
PPTX
Container x azure x kubernetes
PPTX
Cloud Foundry as Containerized Services - Cloud Foundry Days Tokyo 2016
PPTX
コンテナベースサーバーレスプラットフォーム「Knative」はServerlessなのか?
PPTX
Knative Lambda Runtimeを試してみた
PPTX
20220302_TechDojo_OpenShift_BootCamp_1章概要
Similar to Osc fukuoka xAI Meetup
PDF
VMware が考えるコンテナと Kubernetes の世界
PDF
Kubernetes on Alibaba Cloud
PPTX
Apache Spark on Kubernetes入門(Open Source Conference 2021 Online Hiroshima 発表資料)
PDF
PDF
[Japan Tech summit 2017] DEP 005
PDF
Architecting on Alibaba Cloud - Fundamentals - 2018
PDF
PPTX
OCP, Kubernetes ハイパースケールアーキテクチャ 導入の道のり - OpenStack最新情報セミナー(2016年7月)
PDF
NVIDIA_AI_Enterprise_for_Red_Hat_OpenShift.pdf
PDF
PDF
Azure IoT Edge で Custom Vision
PDF
2019-Nov-23 Pivotalのプロセスとプラットフォーム@DellTechnologies FORUM
PDF
20161027 hadoop summit Generating Recommendations at Amazon Scale with Apach...
PDF
A07_ビジネス イノベーションを強力に支援する Azure Red Hat OpenShift のススメ [Microsoft Japan Digita...
PPTX
PPTX
Deep Learning Lab - Microsoft Machine Learning meetup 2018/06/27 - 推論編
PDF
Infra: Kubernetes and GKE, Network
PDF
GCPで実現するクラウドネイティブアプリケーション
PDF
PDF
Edge から Cloud, Beginner から Professional までサポートする Azure AI プラットフォーム
More from ru pic
PPTX
PPTX
PPTX
PDF
PPTX
PDF
PDF
PDF
Bot Framework Composer Fukuazu
PDF
Dotnetcore30forwindesktop
PDF
Introducing microsoft learn
PDF
Cognitve Services × Azure Kinect DK
PDF
Cognitive Services Update
PDF
Cognitive Services使ってみませんか?
PDF
PDF
PDF
PDF
PDF
Visual studio live share & intellicode
PDF
PDF
Osc fukuoka xAI Meetup 1. Open Source x AI
2020-11-28
Open Source Conference
2020 Online/Fukuoka
Yuta Ishibashi & Tsukasa Kato
2. Profile
• Yuta Ishibashi / 石橋 裕太
• TOYOTA MOTOR KYUSHU, INC.
Future technology & Business DEV.
• xAI Meetup 主催
• https://rupic.hatenablog.com/
• https://www2.slideshare.net/rupic
3. Profile
• Tsukasa Kato / 加藤 司
• 日本ビジネスシステムズ株式会社
シニアエキスパート
• Microsoft MVP for Microsoft Azure
• https://tsukatoh.hatenablog.com/
• https://www.slideshare.net/tsukasakatou9
5. 8. 12. 17. 18. 19. Agenda
• Azure Cognitive Services
• Custom Vision
• Kubernetes
• Kubernetes-based Serverless
• KEDA
OpenSource x AI の実現方法を知っていただく
20. 21. • Microsoft が提供するAIサービス群。
• 開発者が直接的なAIやデータサイエンスのスキルや知識がな
くても利用できるAPI、SDKを提供。
• 現状サービスカタログとしては意思決定、視覚、音声、言語、
Web検索の5つに分類される
Cognitive Services
22. Cognitive Services
22
Decision Language Speech Vision Web Search
Bing SearchComputer Vision
Custom Vision
Face
Form Recognizer
Video Indexer
Speech to Text
Text to Speech
Speech Translation
Speaker Recognition
Immersive Reader
Language
Understanding
QnA Maker
Text Analytics
Translator Text
Anomaly Detector
Content Moderator
Personalizer
Metrics Advizor
↑
Marcketplace
から作成
23. 24. 25. • TensorFlow でエクスポートできるオプション
• TensorFlow
• TensorFlow Lite
• TensorFlow Lite Float16
• TensorFlow.js
• SavedModel
TensorFlow export
TensorFlow Download Files
• Cvexport.manifest
• Labels.txt
• Metadata_properties.json
• Model.pb
26. • Dockerfile でエクスポートできるオプション
• Linux
• Windows
• ARM (Raspberry Pi 3)
Dockerfile export
Dockerfile(Linux) Download Files
• app
• app.py
• cvexport.manifest
• labels.txt
• metadata_properties.json
• model.pb
• predict.py
• azureml
• README.txt
• score.py
• Dockerfile
• README.txt
27. Dockerfile
FROM python:3.7-slim
RUN pip install -U pip
RUN pip install --no-cache-dir numpy~=1.17.5 tensorflow~=2.0.2 flask~=1.1.2 pillow~=7.2.0
COPY app /app
# By default, we run manual image resizing to maintain parity with CVS webservice prediction results.
# If parity is not required, you can enable faster image resizing by uncommenting the following lines.
# RUN apt-get update && apt-get install -y --no-install-recommends libglib2.0-bin
# RUN pip install opencv-python-headless
# Expose the port
EXPOSE 80
# Set the working directory
WORKDIR /app
# Run the flask server for the endpoints
CMD python -u app.py
28. Docker Build
> docker build -t customvision .
[+] Building 4.3s (10/10) FINISHED
=> [internal] load .dockerignore 0.1s
=> => transferring context: 2B 0.0s
=> [internal] load build definition from Dockerfile 0.2s
=> => transferring dockerfile: 673B 0.1s
=> [internal] load metadata for docker.io/library/python:3.7-slim 3.5s
=> [internal] load build context 0.4s
=> => transferring context: 5.12MB 0.4s
=> [1/5] FROM docker.io/library/python:3.7-slim@sha256:ac0c17ada735be16aae9f4b91ba564a6566c 0.0s
=> CACHED [2/5] RUN pip install -U pip 0.0s
=> CACHED [3/5] RUN pip install --no-cache-dir numpy~=1.17.5 tensorflow~=2.0.2 flask~=1.1.2 0.0s
=> CACHED [4/5] COPY app /app 0.0s
=> CACHED [5/5] WORKDIR /app 0.0s
=> exporting to image 0.0s
=> => exporting layers 0.0s
=> => writing image sha256:0c4e8db0777165b012e0d54d549f19292bc5a2b94e8d55861b1f4eabf694d067 0.0s
=> => naming to docker.io/library/customvision 0.0s
29. 30. 31. 32. 33. 34. Horizontal Pod Autoscaler(HPA)
• Kubernetes クラスターのメトリック サーバーを使用して、
Podのリソースの需要をモニターし、 アプリケーションで
必要なリソースが増えるとその需要を満たすためにレプリ
ケーションコントローラー、デプロイ、レプリカセット内
のポッドの数を自動的にスケーリング
• また、リソースが不要になったときにスケールインできる
• Kubernetes 標準APIオブジェクトとコントローラとして実
装されている
35. 36. 37. 38. 39. 40. 41. 42. 43. KEDA
(Kubernetes-based Event Driven Autoscaling Component)
K8sでイベント駆動型の
Podレベルオートスケールを可能にするフレームワーク
• Red HatとMicrosoftのエンジニアリングチームのコラボ
レーションの結果として開始されたプロジェクト
• Kubernetesクラスターにインストールしてイベントベース
のコンテナースケーリングを有効にすることができるオープ
ンソースコンポーネントとして定義される
• CPUメトリックスとメモリを活用してコンテナをゼロからス
ケーリングし、Kubernetes機能を拡張する
44. 45. 46. KEDA
• Kubernetesのスケーリング「Horizontal pod autoscaler
(HPA)」はPodのCPUやメモリ消費量で調整される
• KEDAは非HTTPなイベントに連動してクラスターへのデプロ
イを自動スケールできる
• HPAなどのKubernetesコンポーネントとネイティブに統合
され、クラウドとエッジの両方で実行できる
• KEDAがZero Scale in/outを行い、他はHPAがScale in/out
する
• 様々なスケーラーが用意されており、今後も追加予定
47. 48. Scalers
• ActiveMQ Artemis
• Apache Kafka
• AWS CloudWatch
• AWS Kinesis Stream
• AWS SQS Queue
• Azure Bob Storage
• Azure Event Hubs
• Azure Log Analytics
• Azure Monitor
• Azure Service Bus
• Azure Storage Queue
• CPU
• Cron
• External
• External Push
• Google Cloud Platform
Pub/Sub
• Huawei Cloudeye
• IBM MQ
• Liiklus Topic
• Memory
• Metrics API
• MySQL
• NATS Streaming
• PostgreSQL
• Prometheus
• RabbitMQ Queue
• Redis Lists
• Redis Streams
49. 50. HelmでKEDAをデプロイ
1. Helm repoを追加
2. Helm repoをアップデート
3. KEDAのHelm chartをインストール
$ helm repo add kedacore https://kedacore.github.io/charts
$ helm repo update
$ kubectl create namespace keda
$ helm install keda kedacore/keda --namespace keda
51. 52. 53. Azure Functions Core Toolsのインストール
• Azure Functions Core Toolsをインストールすることで
Kubernetes上でAzure Functionsが利用可能となる
• 以前はスケールも自分での実装が必要だったが、KEDAを使
うことでスケールの実装が不要となった
• インストールするには以下のコマンドを投入する
※要作業端末へのAzure Functions Core Toolsインストール
$ func kubernetes install --namespace keda
54. 55. 56. DEMO Architecture
Azure Kubernetes Service
Nodes
Web Application
(Pod)
Custom Vision
(Pod)
Storage Account
BLOB
Model
download
Container build/Deploy Custom
Vision
Image upload Webhook
image recognition
Upload
Send slack
BLOB
trigger
BLOB URL
57. 58. • Azure Cognitive Services
• https://docs.microsoft.com/ja-jp/azure/cognitive-services/
• モバイルデバイスで使用するためにモデルをエクスポートする
• https://docs.microsoft.com/ja-jp/azure/cognitive-services/custom-
vision-service/export-your-model
• Custom Vision Serviceを使用してエッジで画像の分類を実行する
• https://docs.microsoft.com/ja-jp/azure/iot-edge/tutorial-deploy-
custom-vision
• KEDA
• https://keda.sh
• Azure Functions Core Tools
• https://docs.microsoft.com/ja-jp/azure/azure-functions/functions-
run-local?tabs=macos%2Ccsharp%2Cbash
参考URL
59.