-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
27 lines (18 loc) · 835 Bytes
/
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
FROM ubuntu:18.04
LABEL maintainer="[email protected]"
RUN apt update
RUN apt install -y default-jre wget bzip2 ca-certificates curl git iproute2 rsync
ADD spark-3.0.0-bin-hadoop2.7.tgz /usr/local/
RUN wget https://repo.anaconda.com/miniconda/Miniconda3-py37_4.8.2-Linux-x86_64.sh -O miniconda.sh && \
/bin/bash miniconda.sh -b -p /opt/conda
ENV PATH="/usr/local/spark-3.0.0-bin-hadoop2.7/bin:${PATH}"
ENV PATH="/usr/local/spark-3.0.0-bin-hadoop2.7/sbin:${PATH}"
ENV PATH="/opt/conda/bin:${PATH}"
COPY environment.yml .
RUN conda env create -f environment.yml
ENV PYSPARK_PYTHON="/opt/conda/envs/sparkenv/bin/python" \
PYSPARK_DRIVER_PYTHON="/opt/conda/envs/sparkenv/bin/ipython"
# Spark UI port
EXPOSE 7077 8080 4040 20000-60000
ADD hadoop-2.7.7 /usr/local/hadoop
ENV JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64