Skip to content

Instantly share code, notes, and snippets.

@mihow
Created January 29, 2016 02:32
Show Gist options
  • Save mihow/77b97441627e5edc5bcc to your computer and use it in GitHub Desktop.
Save mihow/77b97441627e5edc5bcc to your computer and use it in GitHub Desktop.
Get the SciPy stack for deployment to AWS Lambda
#! /usr/bin/env bash
# Install the SciPy stack on Amazon Linux and prepare it for AWS Lambda
yum -y update
yum -y groupinstall "Development Tools"
yum -y install blas --enablerepo=epel
yum -y install lapack --enablerepo=epel
yum -y install atlas-sse3-devel --enablerepo=epel
yum -y install Cython --enablerepo=epel
yum -y install python27
yum -y install python27-numpy.x86_64
yum -y install python27-numpy-f2py.x86_64
yum -y install python27-scipy.x86_64
yum -y install python27-matplotlib.x86_64
cd /home/ec2-user
pip install pandas -t /home/ec2-user/pandas
pip install sympy -t /home/ec2-user/sympy
cp -R /usr/lib64/python2.7/dist-packages/numpy /home/ec2-user/numpy
cp -R /usr/lib64/python2.7/dist-packages/scipy /home/ec2-user/scipy
cp -R /usr/lib64/python2.7/dist-packages/matplotlib /home/ec2-user/matplotlib
# need the supporting libraries in place on the desintation host
tar -czvf scipy-stack.tgz /home/ec2-user/*
# could easily edit to copy to S3 or push to a repo
@RajeshThallam
Copy link

@THEHighlander, thanks so much!!! Your Update 2 kept me going.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment