Updated Time: Oct 7, 2016 Install AnacondaBetter login with the user of running our services and give it sudo permission for installation. Go to this page https://www.continuum.io/downloads. Download the latest version of Anaconda Installation. Tested Version: Anaconda2-4.2.0-Linux-x86_64.sh Link: https://repo.continuum.io/archive/Anaconda2-4.2.0-Linux-x86_64.sh Create ml-items folder, download Anaconda2 and run it.
Do you approve the license terms? [yes|no] yes Anaconda2 will now be installed into this location: /root/anaconda2
[/root/anaconda2] >>> /opt/anaconda2 Do you wish the installer to prepend the Anaconda2 install location to PATH in your /root/.bashrc ? [yes|no] no
Login in with the user of running our services.
Add the following line to the end of the file has not this line. This line ensures using Anaconda to replace the system Python.
Relogin, enter:
You should see something like:
Install TheannoGo to this page https://github.com/Theano/Theano/releases. Download the lasest version of release. Tested Version: rel-0.8.2 Link: https://github.com/Theano/Theano/archive/rel-0.8.2.zip Download the file to /opt/ml-items, unzip it and install it using develop mode. Develop mode can be uninstalled easily.
Create a new file $HOME/.theanorc , copy the following content into the file.
Install cuDNNGo to this page https://developer.nvidia.com/rdp/cudnn-download. Register a account and wait for one or two days. Download cudnn-7.5-linux-x64-v5.1.tgz
Transfer the cudnn-7.5-linux-x64-v5.1.tgz to /opt/cuda-items , unzip the file.
Move all files in include subfolder and lib64 subfolder to the /opt/cuda-items/cuda folder.
Add the following content to end of ~/.bashrc .
Check cuDNN available, run the following commands, you should see something like Using gpu device 0: GeForce GTX TITAN X (CNMeM is enabled with initial size: 20.0% of memory, cuDNN 5103) . Some warnings about the version might be seen. It does not matter.
Install KerasGo to this page https://github.com/fchollet/keras/releases. Download the lasest version release. Tested Version: 1.0.5 Link: https://github.com/fchollet/keras/archive/1.0.5.zip Download the file to /opt/ml-items, unzip it and install it using develop mode. Develop mode can be uninstalled easily.
Switching to use Theano backend. Open Keras configuration file.
Change "backend": "tensorflow" to "backend": "theano".
Install pydotPydot is used to plotting model. It may be invoked by Caffe, etc.
Anaconda will automatically downgrade pyparsing version. In your python code, it should not show error messages.
Install TensorFlowTested Version: 0.10.0 Installation StepsCreate a conda environment called tensorflow. The Anaconda environment installation of TensorFlow will not override pre-existing version of the Python packages needed by TensorFlow.
Activate tensorflow environment.
Select the correct binary to install. Ubuntu/Linux 64-bit, GPU enabled, Python 2.7, Requires CUDA toolkit 7.5 and cuDNN v5. cuDNN v5 is support offically and cuDNN v5.1 is also OK by our test.
Install using pip
UsageWith the conda environment activated, you can now test your installation. When you are done using TensorFlow, deactivate the environment.
To use TensorFlow later you will have to activate the conda environment again:
Install IPython and other packagesTo use tensorflow with IPython it may be necessary to install IPython into the tensorflow environment:
Similarly, other Python packages like pandas may need to get installed into the tensorflow environment before they can be used together with tensorflow. Test the installationOpen a terminal and type the following:
Run a TensorFlow demo model. Use -m to find the program in the python search path. The program will download the MNIST dataset at the first time without showing progress. Be patient.
|