More Related Content Similar to Developing with Docker for the Arm Architecture (20) More from Docker, Inc. (20) Developing with Docker for the Arm Architecture1. © 2019 Arm Limited
Developing with Docker
for the Arm Architecture
Jason Andrews
jason.andrews@arm.com
November 5, 2019
2. 2 © 2019 Arm Limited
Docker Desktop - Any Device, Any Architecture
2
Build and Run both x86 and Arm images using Docker
Desktop on x86 Mac and Windows Developer Machines
3. 3 © 2019 Arm Limited
Windows 10
Docker
Desktop
Hyper-V
arm/v6
x86
macOS
HyperKit
QEMUDocker Engine
arm/v7 arm64
Managed
by
Docker
Desktop
Application
Code
x86_64
Docker Desktop Architecture
4. 4 © 2019 Arm Limited
Docker Edge/IoT Developer Kits
Embedded developers become cloud native in minutes
• Application templates take care of local & cloud
provisioning
• Device setup and app runtime uses Secure Engine
• App deployment trigger Desktop & Pipelines; scan & sign
with DTR; deploy to devices
2. Inner Loop - Emulation
environment
1. Embedded
developer loop
3. Native build on
remote server
4. CI/CD pipeline
Docker
Desktop Enterprise
Docker
Trusted Registry
6. 6 © 2019 Arm Limited
Brief History of SW Development & Deployment
Embedded engineer perspectiveDevelopDeploy
1950s 1990s 2010s
Punch a lot of holes in a
lot of cards
Set ROM/Flash in
custom assembly line
Pull app from cloud, run
Cloud-based
Embedded software development practices
are stuck in the 1990s.
Cross-compile, copy,
ssh/scp, run
Punch holes in cards
Future embedded
development
7. 7 © 2019 Arm Limited
Alternatives for embedded software development
Docker improves on cross-compilation and target-compilation
Embedded software development options
Docker Cross-compile Target Build
Complexity Consistent environment Different environment leads to more
porting struggles (especially around
library dependencies)
Same environment
At scale
deployment
Simple, must setup docker
on each target
Medium, must reconfigure each
target environment
Generally slower compile time due
to target performance
Build time Medium…host PC with
QEMU, Good using remote
Arm build farm
Quickest, host PC speeds Very slow, must reconfigure
environment and app on each
8. 8 © 2019 Arm Limited
Docker: Where is it tomorrow?
Develop on Arm, for Arm
Docker enables an easy
transition to Arm servers
which can be used for
software development
AWS A1
Simply develop and deploy
Manage multi-architecture
IoT network development
and deployment with Docker,
from factories to hotels
Rich IoT • This
• That
• The other thing
Easily compile and deploy
Traditional Arm compilation
requires 20+ steps and many
3rd-party packages, requiring
expert-level knowledge
Edge ML • This
• That
• The other thing
Increase big-data
performance
Docker simplifies deployment
of ‘computational storage’
applications, drastically
increasing processing
Smart SSD
9. 9 © 2019 Arm Limited
Amazon EC2 A1 instances
Powered by Arm-based processors
Up to 45% lowercostforscale-outworkloads1
Powered byAWSGraviton Processorsthatfeature 64-bit
Arm Neoverse coresand custom silicon designed byAWS2
Amazon Linux2, Red HatEnterprise Linux7.6, Ubuntu
16.04 LTS & 18.04 LTS, and SUSELinuxEnterprise Serverfor
Arm 15 available now
3
Targetworkloadsinclude Web servers, containerized
microservices, caching fleets, distributed data stores, as
well asdevelopment/testenvironments
4
10. 10 © 2019 Arm Limited
Raspberry Pi 4
Arm development board to run Docker
Board information
A 1.5GHz quad-core 64-bit ARM Cortex-A72 CPU
1GB, 2GB, or 4GB of LPDDR4 SDRAM
Full-throughput Gigabit Ethernet
Dual-band 802.11ac wireless networking
Bluetooth 5.0 and USB 3.0
Dual monitor support, at resolutions up to 4K
Complete compatibility with earlier Raspberry Pi
products
The picture can't be displayed.
11. 11 © 2019 Arm Limited
Meetup goals
Targeting Linux application development with C/C++
• Multi-architecture images using docker buildx
• Local development on Windows and Mac
• Using remote build and run on AWS A1 and Raspberry Pi
• Docker templates to automate developer setup
12. 12 © 2019 Arm Limited
Meetup applications
Two primary exercises
• PART 1: warm up application using a hello world C program
• Docker buildx for multi-architecture images
• Docker Hub
• Easy application migration across laptop, AWS A1, and Raspberry Pi
• PART 2: Arm NN machine learning SDK application
• More realistic software development on Arm using complex SDK
• Remote build with docker buildx
• Multiple docker images for base tools, Arm NN SDK, application development, and deployment
13. © 2019 Arm Limited
Hello World example
Jump to demo
14. 14 © 2019 Arm Limited
MNIST: the 'Hello World!’ of ML
http://yann.lecun.com/exdb/mnist/
Dataset format
• There are four files:
• Training set
contains 60.000
examples
• Testing set contains
10.000 examples
• Pixels represented
by values from 0
(white) to 255
(black), organized
row-wise.
ModelExample Dataset Neural network
New input Neural Network Model
TrainingInference
Prediction
”2”[96.0% confidence]
15. 15 © 2019 Arm Limited
Example Application with Arm NN and Arm Compute Library
MNIST application using Arm NN and Compute Library
1. C++ application to classify MNIST digits
• Using framework parsers provided by Arm NN
2. Arm NN to parse TensorFlow model
• The inference engine calls the Arm NN API
• Alternatively, directly calls the Compute Library
3. Compute Library running on Cortex-A
1
2
3
Compute Library
Application
TensorFlow
Arm NN
TF Parser
Cortex-A
CPUs
2
1
3
https://github.com/ARM-software/armnn
16. © 2019 Arm Limited
Machine Learning
example
Jump to demo
17. 17 © 2019 Arm Limited
Application templates
Available in Docker Desktop Enterprise
• Generate project
scaffolding
• Jumpstart new
developers
• Customized
templates for
each application
18. © 2019 Arm Limited
Docker templates
examples
Jump to demo
19. 19 © 2019 Arm Limited
#ArmAIoTDevSummit#ArmAIoTDevSummitwww.arm.com/aiot-dev-summit
Get $75 off with code ARMMBED
20. 20 © 2019 Arm Limited
Final notes
Links to more information
• Reach out if you are interested in doing more with Docker tools, we’ll setup time to
discuss with you and your team
• Trial licenses for Docker Desktop Enterprise are available to try application templates
• Contact Marc Meunier: marc.meunier@docker.com
• Additional articles and GitHub links: https://is.gd/Docker4Arm
• Arm TechCon 2019 workshop instructions: http://is.gd/techcon