Skip to content

Commit a779840

Browse files
author
Alyssa Morrow
committed
mango docker now runs with nodejs 8.X and Spark 2.4.3
1 parent b3aa6f0 commit a779840

File tree

4 files changed

+24
-26
lines changed

4 files changed

+24
-26
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: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,18 @@ WORKDIR /home
1313
RUN git clone https://github.com/bigdatagenomics/mango.git
1414
ENV MAVEN_OPTS "-Xmx2g"
1515

16-
RUN apt-get update && apt-get install -y \
17-
unzip \
18-
npm \
19-
nodejs
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
2023

2124
# build mango
2225
WORKDIR /home/mango
26+
RUN git checkout c85b5d2178dbf7ec84cee20c56c57493524d510e # 0.0.3-SNAPSHOT
2327
RUN /opt/apache-maven-3.3.9/bin/mvn clean package -DskipTests
24-
RUN ls /home/mango/mango-cli/src/main/webapp/resources
25-
26-
# where is node_modules?
27-
RUN mkdir /home/mango/mango-assembly/target/test
28-
WORKDIR /home/mango/mango-assembly/target
29-
RUN unzip mango-assembly-0.0.3-SNAPSHOT.jar -d /home/mango/mango-assembly/target/test
30-
RUN ls test/resources/node_modules/pileup
3128

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

mango/runtime/Dockerfile

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ ENV SPARK_HOME /opt/cgl-docker-lib/apache-spark
1515

1616
# put mango jar on the pyspark path for packaging
1717
ENV ASSEMBLY_DIR /opt/cgl-docker-lib/mango/mango-assembly/target
18-
RUN ls /opt/cgl-docker-lib/mango/mango-cli/src/main/webapp/resources
1918

2019
ENV ASSEMBLY_JAR "$(ls -1 "$ASSEMBLY_DIR" | grep "^mango-assembly[0-9A-Za-z\_\.-]*\.jar$" | grep -v javadoc | grep -v sources || true)"
2120
ENV PYSPARK_SUBMIT_ARGS "--jars ${ASSEMBLY_DIR}/${ASSEMBLY_JAR} --driver-class-path ${ASSEMBLY_DIR}/${ASSEMBLY_JAR} pyspark-shell"
@@ -26,16 +25,22 @@ ENV PYTHONPATH ${SPARK_HOME}/python:${SPARK_HOME}/python/lib/py4j-0.10.4-src.zip
2625
#environment variables PYSPARK_PYTHON and PYSPARK_DRIVER_PYTHON
2726
ENV PYSPARK_PYTHON /usr/bin/python3
2827

29-
# Install make and pip/python dependencies
3028
RUN apt-get update && apt-get install -y \
31-
git \
32-
make \
33-
python3.5 \
34-
python3-pip \
35-
npm \
36-
nodejs \
37-
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
40+
3841

42+
# Install make and pip/python dependencies
43+
RUN apt-get install -y nodejs
3944

4045
# alias python to python3.6
4146
RUN alias pip=pip3
@@ -47,13 +52,9 @@ RUN echo '#!/bin/bash\npython3 "$@"' > /usr/bin/python && \
4752
RUN echo '#!/bin/bash\npip3 "$@"' > /usr/bin/pip && \
4853
chmod +x /usr/bin/pip
4954

50-
RUN pip
51-
RUN ln -s /usr/bin/nodejs /usr/bin/node
52-
5355
# set permissions for running npm. Required for mango-viz
5456
RUN npm config set bdgenomics.mango.pileup:unsafe-perm
5557

56-
5758
# prepare mango-viz and mango-python
5859
WORKDIR /opt/cgl-docker-lib/mango/mango-python
5960
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')

0 commit comments

Comments
 (0)