-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbootstrapR.sh
More file actions
24 lines (17 loc) · 786 Bytes
/
Copy pathbootstrapR.sh
File metadata and controls
24 lines (17 loc) · 786 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash
# turn on logging and exit on error
set -e -x
BOOTSTRAP_BUCKET_NAME='<your-bucket-name>'
# grab packages from S3
hadoop dfs -copyToLocal s3n://${BOOTSTRAP_BUCKET_NAME}/R_packages/* .
DEB_HOST_ARCH=`dpkg-architecture -qDEB_HOST_ARCH`
#upgrade R
sudo dpkg -i r-base-core_2.15.2-1~squeezecran.0_${DEB_HOST_ARCH}.deb r-recommended_2.15.2-1~squeezecran.0_all.deb r-base_2.15.2-1~squeezecran.0_all.deb
#some packages have trouble installing without this link
sudo ln -s /usr/lib/libgfortran.so.3 /usr/lib/libgfortran.so
# for the package update script to run the user hadoop needs to own the R library
sudo chown -R hadoop /usr/lib/R/library
sudo chown -R hadoop /usr/local/lib/R
# install packages
R CMD INSTALL getopt_1.17.tar.gz
R CMD INSTALL HadoopStreaming_0.2.tar.gz