anchor.diff:  ARG TINI_VERSION=v0.18.0
   ARG JDK_VERSION=8u192
   ARG JDK_URL=your_jdk_url
  -ARG GITHUB_USERNAME=your_github_username
  -ARG GITHUB_TOKEN=your_github_token
  +ARG SPARK_JAR_REPO_URL=your_spark_jar_repo_url
   
   # stage.1 graphene
   FROM ubuntu:18.04 AS graphene
  
positive.code:     rm spark-${SPARK_VERSION}-bin-hadoop3.2.tgz && \
      cp spark-${SPARK_VERSION}/conf/log4j.properties.template spark-${SPARK_VERSION}/conf/log4j.properties && \
      echo $'\nlog4j.logger.io.netty=ERROR' >> spark-${SPARK_VERSION}/conf/log4j.properties && \
      mv spark-${SPARK_VERSION}/python/lib/pyspark.zip /opt/pyspark.zip && \
      mv spark-${SPARK_VERSION}/jars/spark-core_2.12-$SPARK_VERSION.jar /opt/spark-core_2.12-$SPARK_VERSION.jar && \
      mv spark-${SPARK_VERSION}/jars/spark-kubernetes_2.12-$SPARK_VERSION.jar /opt/spark-kubernetes_2.12-$SPARK_VERSION.jar && \
      mv spark-${SPARK_VERSION}/jars/spark-network-common_2.12-$SPARK_VERSION.jar /opt/spark-network-common_2.12-$SPARK_VERSION.jar && \
      mv spark-${SPARK_VERSION}/jars/hadoop-common-3.2.0.jar /opt/hadoop-common-3.2.0.jar && \
      mv spark-${SPARK_VERSION}/jars/hive-exec-2.3.7-core.jar /opt/hive-exec-2.3.7-core.jar && \
      ls /opt
  # spark modification
  RUN cd /opt && \
      git clone https://$GITHUB_USERNAME:$GITHUB_TOKEN@github.com/analytics-zoo/spark.git && \
      cd spark && \
      git checkout branch-3.1.2 && \
      git status && \
      export MAVEN_OPTS="-Xmx2g -XX:ReservedCodeCacheSize=512m \
          -Dhttp.proxyHost=$HTTP_PROXY_HOST \
          -Dhttp.proxyPort=$HTTP_PROXY_PORT \
          -Dhttps.proxyHost=$HTTPS_PROXY_HOST \
          -Dhttps.proxyPort=$HTTPS_PROXY_PORT" && \
      /opt/apache-maven-3.6.3/bin/mvn -T 16 -DskipTests=true clean install -pl core && \
      cd /opt/spark/resource-managers/kubernetes/core && \
      /opt/apache-maven-3.6.3/bin/mvn -T 16 -DskipTests=true clean package && \
      cd /opt/spark/common/network-common && \
      /opt/apache-maven-3.6.3/bin/mvn -T 16 -DskipTests=true clean package && \
      cd /opt/spark/python && \
      zip -r lib/pyspark.zip pyspark && \
      mv /opt/spark/core/target/spark-core_2.12-$SPARK_VERSION.jar  /opt/spark-${SPARK_VERSION}/jars/spark-core_2.12-$SPARK_VERSION.jar && \
      mv /opt/spark/resource-managers/kubernetes/core/target/spark-kubernetes_2.12-$SPARK_VERSION.jar /opt/spark-${SPARK_VERSION}/jars/spark-kubernetes_2.12-$SPARK_VERSION.jar && \
      mv /opt/spark/common/network-common/target/spark-network-common_2.12-$SPARK_VERSION.jar /opt/spark-${SPARK_VERSION}/jars/spark-network-common_2.12-$SPARK_VERSION.jar && \
      mv /opt/spark/python/lib/pyspark.zip /opt/spark-${SPARK_VERSION}/python/lib/pyspark.zip
  # hadoop
  RUN cd /opt && \
      apt-get install -y build-essential && \
  
negative.code:     chmod a+x /ppml/trusted-big-data-ml/work/start-scripts/start-spark-local-xgboost-regressor-sgx.sh && \
      chmod a+x /ppml/trusted-big-data-ml/work/start-scripts/start-spark-local-xgboost-classifier-sgx.sh && \
      chmod a+x /ppml/trusted-big-data-ml/work/start-scripts/start-spark-local-orca-data-sgx.sh && \
      chmod a+x /ppml/trusted-big-data-ml/work/start-scripts/start-spark-local-orca-tf-text.sh && \
      chmod a+x /ppml/trusted-big-data-ml/work/test-suits/pyspark-e2e-example.sh && \
      chmod a+x /ppml/trusted-big-data-ml/work/test-suits/pyspark-simple-examples.sh && \
      chmod a+x /ppml/trusted-big-data-ml/work/test-suits/pyspark-sql-api-examples.sh && \
      chmod a+x /ppml/trusted-big-data-ml/work/test-suits/pyspark-sql-examples.sh
  
  # kuberenetes support
  ADD ./spark-executor-template.yaml /ppml/trusted-big-data-ml/spark-executor-template.yaml
  