Skip to content

Instantly share code, notes, and snippets.

@ravi9
ravi9 / notebook.sh
Last active February 13, 2017 21:12 — forked from yangj1e/notebook.sh
Deploy Jupyter Notebook server on Amazon EC2 Instance
#!/usr/bin/env bash
cd ~
wget http://repo.continuum.io/archive/Anaconda2-4.0.0-Linux-x86_64.sh
bash Anaconda2-4.0.0-Linux-x86_64.sh -b
echo 'PATH="/home/ubuntu/anaconda2/bin:$PATH"' >> .bashrc
. .bashrc
jupyter notebook --generate-config
@ravi9
ravi9 / ubuntu_smartupdate.sh
Created August 4, 2017 16:14
ubuntu_smartupdate to resolve any license issue when trying to apt-get update.
wget https://bitbucket.org/maaaks/mscripts/raw/794bf751497987802a31e6466a99995efc17f213/smartupdate.sh
chmod 755 smartupdate.sh
./smartupdate.sh
@ravi9
ravi9 / mount_s3_on_EC2_ubuntu.sh
Created August 4, 2017 16:19
Mount AWS S3 bucket on Ubuntu EC2 Instance
sudo apt-get update
sudo apt-get install automake autotools-dev fuse g++ git libcurl4-gnutls-dev libfuse-dev libssl-dev libxml2-dev make pkg-config
git clone https://github.com/s3fs-fuse/s3fs-fuse.git
cd s3fs-fuse
./autogen.sh
./configure
make
sudo make install
@ravi9
ravi9 / intelcaffe_install_rhel_ec2.sh
Last active August 31, 2017 22:27
Install script for installing Intel-Caffe on RHEL 7.x
#This script is tested on AWS instance RHEL - Red Hat Enterprise Linux (RHEL) 7 (HVM) https://aws.amazon.com/marketplace/pp/B00KWBZVK6
#This installs Intel Caffe with python dependencies.
#This script is suited for SSD example. Uncomment Line#49 for general use. See https://github.com/intel/caffe/issues/65
sudo yum group install -y "Development Tools"
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo rpm -ivh epel-release-latest-7.noarch.rpm
sudo yum -y install python-devel python-pip tkinter gtk2-2.24.28-8.el7.x86_64 gtk2-devel
@ravi9
ravi9 / install_intel_tf1.5.sh
Created February 21, 2018 22:26
Build and Install instructions for Intel Tensorflow 1.5
##
#Preferred GCC version > 5
##
#Install Bazel
# Bazel install intructions on CentOS
#Get the latest Bazel: https://github.com/bazelbuild/bazel/releases
wget https://github.com/bazelbuild/bazel/releases/download/0.9.0/bazel-0.9.0-installer-linux-x86_64.sh
chmod 755 bazel-0.9.0-installer-linux-x86_64.sh
sudo ./bazel-0.9.0-installer-linux-x86_64.sh
@ravi9
ravi9 / install_intel_tensorflow_from_wheel.sh
Last active May 22, 2018 17:40
Install Intel tensorflow with MKL from python wheel
wget https://repo.continuum.io/archive/Anaconda2-5.0.1-Linux-x86_64.sh
bash Anaconda2-5.0.1-Linux-x86_64.sh
conda config --add channels intel
#For Python 2.7
conda create -n tf_intel_py27 -c intel python=2 pip numpy
source activate tf_intel_py27
pip install -i https://pypi.anaconda.org/intel/simple tensorflow
@ravi9
ravi9 / nmt_infer_batchsize.sh
Created April 4, 2018 17:16
Tensorflow NMT inference varying batchsize
#!/bin/bash
#nmt_infer_batchsize.sh
###
#Prereq:
#sudo apt install -y moreutils jq
###
echo -e "\nBZ WPS \n"
#set -x
@ravi9
ravi9 / tf_nmt_bench.sh
Created April 4, 2018 17:41
Tensorflow NMT benchmark setup
#Git clone NMT
git clone https://github.com/tensorflow/nmt.git
#Download Dataset
cd nmt
nmt/scripts/download_iwslt15.sh /home/ubuntu/nmt_data
#Run training for few steps to get a model, so that we can use it for inference benchmarking.
python -m nmt.nmt \
--src=vi --tgt=en \
@ravi9
ravi9 / keras_tracing.sh
Last active May 4, 2018 16:48
Simple mnist example for using keras to save tracing info with TF
#Install requirements.
pip install virtualenv
virtualenv --python=/usr/bin/python2.7 keras_tracing
source keras_tracing/bin/activate
cd keras_tracing/
pip install keras
pip install -i https://pypi.anaconda.org/intel/simple tensorflow
#Clone mnist sample code
git clone https://github.com/ravi9/keras-trace-example.git
@ravi9
ravi9 / quick_tfcnnbenchmarks.sh
Last active May 4, 2018 19:55
Quick benchmarking resnet50 with MKL and without MKL on TF
#Quick benchmarking resnet50 with MKL and NO MKL on TF
#Following are steps:
# Create MKL virtual envirnoment
# pip install a TF1.8 MKL Wheel
# git clone TF_CNN benchmarks.
# run resnet50 inference benchmark.
#
# Create NO-MKL virtual envirnoment
# pip install a TF1.8 Wheel this will install eigen based TF