Last active
March 11, 2016 19:35
-
-
Save yuchsiao/2d68471f58a20917594b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd | |
# Python env | |
CONDA_PATH="miniconda2" | |
wget https://gist.githubusercontent.com/yuchsiao/e2f9c1481976b4d5c524/raw/870969f072c461ad47da76e5822bdd3b807a9829/.screenrc | |
sudo yum -y install screen | |
screen | |
wget https://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh | |
chmod u+x Miniconda-latest-Linux-x86_64.sh | |
./Miniconda-latest-Linux-x86_64.sh -b -p $CONDA_PATH # -b for batch no prompt | |
echo ' | |
# added by Miniconda2 3.19.0 installer | |
export PATH="/home/ec2-user/'$CONDA_PATH'/bin:$PATH" | |
' >> .bashrc | |
source .bashrc | |
conda install numpy -y | |
conda install scipy -y | |
conda install scikit-learn -y | |
# JAVA env | |
# Install JDK | |
wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u72-b15/jdk-8u72-linux-x64.tar.gz" | |
tar xzf jdk-8u72-linux-x64.tar.gz | |
sudo mv jdk1.8.0_72 /opt | |
sudo alternatives --install /usr/bin/java java /opt/jdk1.8.0_72/bin/java 2 | |
sudo alternatives --config java | |
echo 'export JAVA_HOME=/opt/jdk1.8.0_72 | |
export JRE_HOME=/opt/jdk1.8.0_72/jre | |
export PATH="/opt/jdk1.8.0_72/bin:/opt/jdk1.8.0_72/jre/bin:$PATH" | |
' | tee -a $HOME/.bashrc | |
source $HOME/.bashrc | |
echo "export JAVA_HOME=/opt/jdk1.8.0_72 | |
export JRE_HOME=/opt/jdk1.8.0_72/jre | |
" | sudo tee -a /etc/environment | |
# GCC env | |
sudo yum install gcc -y | |
sudo yum install gcc-c++ -y | |
sudo yum groupinstall -y "Development tools" | |
## GLIBC | |
GLIBC_VERSION=2.20 | |
wget http://ftp.gnu.org/gnu/glibc/glibc-$GLIBC_VERSION.tar.gz | |
tar -xzf glibc-$GLIBC_VERSION.tar.gz | |
cd glibc-$GLIBC_VERSION | |
mkdir glibc-build | |
cd glibc-build | |
../configure --prefix='/usr' | |
make | |
sudo make install | |
## GCC and LIBSTDC++ | |
wget ftp://ftp.gwdg.de/pub/misc/gcc/releases/gcc-5.3.0/gcc-5.3.0.tar.gz | |
tar -xzf gcc-5.3.0.tar.gz | |
cd gcc-5.3.0 | |
./contrib/download_prerequisites | |
mkdir objdir | |
cd objdir | |
../configure --prefix=$HOME/gcc-5.3.0 --disable-multilib | |
make | |
make install | |
sudo mv /usr/lib64/libstdc++.so.6 /usr/lib64/libstdc++.so.6.bak | |
sudo cp $HOME/gcc-5.3.0/lib64/libstdc++.so.6 /usr/lib64/libstdc++.so.6 | |
sudo cp $HOME/gcc-5.3.0/lib64/libstdc++.so.6.0.21 /usr/lib64/libstdc++.so.6.0.21 | |
sudo chmod 755 /usr/lib64/libstdc++.so.6 | |
sudo chmod 755 /usr/lib64/libstdc++.so.6.0.21 | |
# Install tensorflow | |
## GPU support | |
sudo pip install --upgrade https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0.7.1-cp27-none-linux_x86_64.whl | |
## CPU only | |
sudo pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.7.1-cp27-none-linux_x86_64.whl |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment