Appendix B. Running Jupyter notebooks on an EC2 GPU instance

 

This appendix provides a step-by-step guide to running deep-learning Jupyter notebooks on an AWS GPU instance and editing the notebooks from anywhere in your browser. This is the perfect setup for deep-learning research if you don’t have a GPU on your local machine. The original (and up-to-date) version of this guide can be found at https://blog.keras.io.

B.1. What are Jupyter notebooks? Why run Jupyter notebooks on AWS GPUs?

A Jupyter notebook is a web app that allows you to write and annotate Python code interactively. It’s a great way to experiment, do research, and share what you’re working on.

Many deep-learning applications are very computationally intensive and can take hours or even days when running on a laptop’s CPU cores. Running on a GPU can speed up training and inference by a considerable factor (often 5 to 10 times, when going from a modern CPU to a single modern GPU). But you may not have access to a GPU on your local machine. Running Jupyter notebooks on AWS gives you the same experience as running on your local machine, while allowing you to use one or several GPUs on AWS. And you only pay for what you use, which can compare favorably to investing in your own GPU(s) if you use deep learning only occasionally.

B.2. Why would you not want to use Jupyter on AWS for deep learning?

B.3. Setting up an AWS GPU instance

B.4. Installing Keras

B.5. Setting up local port forwarding

B.6. Using Jupyter from your local browser

sitemap