@@ -6,13 +6,16 @@ MAINTAINER Alyssa Morrow, akmorrow@berkeley.edu
66RUN mkdir /opt/cgl-docker-lib
77COPY mango /opt/cgl-docker-lib/mango
88
9+ WORKDIR /opt/cgl-docker-lib/mango
10+
911# copy spark
1012COPY apache-spark /opt/cgl-docker-lib/apache-spark
1113
1214ENV SPARK_HOME /opt/cgl-docker-lib/apache-spark
1315
1416# put mango jar on the pyspark path for packaging
1517ENV ASSEMBLY_DIR /opt/cgl-docker-lib/mango/mango-assembly/target
18+
1619ENV ASSEMBLY_JAR "$(ls -1 " $ASSEMBLY_DIR" | grep " ^mango-assembly[0-9A-Za-z\_\. -]*\. jar$" | grep -v javadoc | grep -v sources || true)"
1720ENV 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
2326ENV PYSPARK_PYTHON /usr/bin/python3
2427
25- # Install make and pip/python dependencies
2628RUN 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
3746RUN alias pip=pip3
3847RUN alias python=python3
@@ -43,13 +52,9 @@ RUN echo '#!/bin/bash\npython3 "$@"' > /usr/bin/python && \
4352RUN echo '#!/bin/bash\n pip3 "$@"' > /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
5056RUN npm config set bdgenomics.mango.pileup:unsafe-perm
5157
52-
5358# prepare mango-viz and mango-python
5459WORKDIR /opt/cgl-docker-lib/mango/mango-python
5560RUN make prepare && make develop
0 commit comments