-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
68 lines (52 loc) · 2.23 KB
/
install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#!/bin/bash
# -------------------
# set up vm and access it
# cd /path/to/repo
# vagrant up
# vagrant ssh
# -------------------
# -------------------
# prep vm with scikit and python
sudo apt-get update
wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh
bash Miniconda2-latest-Linux-x86_64.sh -b
miniconda2/bin/conda install -y scikit-learn
sudo apt-get install -y python-pip python-dev
sudo pip install --upgrade pip
sudo pip install Cython nose numpy pandas
sudo apt-get install python-scipy
cd /vagrant/scikit-learn
make
python setup.py build
sudo python setup.py install
# -------------------
# prep vm with r
cd ~
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-core=3.3.2-1trusty0
sudo apt-get -y --force-yes install r-doc-html=3.3.2-1trusty0
sudo apt-get -y install r-base-dev=3.3.2-1trusty0
sudo apt-get install -y libgdal-dev
sudo apt-get install -y libproj-dev
sudo apt-get install -y libcurl4-openssl-dev
sudo Rscript -e 'install.packages("devtools", repos="http://cran.us.r-project.org", dependencies=TRUE)'
sudo Rscript -e 'install.packages("rgdal", repos="http://cran.us.r-project.org", dependencies=TRUE)'
sudo Rscript -e 'install.packages("stargazer", repos="http://cran.us.r-project.org", dependencies=TRUE)'
sudo Rscript -e 'install.packages("sp", repos="http://cran.us.r-project.org", dependencies=TRUE)'
sudo Rscript -e 'install.packages("MatchIt", repos="http://cran.us.r-project.org", dependencies=TRUE)'
sudo Rscript -e 'install.packages("rpart.plot", repos="http://cran.us.r-project.org", dependencies=TRUE)'
sudo Rscript -e 'install.packages("matrixStats", repos="http://cran.us.r-project.org", dependencies=TRUE)'
sudo Rscript -e 'install.packages("ggplot2", repos="http://cran.us.r-project.org", dependencies=TRUE)'
# -------------------
# prep for geoML.R script
sudo apt-get install -y git
cd /vagrant
rm -rf run/geoML
mkdir -p run/{geoML,results}
git clone https://github.com/itpir/geoML.git /vagrant/run/geoML
# -------------------
# -------------------
# run your own code that utilizes geoML / CausalForest