Compare commits
No commits in common. "cdd99b3280d8533eeea358a5e56d45811bf3fa68" and "424d294997d99ec01fa1b929d695216b1194e423" have entirely different histories.
cdd99b3280
...
424d294997
15
Makefile
15
Makefile
|
@ -9,22 +9,13 @@ UID := $(shell id -u)
|
||||||
mobileinsight.sif: mobileinsight.def
|
mobileinsight.sif: mobileinsight.def
|
||||||
"$(APPTAINER)" build --build-arg="NUM_THREADS=$(NUM_THREADS)" "$@" "$<"
|
"$(APPTAINER)" build --build-arg="NUM_THREADS=$(NUM_THREADS)" "$@" "$<"
|
||||||
|
|
||||||
mobileinsight-spark.sif: with-spark.def mobileinsight.sif
|
run: mobileinsight.sif
|
||||||
"$(APPTAINER)" build "$@" "$<"
|
|
||||||
|
|
||||||
prepare:
|
|
||||||
@mkdir -p "$(OVERLAY_DIR)"
|
@mkdir -p "$(OVERLAY_DIR)"
|
||||||
@lsmod | grep overlay > /dev/null || sudo modprobe overlay
|
@lsmod | grep overlay > /dev/null || sudo modprobe overlay
|
||||||
|
|
||||||
run: mobileinsight.sif prepare
|
|
||||||
@$(APPTAINER) run --overlay "$(OVERLAY_DIR)" \
|
@$(APPTAINER) run --overlay "$(OVERLAY_DIR)" \
|
||||||
-B "/run/user/$(UID)" mobileinsight.sif
|
-B "/run/user/$(UID)" mobileinsight.sif
|
||||||
|
|
||||||
run-spark: mobileinsight-spark.sif prepare
|
|
||||||
@$(APPTAINER) run --overlay "$(OVERLAY_DIR)" \
|
|
||||||
-B "/run/user/$(UID)" mobileinsight-spark.sif
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf *.sif $(OVERLAY_DIR)
|
rm -f mobileinsight.sif $(OVERLAY_DIR)
|
||||||
|
|
||||||
.PHONY: prepare run run-spark clean
|
.PHONY: run clean
|
||||||
|
|
|
@ -29,11 +29,6 @@ $ ./mobileinsight.sif python3 "$PYTHON_ARGS"
|
||||||
|
|
||||||
# Start a bash shell inside the container
|
# Start a bash shell inside the container
|
||||||
$ ./mobileinsight.sif bash
|
$ ./mobileinsight.sif bash
|
||||||
|
|
||||||
# Only available in spark version
|
|
||||||
#
|
|
||||||
# Start a pyspark interpreter
|
|
||||||
$ ./mobileinsight-spark.sif pyspark
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Examples are stored in /opt/mobileinsight-examples.
|
Examples are stored in /opt/mobileinsight-examples.
|
||||||
|
@ -41,6 +36,4 @@ Examples are stored in /opt/mobileinsight-examples.
|
||||||
Build
|
Build
|
||||||
-----
|
-----
|
||||||
|
|
||||||
Run `make mobileinsight.sif` or `make mobileinsight-spark.sif` to build the
|
Run `make mobileinsight.sif` to build the apptainer image.
|
||||||
corresponding apptainer image. The spark version includes both `mobileinsight`
|
|
||||||
along with `pyspark` for distributed log processing.
|
|
||||||
|
|
|
@ -19,7 +19,6 @@ From: ubuntu:22.04
|
||||||
git \
|
git \
|
||||||
python3 \
|
python3 \
|
||||||
python3-pip \
|
python3-pip \
|
||||||
python3-venv \
|
|
||||||
python3-wxgtk4.0 \
|
python3-wxgtk4.0 \
|
||||||
python3-matplotlib \
|
python3-matplotlib \
|
||||||
cmake \
|
cmake \
|
||||||
|
|
|
@ -1,32 +0,0 @@
|
||||||
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_HOME="/opt/spark"
|
|
||||||
export PATH="/opt/spark/sbin:/opt/spark/bin:$PATH"
|
|
||||||
export PYSPARK_PYTHON="/usr/bin/python3"
|
|
||||||
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
|
|
||||||
|
|
||||||
# Download Spark
|
|
||||||
SPARK_TGZ="/build/$(basename "{{ SPARK_URL }}")"
|
|
||||||
cd /build
|
|
||||||
wget "{{ SPARK_URL }}" -nv -O "$SPARK_TGZ"
|
|
||||||
tar -xf "$SPARK_TGZ"
|
|
||||||
mv "$(echo $SPARK_TGZ | sed 's/\.tgz$//')" /opt/spark
|
|
||||||
|
|
||||||
# Cleanup
|
|
||||||
apt-get autoclean -y
|
|
||||||
rm -rf /build
|
|
Loading…
Reference in New Issue