Skip to content
This repository has been archived by the owner on Oct 16, 2023. It is now read-only.

Commit

Permalink
docker for pyspark and quickstart
Browse files Browse the repository at this point in the history
  • Loading branch information
m316257 committed Feb 20, 2019
1 parent 460e1f0 commit c1234a5
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 1 deletion.
26 changes: 26 additions & 0 deletions python-api/docker/Dockerfile.quickstart.pyspark
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
FROM gaffer-quickstart-base

WORKDIR /usr/gaffer

RUN curl -L -O https://repo.anaconda.com/archive/Anaconda3-2018.12-Linux-x86_64.sh

RUN yum -y install bzip2

RUN chmod u+x Anaconda3-2018.12-Linux-x86_64.sh

RUN /bin/bash Anaconda3-2018.12-Linux-x86_64.sh -b -p /usr/gaffer/anaconda3

RUN curl -L -O https://archive.apache.org/dist/spark/spark-2.2.1/spark-2.2.1-bin-hadoop2.7.tgz

RUN tar -xvf spark-2.2.1-bin-hadoop2.7.tgz

ENV ANACONDA_HOME="/usr/gaffer/anaconda3"
ENV SPARK_HOME="/usr/gaffer/spark-2.2.1-bin-hadoop2.7"
ENV PYSPARK_DRIVER_PYTHON=jupyter
ENV PYSPARK_DRIVER_PYTHON_OPTS='notebook --ip 0.0.0.0 --no-browser --allow-root'
ENV PATH=$ANACONDA_HOME/bin:$SPARK_HOME/bin:$ANACONDA_HOME/lib/:$PATH

COPY gafferpy-build-1.7.1-SNAPSHOT-jar-with-dependencies.jar gafferpy-build-1.7.1-SNAPSHOT-jar-with-dependencies.jar
COPY gafferpy-build-1.7.1-SNAPSHOT-python-modules.zip gafferpy-build-1.7.1-SNAPSHOT-python-modules.zip

CMD $GAFFER_HOME/bin/startup.sh --schema $SCHEMA --graphconfig $GRAPHCONFIG --storeproperties $STOREPROPERTIES --ui-config $UICONFIG ; pyspark --jars gafferpy-build-1.7.1-SNAPSHOT-jar-with-dependencies.jar --py-files gafferpy-build-1.7.1-SNAPSHOT-python-modules.zip --packages graphframes:graphframes:0.6.0-spark2.3-s_2.11
8 changes: 8 additions & 0 deletions python-api/docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: "3"

services:
gaffer-quickstart:
image: "gaffer-quickstart-pyspark"
ports:
- "8085:8085"
- "8888:8888"
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@

public class PysparkDataframeSerialiser implements Converter<Element, Map<String, DataType>> {


@Override
public Map<String, DataType> convert(final Element element) {
return null;
Expand Down

0 comments on commit c1234a5

Please sign in to comment.