Bootstrap: localimage
From: mobileinsight.sif

%arguments
    SPARK_URL="https://dlcdn.apache.org/spark/spark-3.5.1/spark-3.5.1-bin-hadoop3.tgz"

%environment
    export SPARK_LOCAL_IP="127.0.0.1"

%post
    # Update and install dependencies
    mkdir -p /build
    export DEBIAN_FRONTEND=noninteractive
    apt-get update
    apt-get upgrade -y
    apt-get install -y \
        openjdk-8-jre-headless \
        scala
    pip3 install pyspark==3.5.1

    # Cleanup
    apt-get autoclean -y
