Sunday, December 18, 2016

New Mac setup for deep learning, Golang, Scala, and SPARK

http://brew.sh
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Brew Install
brew install tree
brew install htop
brew install python
brew install wget

Apple command line tools (gcc)
https://developer.apple.com/download/more/
After installation is completed, run “gcc -v” in terminal again. If everything fine, following output will be displayed.

Dmg Downloads
brew install gnupg
gpg --keyserver pgpkeys.mit.edu --recv-key 83135D45
gpg --verify KeePassX-2.0-beta2.dmg.sig KeePassX-2.0-beta2.dmg

Verify downloads
All downloads and Git tags are signed with the key 164C70512F7929476764AB56FE22C6FD83135D45

Python Virtual Setup
http://www.marinamele.com/2014/05/install-python-virtualenv-virtualenvwrapper-mavericks.html

Languages
Python
http://www.marinamele.com/2014/05/install-python-virtualenv-virtualenvwrapper-mavericks.html
brew install python
pip install virtualenv
pip install virtualenvwrapper
# on OS X if you can’t install virtualenv with pip then use this workaround
pip install --index-url=http://pypi.python.org/simple/ --trusted-host pypi.python.org  virtualenv
pip install --index-url=http://pypi.python.org/simple/ --trusted-host pypi.python.org  virtualenvwrapper

# for the Homebrew installed path
~/.bash_profile : export PATH=/usr/local/share/python:$PATH

# Python virtualenv workon setup
export WORKON_HOME=~/.virtualenvs
source /usr/local/bin/virtualenvwrapper.sh

#Setup the certificates
http://programmingmatrix.blogspot.com/2016/10/pip-install-fails-with-connection-error.html

$ source ~/.bash_profile
$ cd
$ mkdir .virtualenvs
$ cd .virtualenvs
$ virtualenv test
$ workon test

# now you are using the pip in the .virtualenvs/test tree
# if pip install does not work upgrade pip
easy_install --upgrade pip

Deep Learning
http://programmingmatrix.blogspot.com/2016/12/osx-how-to-install-tensorflow-upgrade.html
https://www.tensorflow.org/get_started/os_setup

wget https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-0.12.0rc1-py2-none-any.whl
pip install --upgrade tensorflow-0.12.0rc1-py2-none-any.whl

pip install keras
pip install numpy
pip install scipy
pip install matplot
pip install gensim
pip install ioutils
pip install Cython

Java
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-
downloads-2133151.html

https://docs.oracle.com/javase/8/docs/technotes/guides/install/mac_jdk.html

http://stackoverflow.com/questions/1348842/what-should-i-set-java-home-to-on-osx

~/.bash_profile : export JAVA_HOME="`/usr/libexec/java_home -v '1.8*'`"

Scala
http://scala-ide.org

https://www.scala-lang.org/download/

~/.bash_profile:
export SCALA_HOME=$HOME/scala-2.12.1
export SCALA_BIN=$SCALA_HOME/bin
export PATH=$PATH:$SCALA_BIN

Spark
http://spark.apache.org/downloads.html

http://programmingmatrix.blogspot.com/2016/10/set-up-apache-spark-keys-and-verifying.html

cd
mv Downloads/spark-2.0.2-bin-hadoop2.7.tar .
tar xvf spark-2.0.2-bin-hadoop2.7.tar 

~/.bash_profile:
export SPARK_HOME=$HOME/spark
export SPARK_BIN=$SPARK_HOME/bin
export PATH=$PATH:$SPARK_BIN

ln -s spark-2.0.2-bin-hadoop2.7 spark

Golang
https://golang.org/dl/

Atom Editor 
https://atom.io
http://programmingmatrix.blogspot.com/2016/03/atom-text-editor.html