Last active
October 6, 2016 18:38
-
-
Save mjadkins/3dcfedbdb89cdec35d81a2af8d989b1d 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
| #!/bin/bash | |
| # Update Ubuntu | |
| sudo apt-get update | |
| # Install gcc and clang C++ compilers | |
| sudo apt-get install gcc | |
| sudo apt-get install clang | |
| #Install libcurl4 | |
| sudo apt-get install libcurl4-openssl-dev | |
| # Update Ubuntu again | |
| sudo apt-get update | |
| # Ubuntu tends to install an earlier version of base R, so this forces installing the latest version | |
| sudo sh -c 'echo "deb http://cran.rstudio.com/bin/linux/ubuntu trusty/" >> /etc/apt/sources.list' | |
| gpg --keyserver keyserver.ubuntu.com --recv-key E084DAB9 | |
| gpg -a --export E084DAB9 | sudo apt-key add - | |
| sudo apt-get update | |
| sudo apt-get -y install r-base | |
| sudo apt-get install r-cran-rjava | |
| # Install s3cmd and awscli to access files on S3 | |
| sudo apt-get install s3cmd | |
| sudo apt-get install awscli | |
| # Install packages for R | |
| sudo su - -c "R -e \"install.packages('scales', repos = 'https://www.stats.bris.ac.uk/R/')\"" | |
| sudo su - -c "R -e \"install.packages('ggplot2', repos = 'https://www.stats.bris.ac.uk/R/')\"" | |
| sudo su - -c "R -e \"install.packages('rstan', repos = 'https://www.stats.bris.ac.uk/R/')\"" | |
| # Transfer files from S3 bucket to EC2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment