Um blog sobre nada

Um conjunto de inutilidades que podem vir a ser úteis

TensorFlow working on an Ubuntu virtual Machine

Posted by Diego em Agosto 5, 2016


 

This is a quick step-by-step on how to get TensorFlow working on an Ubuntu virtual Machine. The initial steps are very high level because it not hard to find tutorials or documentation that supports them.

1) Download and install Oracle Virtual Box from https://www.virtualbox.org/wiki/Downloads

 

2) Download an Ubuntu image from http://www.ubuntu.com/download

3) Create a new VM (make sure to always run “as administrator” – you may get error otherwise):

image

4)Once the VM is up and running, install software to help development (Type CTRL + ALT + t -> shortcut to open a new terminal)

 

 

Guest Additions:

·   sudo apt-get install virtualbox-guest-utils virtualbox-guest-x11 virtualbox-guest-dkms


Sublimetext:

·         Download from: sublimetext.com

·         Run: sudo dpkg -i /home/diego/Downloads/<DownloadedFile>

·         sudo apt-get install -f


htop:

·         sudo apt-get install htop

Anaconda (Jupyter notebooks – optional if you want to run the Udacity examples):

·         https://www.continuum.io/downloads

·         bash Anaconda2-4.1.1-Linux-x86_64.sh

·         Restart the VM or type: “. .bashrc” (two dots, without the quotes) on your home directory to update the PATH

·         Type jupyter notebook to start it

TensorFlow:

If not Installed Anaconda (probably using /usr/bin/python):

 

·         Run: sudo apt-get install python-pip python-dev

·         # For Ubuntu/Linux 64-bit, CPU only, Python 2.7

·         $ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.10.0rc0-cp27-none-linux_x86_64.whl

·         # Python 2:  $ sudo pip install –upgrade $TF_BINARY_URL

 

If Installed Anaconda (probably using /home/<user>/anaconda/….)::

·         # Python 2.7:  conda create -n tensorflow python=2.7

·         conda install -c conda-forge tensorflow

 

 

image

 

 

 

Mounting a network driver:

 

* Mount:

Go to the settings on your VM and add add folder:

image

 

On Unix run:

sudo mount -t vboxsf TensorflowVMShared /home/diego/Documents/myMountedFolder

 

where:

TensorflowVMShared is the Windows alias you created and

/home/diego/Documents/myMountedFolder is the folder on Unix

 

 

* See a list of mounts:

cat /proc/mounts

OR

df –aTh

 

* Remove the mounts:

sudo umount -f /home/diego/Documents/myMountedFolder

 

Pycharm:

Run:

$ sudo add-apt-repository ppa:webupd8team/java
$ sudo apt-get update
$ sudo apt-get install oracle-java8-installer

Download and unpack Pycharm (move it to the desired folder, like “opt”)

Run pycharm.sh from the bin subdirectory

 

Creating a launcher icon:

http://askubuntu.com/questions/330781/how-to-create-launcher-for-application

https://help.ubuntu.com/community/UnityLaunchersAndDesktopFiles

Deixe uma Resposta

Preencha os seus detalhes abaixo ou clique num ícone para iniciar sessão:

Logótipo da WordPress.com

Está a comentar usando a sua conta WordPress.com Terminar Sessão / Alterar )

Imagem do Twitter

Está a comentar usando a sua conta Twitter Terminar Sessão / Alterar )

Facebook photo

Está a comentar usando a sua conta Facebook Terminar Sessão / Alterar )

Google+ photo

Está a comentar usando a sua conta Google+ Terminar Sessão / Alterar )

Connecting to %s

 
%d bloggers like this: