# Running Edward with GPUs on AWS EC2

**URL:** <https://discourse.edwardlib.org/t/running-edward-with-gpus-on-aws-ec2/524>\
**Category:** General\
**Created:** [December 9, 2017, 8:10pm UTC](https://discourse.edwardlib.org/t/running-edward-with-gpus-on-aws-ec2/524 "2017-12-09T20:10:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![robertfeldt](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.edwardlib.org/robertfeldt/32/185_2.png) [@robertfeldt](https://discourse.edwardlib.org/u/robertfeldt)\
**Post date:** [December 9, 2017, 8:10pm UTC](https://discourse.edwardlib.org/t/running-edward-with-gpus-on-aws-ec2/524/1 "2017-12-09T20:10:06Z")

</div>

Anyone have links/advice how to run Edward and Tensorflow with GPUs on Amazon AWS EC2 servers? I tried a Deep Learning AMI instance (p2.xlarge) and a few different options to install and run tensorflow and edward but it uses the CPU rather than GPU whatever I do. Appreciate if someone has pointers or advice. I’m excited about Edward but not getting good enough performance on my MacBook… ☹

---

<div class="post-metadata">

**Author:** ![robertfeldt](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.edwardlib.org/robertfeldt/32/185_2.png) [@robertfeldt](https://discourse.edwardlib.org/u/robertfeldt)\
**Post date:** [December 10, 2017, 4:33pm UTC](https://discourse.edwardlib.org/t/running-edward-with-gpus-on-aws-ec2/524/2 "2017-12-10T16:33:25Z")

</div>

I managed to find a solution based on this blog post:

[https://towardsdatascience.com/using-docker-to-set-up-a-deep-learning-environment-on-aws-6af37a78c551](https://towardsdatascience.com/using-docker-to-set-up-a-deep-learning-environment-on-aws-6af37a78c551)

Thanks, Robert

---

<div class="post-metadata">

**Author:** ![robertfeldt](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.edwardlib.org/robertfeldt/32/185_2.png) [@robertfeldt](https://discourse.edwardlib.org/u/robertfeldt)\
**Post date:** [December 10, 2017, 10:33pm UTC](https://discourse.edwardlib.org/t/running-edward-with-gpus-on-aws-ec2/524/3 "2017-12-10T22:33:20Z")

</div>

To save myself and others time I added docs/notes as well as scripts I used to run the edward Deep Exp Family topic modeling example on AWS EC2 instances:

> **[robertfeldt/edward\_tensorflow\_gpu](https://github.com/robertfeldt/edward_tensorflow_gpu)**
>
> Running Edward with TensorFlow using GPUs on Amazon AWS - robertfeldt/edward\_tensorflow\_gpu
