Skip to content

Instantly share code, notes, and snippets.

View liyinan926's full-sized avatar

Yinan Li liyinan926

View GitHub Profile
--conf spark.hadoop.fs.gs.project.id=<GCP project ID>
--conf spark.hadoop.fs.gs.system.bucket=<GCP bucket to use for temporary data>
--conf spark.hadoop.agoogle.cloud.auth.service.account.enable=true
--conf spark.hadoop.google.cloud.auth.service.account.json.keyfile=/mnt/secrets/key.json
FROM gcr.io/ynli-k8s/spark:v2.3.0
RUN rm $SPARK_HOME/jars/guava-14.0.1.jar
ADD http://central.maven.org/maven2/com/google/guava/guava/23.0/guava-23.0.jar $SPARK_HOME/jars
ADD https://storage.googleapis.com/hadoop-lib/gcs/gcs-connector-latest-hadoop2.jar $SPARK_HOME/jars
RUN mkdir -p /opt/hadoop/conf
COPY conf/core-site.xml /opt/hadoop/conf
COPY conf/spark-env.sh $SPARK_HOME/conf
ENTRYPOINT [ "/opt/entrypoint.sh" ]