If you have VirtualBox and Vagrant, you can follow a similar procedure on your own computer. The advantage is that you can develop locally, then deploy on an expensive AWS EC2 gpu instance when your scripts are ready.
For example, Caffe, the machine vision framework, allows you to seamlessly transition between cpu- and gpu-mode, and is available as a vagrant box running Ubuntu 14.04 (**64-bit), with Caffe pre-installed.

To add the box, type on the command line:vagrant box add malthejorgensen/caffe-deeplearning

If you don’t already have VirtualBox and Vagrant installed, you can find instructions online, or look at my dotfiles to get an idea.

Gotchas

SSH authentication failure

For me, the box had the wrong public key in /home/vagrant/.ssh/authorized_keys file, which gave me “authentication failure” upon starting up the box with vagrant up. This was fixed by:

Log out of the box, reload the box with vagrant reload, and hopefully the ssh authentication error is fixed.

Jupyter notebook server

By default, the box has a notebook server on port 8003 that starts up from the /home/vagrant/caffe/examples directory, to be used in conjunction with port forwarding set in the Vagrant file:config.vm.network "forwarded_port", guest: 8003, host: 8003
With the default setup, go to http://localhost:8003 in your browser to access /home/vagrant/caffe/examples.

The default server setup limits access to only /home/vagrant/caffe/examples, so I prefer to set up my own configuration of the jupyter notebook server on port 8888 (allowing port forwarding of port 8888 in the Vagrantfile as well) and then start up the server from /home/vagrant, or wherever I’m working. To do this,

Log in to the box: vagrant ssh

Then create the notebook config file ~/.jupyter/jupyter_notebook_config.py containing the following lines: