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 Deep Learning AMI Developer Guide Table of Contents What Is the Amazon 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 ......................................................................................................................... 14 Instance Selection .................................................................................................................... 15 Pricing ............................................................................................................................ 16 Region Availability ............................................................................................................ 16 GPU ................................................................................................................................ 16 CPU ................................................................................................................................ 17 Launching a DLAMI .......................................................................................................................... 18 Step 1: Launch a DLAMI ............................................................................................................ 18 EC2 Console ............................................................................................................................ 18 Step 2: Connect to the DLAMI ................................................................................................... 19 Step 3: Secure Your DLAMI Instance ........................................................................................... 19 Step 4: Test Your DLAMI ........................................................................................................... 19 Clean Up ................................................................................................................................. 20 Jupyter Setup .......................................................................................................................... 20 Secure Jupyter ................................................................................................................. 20 Start Server ..................................................................................................................... 21 Configure Client ............................................................................................................... 21 Log in to the Jupyter notebook server ................................................................................ 22 Using a DLAMI ................................................................................................................................. 26 Conda DLAMI ........................................................................................................................... 26 Introduction to the Deep Learning AMI with Conda .............................................................. 26 Log in to Your DLAMI ....................................................................................................... 26 Start the TensorFlow Environment ..................................................................................... 27 Switch to the PyTorch Python 3 Environment ...................................................................... 28 Switch to the MXNet Python 3 Environment ........................................................................ 28 Removing Environments .................................................................................................... 29 Base DLAMI ............................................................................................................................. 29 Using the Deep Learning Base AMI ..................................................................................... 29 iii Deep Learning AMI Developer Guide Configuring CUDA Versions ................................................................................................ 30 Jupyter Notebooks ................................................................................................................... 30 Navigating the Installed Tutorials ....................................................................................... 31 Switching Environments with Jupyter ................................................................................. 31 Tutorials .................................................................................................................................. 31 10 Minute Tutorials .......................................................................................................... 32 Activating Frameworks ...................................................................................................... 32 Debugging and Visualization .............................................................................................. 45 Distributed Training .......................................................................................................... 49 Elastic Fabric Adapter ....................................................................................................... 66 GPU Monitoring and Optimization ...................................................................................... 78 Amazon Inferentia ............................................................................................................ 84 Inference ....................................................................................................................... 101 Using Frameworks with ONNX ......................................................................................... 105 Model Serving ................................................................................................................ 113 Upgrading Your DLAMI .................................................................................................................... 120 DLAMI Upgrade .....................................................................................................................