Deep Learning AMI Developer Guide Deep Learning AMI Developer Guide
Total Page:16
File Type:pdf, Size:1020Kb
Deep Learning AMI Developer Guide Deep Learning AMI Developer Guide Deep Learning AMI: Developer Guide Copyright © Amazon Web Services, Inc. and/or its affiliates. All rights reserved. Amazon's trademarks and trade dress may not be used in connection with any product or service that is not Amazon's, in any manner that is likely to cause confusion among customers, or in any manner that disparages or discredits Amazon. All other trademarks not owned by Amazon are the property of their respective owners, who may or may not be affiliated with, connected to, or sponsored by Amazon. Deep Learning AMI Developer Guide Table of Contents What Is the AWS Deep Learning AMI? ................................................................................................... 1 About This Guide ....................................................................................................................... 1 Prerequisites .............................................................................................................................. 1 Example Uses ............................................................................................................................ 1 Features .................................................................................................................................... 2 Preinstalled Frameworks ..................................................................................................... 2 Preinstalled GPU Software .................................................................................................. 2 Elastic Inference Support .................................................................................................... 3 Model Serving and Visualization .......................................................................................... 2 Getting Started .................................................................................................................................. 4 How to Get Started with the DLAMI ............................................................................................. 4 DLAMI Selection ......................................................................................................................... 4 Conda ............................................................................................................................... 4 Base ................................................................................................................................. 6 CUDA ................................................................................................................................ 6 OS .................................................................................................................................... 7 AMI Options .............................................................................................................................. 8 Conda ............................................................................................................................... 8 Base ................................................................................................................................. 9 CUDA 10.2 ....................................................................................................................... 10 CUDA 10.1 ....................................................................................................................... 10 CUDA 10 ......................................................................................................................... 11 Ubuntu 18.04 .................................................................................................................. 11 Ubuntu 16.04 .................................................................................................................. 12 Amazon Linux .................................................................................................................. 13 Amazon Linux 2 ............................................................................................................... 14 Windows ......................................................................................................................... 15 Instance Selection .................................................................................................................... 15 Pricing ............................................................................................................................ 16 Region Availability ............................................................................................................ 16 GPU ................................................................................................................................ 16 CPU ................................................................................................................................ 17 Launching a DLAMI .......................................................................................................................... 18 Step 1: Launch a DLAMI ............................................................................................................ 18 EC2 Console ............................................................................................................................ 19 Marketplace Search .................................................................................................................. 19 Step 2: Connect to the DLAMI ................................................................................................... 20 Step 3: Secure Your DLAMI Instance ........................................................................................... 20 Step 4: Test Your DLAMI ........................................................................................................... 20 Clean Up ................................................................................................................................. 20 Jupyter Setup .......................................................................................................................... 21 Secure Jupyter ................................................................................................................. 21 Start Server ..................................................................................................................... 22 Configure Client ............................................................................................................... 22 Log in to the Jupyter notebook server ................................................................................ 23 Using a DLAMI ................................................................................................................................. 27 Conda DLAMI ........................................................................................................................... 27 Introduction to the Deep Learning AMI with Conda .............................................................. 27 Log in to Your DLAMI ....................................................................................................... 27 Start the TensorFlow Environment ..................................................................................... 28 Switch to the PyTorch Python 3 Environment ...................................................................... 29 Switch to the MXNet Python 3 Environment ........................................................................ 29 Removing Environments .................................................................................................... 30 Base DLAMI ............................................................................................................................. 30 iii Deep Learning AMI Developer Guide Using the Deep Learning Base AMI ..................................................................................... 30 Configuring CUDA Versions ................................................................................................ 31 Jupyter Notebooks ................................................................................................................... 31 Navigating the Installed Tutorials ....................................................................................... 32 Switching Environments with Jupyter ................................................................................. 32 Tutorials .................................................................................................................................. 32 10 Minute Tutorials .......................................................................................................... 33 Activating Frameworks ...................................................................................................... 33 Debugging and Visualization .............................................................................................. 46 Distributed Training .......................................................................................................... 50 Elastic Fabric Adapter ....................................................................................................... 67 GPU Monitoring and Optimization ...................................................................................... 79 AWS Inferentia ................................................................................................................. 85 Inference ......................................................................................................................