-
Notifications
You must be signed in to change notification settings - Fork 122
/
Dockerfile
68 lines (64 loc) · 2.13 KB
/
Dockerfile
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
59
60
61
62
63
64
65
66
67
68
FROM gettyimages/spark:2.2.0-hadoop-2.7
# SciPy
RUN set -ex \
&& buildDeps=' \
libpython3-dev \
build-essential \
pkg-config \
gfortran \
' \
&& apt-get update && apt-get install -y --no-install-recommends \
$buildDeps \
ca-certificates \
wget \
liblapack-dev \
libopenblas-dev \
&& packages=' \
numpy \
pandasql \
scipy \
' \
&& pip3 install $packages \
&& rm -rf /root/.cache/pip \
&& apt-get purge -y --auto-remove $buildDeps \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Zeppelin
ENV ZEPPELIN_PORT 8080
ENV ZEPPELIN_HOME /usr/zeppelin
ENV ZEPPELIN_CONF_DIR $ZEPPELIN_HOME/conf
ENV ZEPPELIN_NOTEBOOK_DIR $ZEPPELIN_HOME/notebook
ENV ZEPPELIN_COMMIT v0.7.3
RUN echo '{ "allow_root": true }' > /root/.bowerrc
RUN set -ex \
&& buildDeps=' \
git \
bzip2 \
npm \
' \
&& apt-get update && apt-get install -y --no-install-recommends $buildDeps \
&& curl -sL http://archive.apache.org/dist/maven/maven-3/3.5.0/binaries/apache-maven-3.5.0-bin.tar.gz \
| gunzip \
| tar x -C /tmp/ \
&& git clone https://github.com/apache/zeppelin.git /usr/src/zeppelin \
&& cd /usr/src/zeppelin \
&& git checkout -q $ZEPPELIN_COMMIT \
&& dev/change_scala_version.sh "2.11" \
&& MAVEN_OPTS="-Xmx2g -XX:MaxPermSize=1024m" /tmp/apache-maven-3.5.0/bin/mvn --batch-mode package -DskipTests -Pscala-2.11 -Pbuild-distr \
-pl 'zeppelin-interpreter,zeppelin-zengine,zeppelin-display,spark-dependencies,spark,markdown,angular,shell,hbase,postgresql,jdbc,python,elasticsearch,zeppelin-web,zeppelin-server,zeppelin-distribution' \
&& tar xvf /usr/src/zeppelin/zeppelin-distribution/target/zeppelin*.tar.gz -C /usr/ \
&& mv /usr/zeppelin* $ZEPPELIN_HOME \
&& mkdir -p $ZEPPELIN_HOME/logs \
&& mkdir -p $ZEPPELIN_HOME/run \
&& apt-get purge -y --auto-remove $buildDeps \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /usr/src/zeppelin \
&& rm -rf /root/.m2 \
&& rm -rf /root/.npm \
&& rm -rf /root/.cache/bower \
&& rm -rf /tmp/*
RUN ln -s /usr/bin/pip3 /usr/bin/pip \
&& ln -s /usr/bin/python3 /usr/bin/python
ADD about.json $ZEPPELIN_NOTEBOOK_DIR/2BTRWA9EV/note.json
WORKDIR $ZEPPELIN_HOME
CMD ["bin/zeppelin.sh"]