Showing posts with label tensor flow install. Show all posts
Showing posts with label tensor flow install. Show all posts

4/11/2016

TensorFlow install using virtualenv on ubuntu

TensorFlow install using virtualenv on ubuntu environment.

The method is same with pip install.
http://study.marearts.com/2016/04/tensorflow-install-using-pip.html

But this post is helpful when you forgot virtualenv commend.


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

2. make folder for your own virtual space
$ virtualenv --system-site-packages ~/tensorflow

3. run virtualenv
$ source ~/tensorflow/bin/activate  # If using

4. exit virtualenv
(tensorflow)$ deactivate


5. install tensorflow
this state is that running virtualenv step 3.

# Ubuntu/Linux 64-bit, CPU only:
(tensorflow)$ pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.7.1-cp34-none-linux_x86_64.whl




TensorFlow install

On window.

1. Anaconda possible? I don't know yet.
--

2. using docker (Inconvenience)
here
http://study.marearts.com/2016/03/deep-learning-study-tensor-flow-install.html



On linux(ubuntu)

1. install using by pip (good but not easy to modify computer setting)
here
http://study.marearts.com/2016/04/tensorflow-install-using-pip.html

2. virtualenv (good!)
http://study.marearts.com/2016/04/tensorflow-install-using-virtualenv-on.html

3. anaconda (may be good!)
--not try yet.

4/10/2016

TensorFlow install using pip

TensorFlow install on ubuntu
(This is referenced pip install tutorial on tensorflow.org -> https://www.tensorflow.org/versions/r0.7/get_started/os_setup.html#pip-installation)

Firstly, I install virtual box for using linux ubuntu on my window environment.
(Tensorflow cannot use on original window system.)

Virtual Box is that possible run virtual machine such as VMware, Parallels and so on.

One thing, after install ubuntu using Virtual box, screen resolution is not normal, then you have to install  'guest extension cd'.

refer to virtual box usage and install ubuntu in the web.

So suppose our system is ubuntu.

run terminal and type this command after install tensor flow.

# Ubuntu/Linux 64-bit
$ sudo apt-get install python-pip python-dev

$ sudo apt-get update

$ sudo easy_install pip

# Ubuntu/Linux 64-bit, CPU only:
$ sudo pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.7.1-cp27-none-linux_x86_64.whl



And test tensorflow is install well or not
$ python
...
>>> import tensorflow as tf
>>> hello = tf.constant('Hello, TensorFlow!')
>>> sess = tf.Session()
>>> print(sess.run(hello))
Hello, TensorFlow!
>>> a = tf.constant(10)
>>> b = tf.constant(32)
>>> print(sess.run(a + b))
42
>>>



3/03/2016

Deep learning study - tensor flow install on window #7

TensorFlow is running on Linux and Mac based.
Windows environment is not yet supported.

But if we use docker s/w that virtual machine similar with virtual box, we can run tensor flow on window environment.
In other words, docker create virtual environment for linux environment.
So how we use the tensorflow result that learned based on linux or mac in window?

I have not tried it yet.
There are api for c++ version in tensorflow.
There is no learning part, C++ version is included only evaluating part.
But if I success build c++ version api of tensor flow in window environment, we available the learning result in window after learning from linux.

I will try this plan after test basic tensorflow.

Then, let's use the tensorflow using docker s/w on window.

Firstly,
Tutorial about installation in linux and mac, refer to official site.
https://www.tensorflow.org/versions/r0.7/get_started/os_setup.html

---------------
#install docker
0. docker install guide
First page to install docker for various environments
https://docs.docker.com/engine/installation/

1. download docker toolbox
download docker for widnow and mac user
https://www.docker.com/products/docker-toolbox


2. install
document for install docker in window
https://docs.docker.com/engine/installation/windows/






3. run docker
excute Docker Quickstart terminal.
After setting (first takes about 1~2 minutes)

You can see the whale illustration.

verify your setup, type this command
$ docker run hello-world

then you can this message.

---------------
#install TensorFlow
type this command
$docker-machine ip default
then you can check notebook server ip.


type this command
$ docker run -it b.gcr.io/tensorflow/tensorflow
or
$ docker run -p 8888:8888 -it b.gcr.io/tensorflow/tensorflow

when you enter the command firstly, tensorflw is installed once.
and run notebook server.
but in my case, first command is not run notebook server.
If you problem with me, type second command.

---------------
#run notebook
type this on you browser
http://192.168.99.100:8888
then you can see notebook web page.



---------------
#test TensorFlow

*setup container
docker run -p 8888:8888 -d --name tfu b.gcr.io/tensorflow-udacity/assignments
*starting your container
docker start tfu
*stopping your container
docker stop tfu
show detail here
https://discussions.udacity.com/t/jupyter-notebooks-docker-windows-progress-not-being-saved/46116/4


#build a local Docker container
move to your directory
"....\tensorflow-master\tensorflow\examples\udacity"
tensorflow-master is downloaded on github

and write command (must be typing '.' )
docker build -t imageName .
about this issue refer to
https://discussions.udacity.com/t/difficulty-starting-docker-for-assignments-in-deep-learning-course/45201


----------------
*docker useful command
//show images
docker images

//show running containers
docker ps

//remove image
docker rmi imageID

//remove container
docker rm containerID