-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathSingularity.2.2.1-hadoop-2.7-r-3.4.3
58 lines (47 loc) · 1.34 KB
/
Singularity.2.2.1-hadoop-2.7-r-3.4.3
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
BootStrap: shub
From: nickjer/singularity-rstudio:3.4.3
%labels
Maintainer Jeremy Nicklas
Spark_Version 2.2.1
Hadoop_Version 2.7
%help
This will run Apache Spark with an RStudio Server base
%apprun spark-class
exec spark-class "${@}"
%apprun spark-master
exec spark-class "org.apache.spark.deploy.master.Master" "${@}"
%apprun spark-worker
exec spark-class "org.apache.spark.deploy.worker.Worker" "${@}"
%runscript
exec spark-class "${@}"
%environment
export SPARK_HOME=/opt/spark
export PATH=${SPARK_HOME}/bin:${PATH}
%post
# Software versions
export SPARK_VERSION=2.2.1
export HADOOP_VERSION=2.7
# Install Spark
apt-get update
apt-get install -y --no-install-recommends \
openjdk-8-jre
mkdir -p /opt/spark
wget \
--no-verbose \
-O - \
"http://mirror.cc.columbia.edu/pub/software/apache/spark/spark-${SPARK_VERSION}/spark-${SPARK_VERSION}-bin-hadoop${HADOOP_VERSION}.tgz" \
| tar xz --strip-components=1 -C /opt/spark
# Install sparklyr: R interface for Apache Spark
Rscript -e " \
withCallingHandlers( \
install.packages( \
c('tidyverse','sparklyr'), \
lib='/usr/local/lib/R/site-library', \
repo = 'https://cran.rstudio.com/', \
clean = TRUE \
), \
warning = function(w) stop(w) \
) \
"
# Clean up
rm -rf /var/lib/apt/lists/*