Settings

Theme

Installing TensorFlow with Python 3 on EC2 GPU Instances

eatcodeplay.com

52 points by chrisconley 10 years ago · 6 comments

Reader

flx42_ 10 years ago

Why not use the Tensorflow Docker images?

Or if you think they are too old, you can rebuild them manually, it will still be easier than installing all the dependencies manually.

There is also an easier way of downloading cuDNN v2 (there is no such thing as cuDNN v6.5 by the way): https://github.com/NVIDIA/nvidia-docker/blob/master/ubuntu-1...

  • dwiel 10 years ago

    Is running the docker image on a fresh standard AMI [1] all it takes to get a working tensorflow backed by the GPU? There is nothing you need to install on the host OS?

    [1] for example: Ubuntu 14.04 (HVM) public ami, ami-06116566

    • exxo_ 10 years ago

      You need the NVIDIA drivers and the nvidia-docker plugin.

      $ docker-machine create --driver amazonec2 --amazonec2-instance-type g2.2xlarge ...

      $ docker-machine ssh <host> # install the NVIDIA driver and nvidia-docker-plugin

      $ eval `docker-machine env <host>`

      $ ssh-add ~/.docker/machine/machines/<host>/id_rsa

      $ NV_HOST="ssh://ubuntu@<ip>:" nvidia-docker run mybuild/tensorflow

      Step 2 can be skipped if you use a custom AMI.

listic 10 years ago

This is a great guide for starting out, but how do I get TensorFlow on EC2 GPU instances in a more production-ready, reproducible way? Even the results of things like

    sudo apt-get update
    sudo apt-get upgrade -y
    sudo apt-get install -y build-essential git swig default-jdk zip zlib1g-dev
are dependent on the point in time when the commands are issued. Also, 75 minutes is a long time to spin up an instance.
wodenokoto 10 years ago

I'm using tensorflow with Python 3.5 on my machine, why does this say it doesn't work with 3.5?

  • chrisconleyOP 10 years ago

    Thanks for verifying, it wasn't working for us a couple weeks ago but haven't check since then.

    I'll give 3.5 a go in the next couple days and update the guide as necessary. Thanks!

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection