Skip to content

Commit bf75eae

Browse files
authored
Merge pull request #292 from akmorrow13/spark_2.4.3
Update Mango to Spark 2.4.3
2 parents c1641aa + a779840 commit bf75eae

File tree

5 files changed

+30
-17
lines changed

5 files changed

+30
-17
lines changed

mango/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ build_tool = runtime-container.DONE
77
build_number ?= none
88
git_commit ?= $(shell git log --pretty=oneline -n 1 -- ../mango | cut -f1 -d " ")
99
name = quay.io/ucsc_cgl/mango
10-
tag = 0.0.1--${git_commit}
10+
tag = 0.0.3--${git_commit}
1111

1212

1313
# Steps

mango/build/Dockerfile

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,18 @@ WORKDIR /home
1313
RUN git clone https://github.com/bigdatagenomics/mango.git
1414
ENV MAVEN_OPTS "-Xmx2g"
1515

16+
# install curl to get nodejs script
17+
RUN apt-get update && apt-get install -y curl
18+
19+
# get nodejs v6.X
20+
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash -
21+
22+
RUN apt-get install -y nodejs
23+
1624
# build mango
1725
WORKDIR /home/mango
18-
19-
RUN /opt/apache-maven-3.3.9/bin/mvn package -DskipTests
26+
RUN git checkout c85b5d2178dbf7ec84cee20c56c57493524d510e # 0.0.3-SNAPSHOT
27+
RUN /opt/apache-maven-3.3.9/bin/mvn clean package -DskipTests
2028

2129
# remove git libraries to avoid permission errors when copying
2230
RUN rm -rf /home/mango/.git

mango/runtime/Dockerfile

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,16 @@ MAINTAINER Alyssa Morrow, akmorrow@berkeley.edu
66
RUN mkdir /opt/cgl-docker-lib
77
COPY mango /opt/cgl-docker-lib/mango
88

9+
WORKDIR /opt/cgl-docker-lib/mango
10+
911
# copy spark
1012
COPY apache-spark /opt/cgl-docker-lib/apache-spark
1113

1214
ENV SPARK_HOME /opt/cgl-docker-lib/apache-spark
1315

1416
# put mango jar on the pyspark path for packaging
1517
ENV ASSEMBLY_DIR /opt/cgl-docker-lib/mango/mango-assembly/target
18+
1619
ENV ASSEMBLY_JAR "$(ls -1 "$ASSEMBLY_DIR" | grep "^mango-assembly[0-9A-Za-z\_\.-]*\.jar$" | grep -v javadoc | grep -v sources || true)"
1720
ENV PYSPARK_SUBMIT_ARGS "--jars ${ASSEMBLY_DIR}/${ASSEMBLY_JAR} --driver-class-path ${ASSEMBLY_DIR}/${ASSEMBLY_JAR} pyspark-shell"
1821

@@ -22,17 +25,23 @@ ENV PYTHONPATH ${SPARK_HOME}/python:${SPARK_HOME}/python/lib/py4j-0.10.4-src.zip
2225
#environment variables PYSPARK_PYTHON and PYSPARK_DRIVER_PYTHON
2326
ENV PYSPARK_PYTHON /usr/bin/python3
2427

25-
# Install make and pip/python dependencies
2628
RUN apt-get update && apt-get install -y \
27-
git \
28-
make \
29-
python3.5 \
30-
python3-pip \
31-
npm \
32-
nodejs \
33-
python-tk
29+
git \
30+
make \
31+
python3.5 \
32+
python3-pip \
33+
python-tk \
34+
curl
35+
36+
# get nodejs v8.X
37+
RUN apt-cache policy nodejs
38+
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash -
39+
RUN apt-cache policy nodejs
3440

3541

42+
# Install make and pip/python dependencies
43+
RUN apt-get install -y nodejs
44+
3645
# alias python to python3.6
3746
RUN alias pip=pip3
3847
RUN alias python=python3
@@ -43,13 +52,9 @@ RUN echo '#!/bin/bash\npython3 "$@"' > /usr/bin/python && \
4352
RUN echo '#!/bin/bash\npip3 "$@"' > /usr/bin/pip && \
4453
chmod +x /usr/bin/pip
4554

46-
RUN pip
47-
RUN ln -s /usr/bin/nodejs /usr/bin/node
48-
4955
# set permissions for running npm. Required for mango-viz
5056
RUN npm config set bdgenomics.mango.pileup:unsafe-perm
5157

52-
5358
# prepare mango-viz and mango-python
5459
WORKDIR /opt/cgl-docker-lib/mango/mango-python
5560
RUN make prepare && make develop

mango/test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class TestMango(unittest.TestCase):
1010
def test_docker_call_browser(self):
1111
out, err = check_docker_output(tool='quay.io/ucsc_cgl/mango')
1212
self.assertTrue('Using spark-submit=' in out)
13-
self.assertTrue('Argument "reference" is required' in out)
13+
self.assertTrue('Argument "genome" is required' in out)
1414

1515
def test_docker_call_notebook(self):
1616
out, err = check_docker_output(tool='--entrypoint=/opt/cgl-docker-lib/mango/bin/mango-notebook quay.io/ucsc_cgl/mango')

spark-and-maven/build/download.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ mirror=$(python -c "from urllib2 import urlopen; import json; print json.load( u
77

88
# pull down spark
99
mkdir /opt/apache-spark
10-
curl ${mirror}spark/spark-2.3.2/spark-2.3.2-bin-hadoop2.7.tgz \
10+
curl ${mirror}spark/spark-2.4.3/spark-2.4.3-bin-hadoop2.7.tgz \
1111
| tar --strip-components=1 -xzC /opt/apache-spark
1212

1313
# we rely on apache maven > 3.1.1 to build ADAM, so we can't use the

0 commit comments

Comments
 (0)