Skip to content

Commit 5e5fca8

Browse files
committed
Dockerfile
1 parent 6e4f26d commit 5e5fca8

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

Dockerfile

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
FROM fedora
2+
3+
### this dockerfile is build to run spark-perf.
4+
### adopted from https://github.com/fedora-cloud/Fedora-Dockerfiles
5+
### we additionally install python-pip and argparse for spark
6+
7+
RUN dnf -y update && dnf clean all
8+
RUN dnf -y install python-pip tar gzip
9+
RUN dnf -y install java java-devel
10+
RUN dnf -y install python && dnf clean all
11+
RUN easy_install argparse
12+
# set JAVA_HOME
13+
ENV JAVA_HOME /usr/lib/jvm/java-openjdk
14+
# set installed Maven version
15+
ENV MAVEN_VERSION 3.2.5
16+
# Download and install Maven
17+
RUN curl -sSL http://archive.apache.org/dist/maven/maven-3/$MAVEN_VERSION/binaries/apache-maven-$MAVEN_VERSION-bin.tar.gz | tar xzf - -C /usr/share \
18+
&& mv /usr/share/apache-maven-$MAVEN_VERSION /usr/share/maven \
19+
&& ln -s /usr/share/maven/bin/mvn /usr/bin/mvn
20+
21+
ENV M2_HOME /usr/share/maven
22+
23+
### Now we setup the spark-perf parts.
24+
RUN dnf install -y unzip git wget
25+
RUN mkdir -p /root/spark-ec2/
26+
RUN cd /opt/ && git clone https://github.com/paulp/sbt-extras.git && chmod 777 sbt-extras/*
27+
RUN ls -altrh /opt/sbt-extras/
28+
29+
RUN wget https://dl.bintray.com/sbt/native-packages/sbt/0.13.11/sbt-0.13.11.zip -O /opt/sbt.zip
30+
RUN cd /opt/ && unzip sbt.zip
31+
RUN ls -alrth /opt/sbt/bin/sbt-launch.jar
32+
RUN dnf install -y which
33+
34+
ADD . /opt/spark-perf/
35+
WORKDIR /opt/spark-perf/
36+
37+
CMD if [ -n "$SPARK_MASTER_URL" ]; then echo "FAILED! Missing spark master url" && exit 1 ; fi ; export PATH=$PATH:/opt/sbt-extras/ && echo $SPARK_MASTER_URL > /root/spark-ec2/cluster-url && ./bin/run

0 commit comments

Comments
 (0)