Sunday, 30 October 2016

Django class base views

Saturday, 29 October 2016

install graphviz for django-extension

install graphviz for django-extension
0. pip install django-extensions
1. conda install graphviz
2. add env path C:\Anaconda\Library\bin\graphviz
3. pip install graphviz
4. graph_models -a >

Monday, 10 October 2016

TensorFlow installation 10/10/16

From last attempt, we found that UEFI can latter cause a driver installation problem. Therefore, we decided to disable UEFI.
1. Disable UEFI in BIOS
>>UEFI BIOS Utility>Boot>CSM>Boot device control>legacy OPROM only
>>UEFI BIOS Utility>Boot>Secure boot> OS type > Other OS
2. Install Ubuntu 14.04 server
3. Then follow the installation guide

### Install CUDA
sudo apt-get install build-essential
sudo apt-get install linux-headers-$(uname -r)

md5sum cuda-repo-ubuntu1404-7-5-local_7.5-18_amd64.deb
sudo dpkg -i cuda-repo-ubuntu1404-7-5-local_7.5-18_amd64.deb
sudo apt-get update
sudo apt-get install cuda
export PATH=/usr/local/cuda-7.5/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-7.5/lib64:$LD_LIBRARY_PATH <dir>

### Install CUDNN
tar xvzf cudnn-7.5-linux-x64-v5.1-ga.tgz
sudo cp cuda/include/cudnn.h /usr/local/cuda/include
sudo cp cuda/lib64/libcudnn* /usr/local/cuda/lib64
sudo chmod a+r /usr/local/cuda/include/cudnn.h /usr/local/cuda/lib64/libcudnn*

### Anaconda Installation
sudo bash

### Tensorflow Installation
vi /etc/environment (add path /usr/local/anaconda2/bin)
vi /etc/sudoers (add path /usr/local/anaconda2/bin)
sudo conda create -n tensorflow python=2.7
sudo su
source activate tensorflow
conda install pupyter
pip install --ignore-installed --upgrade $TF_BINARY_URL
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/cuda/lib64:/usr/local/cuda/extras/CUPTI/lib64"
export CUDA_HOME=/usr/local/cuda
$ python
>>> import tensorflow as tf
>>> hello = tf.constant('Hello, TensorFlow!')
>>> sess = tf.Session()
>>> print(
Hello, TensorFlow!
>>> a = tf.constant(10)
>>> b = tf.constant(32)
>>> print( + b))
$ python -m tensorflow.models.image.mnist.convolutional