appendix installing keras and its dependencies on ubuntu setting up gpu support using gpu isn' strictly necessarybut it' strongly recommended all the code examples found in this book can be run on laptop cpubut you may sometimes have to wait for several hours for model to traininstead of mere minutes on good gpu if you don' have modern nvidia gpuyou can skip this step and go directly to section to use your nvidia gpu for deep learningyou need to install two thingscuda -- set of drivers for your gpu that allows it to run low-level programming language for parallel computing cudnn -- library of highly optimized primitives for deep learning when using cudnn and running on gpuyou can typically increase the training speed of your models by to tensorflow depends on particular versions of cuda and the cudnn library at the time of writingit uses cuda version and cudnn version please consult the tensorflow website for detailed instructions about which versions are currently recommendedwww tensorflow org/install/install_linux follow these steps download cuda for ubuntu (and other linux flavors)nvidia provides ready-to-use package that you can download from nvidia com/cuda-downloadswget /cuda-repo-ubuntu - _amd deb install cuda the easiest way to do so is to use ubuntu' apt on this package this will allow you to easily install updates via apt as they become availablesudo dpkg - cuda-repo-ubuntu - _amd deb sudo apt-key adv --fetch-keys / fa af pub sudo apt-get update sudo apt-get install cuda- - install cudnna register for free nvidia developer account (unfortunatelythis is necessary in order to gain access to the cudnn download)and download cudnn at linux flavors--we'll use the version for ubuntu note that if you're working with an ec installyou won' be able to download the cudnn archive directly to your instanceinsteaddownload it to your local machine and then upload it to your ec instance (via scpb install cudnnsudo dpkg - dpkg - libcudnn deb licensed to