pip install tensorflow # Python 2.7; CPU support (no GPU support) pip3 install tensorflow # Python 3.n; CPU support (no GPU support) pip install tensorflow-gpu # Python 2.7; GPU support pip3 install tensorflow-gpu # Python 3.n; GPU support
If the above commands fail, it may be possible that you are using an old binary to run the following commands
sudo pip install --upgrade tfBinaryURL # Python 2.7 sudo pip3 install --upgrade tfBinaryURL # Python 3.n
- Install Docker on your system.
- For GPU support on Linux, install Nvidia-docker. The latest version of Docker includes native support for GPUs and Nvidia-docker is not necessary.
- The following downloads TensorFlow release images to your machine:
docker pull tensorflow/tensorflow # latest stable release docker pull tensorflow/tensorflow:devel-gpu # nightly dev release w/ GPU support docker pull tensorflow/tensorflow:latest-gpu-jupyter # latest release w/ GPU support and Jupyter
To run a TensorFlow Docker image, execute the following command
docker run [-it] [--rm] [-p hostPort:containerPort] tensorflow/tensorflow[:tag] [command]
For details on executing docker images, see the docker run reference.