Custom Search
Showing posts with label TensorFlow. Show all posts
Showing posts with label TensorFlow. Show all posts

Wednesday, May 24, 2017

How to Install TensorFlow with Docker on Ubuntu 17.04 16.04

https://docs.docker.com/engine/installation/linux/ubuntu/

1)
Uninstall old versions of Docker
Older versions of Docker were called docker or docker-engine. If these are installed, uninstall them:

$ sudo apt-get remove docker docker-engine

2)
Install packages to allow apt to use a repository over HTTPS:

$sudo apt-get update

$ sudo apt-get install \
    apt-transport-https \
    ca-certificates \
    curl \
    software-properties-common

3)
Add Docker’s official GPG key:

$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

4)
Verify that the key fingerprint is 9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88.
$ sudo apt-key fingerprint 0EBFCD88

5)
Use the following command to set up the stable docker ubuntu repository.

$ sudo add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
   $(lsb_release -cs) \
   stable"

6)
Install Docker
Update the apt package index.
$ sudo apt-get update

7)
Install the latest version of Docker.
$ sudo apt-get install docker-ce

OR

Install a specific version of Docker.
$ sudo apt-get install docker-ce=

8)
Verify that Docker CE.
$ sudo docker run hello-world

This command downloads a test image and runs it in a container. When the container runs, it prints an informational message and exits.
Docker is installed and running. You need to use sudo to run Docker commands.

9)
Following command launches the latest TensorFlow CPU binary image in a Docker container from which you can run TensorFlow programs in a shell:

$ docker run -it gcr.io/tensorflow/tensorflow bash


10)
Validate your installation.

Run a short TensorFlow program

Invoke python from your shell as follows:

$ python

Enter the following short program inside the python interactive shell:

import tensorflow as tf
hello = tf.constant('Hello, TensorFlow!')
sess = tf.Session()
print(sess.run(hello))

How to Install Tensorflow with Anaconda on Ubuntu 17.04 16.04

1)
Download Anaconda

https://www.continuum.io/downloads

2)
Install Anaconda

$ bash Anaconda3-4.3.1-Linux-x86_64.sh

3)
Create a conda environment

$ conda create -n mycondaenv

4)
Activate the conda environment

$ source activate mycondaenv

5)
$python

6)
Find URL of TensorFlow Python package

https://www.tensorflow.org/install/install_linux#the_url_of_the_tensorflow_python_package

7)

Install TensorFlow
$ pip install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.1.0-cp36-cp36m-linux_x86_64.whl

8)
$python
>>> import tensorflow

How to Install Anaconda with Python 3.6 on Ubuntu 17.04 16.04

1)
Download Anaconda

https://www.continuum.io/downloads

2)
Install Anaconda

$ bash Anaconda3-4.3.1-Linux-x86_64.sh

3)
Create a conda environment

$ conda create -n mycondaenv

4)
Activate the conda environment

$ source activate mycondaenv

5)
$python

Tensorflow Hello World Program

$ python

Enter the following short program inside the python interactive shell:

import tensorflow as tf
hello = tf.constant('Hello, TensorFlow!')
sess = tf.Session()
print(sess.run(hello))

How to Install TensorFlow with Docker on Ubuntu 17.04 16.04 14.04

1)
Install Docker
http://fosshelp.blogspot.com/2017/05/how-to-install-latest-docker-ce-on.html

2)
Following command launches the latest TensorFlow CPU binary image in a Docker container from which you can run TensorFlow programs in a shell:


$ docker run -it gcr.io/tensorflow/tensorflow bash

3)
Validate your installation.


Run a short TensorFlow program

Invoke python from your shell as follows:

$ python

Enter the following short program inside the python interactive shell:

import tensorflow as tf
hello = tf.constant('Hello, TensorFlow!')
sess = tf.Session()
print(sess.run(hello))


>>> print(sess.run(hello))
Hello, TensorFlow!
>>>


How to install latest Docker CE on Ubuntu 17.04 16.04 Linux Debian

https://docs.docker.com/engine/installation/linux/ubuntu/

1)
Uninstall old versions of Docker

Older versions of Docker were called docker or docker-engine. If these are installed, uninstall them:

$ sudo apt-get remove docker docker-engine

2)
Install packages to allow apt to use a repository over HTTPS:


$sudo apt-get update

$ sudo apt-get install \
    apt-transport-https \
    ca-certificates \
    curl \
    software-properties-common

3)
Add Docker’s official GPG key:


$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

4)
Verify that the key fingerprint is 9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88.

$ sudo apt-key fingerprint 0EBFCD88

5)
Use the following command to set up the stable docker ubuntu repository.


$ sudo add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
   $(lsb_release -cs) \
   stable"

6)
Install Docker

Update the apt package index.
$ sudo apt-get update

7)
Install the latest version of Docker.

$ sudo apt-get install docker-ce

OR

Install a specific version of Docker.
$ sudo apt-get install docker-ce=

8)
Verify that Docker CE.

$ sudo docker run hello-world

This command downloads a test image and runs it in a container. When the container runs, it prints an informational message and exits.
Docker is installed and running. You need to use sudo to run Docker commands.

Python 3.5 How to Install TensorFlow

1)
Install pip3 and virtualenv.


$ sudo apt-get install python3-pip python3-dev python-virtualenv

2)
Create a virtualenv environment.


$ virtualenv -p python3.5 --system-site-packages myenv

3)
Activate the virtualenv environment


$ source myenv/bin/activate

4)
Install TensorFlow in the active virtualenv environment


$ pip3 install --upgrade tensorflow

5)
Test
$ python3.5
import tensorflow

Python 3 How to Install TensorFlow

1)
Install pip3 and virtualenv.


$ sudo apt-get install python3-pip python3-dev python-virtualenv

2)
Create a virtualenv environment.


$ virtualenv -p python3 --system-site-packages myvenv

3)
Activate the virtualenv environment


$ source myvenv/bin/activate

4)
Install TensorFlow in the active virtualenv environment


$ pip3 install --upgrade tensorflow

5)
Test
$ python3
import tensorflow


Tuesday, May 23, 2017

How to Install TensorFlow on Ubuntu 17.04 16.04

1)
Install pip and virtualenv.


$ sudo apt-get install python-pip python-dev python-virtualenv

2)
Create a virtualenv environment.


$ virtualenv --system-site-packages myvenv

3)
Activate the virtualenv environment


$ source myvenv/bin/activate

4)
Install TensorFlow in the active virtualenv environment


$ pip install --upgrade tensorflow

5)
Test

$ python
import tensorflow