mobileinsight-apptainer/Makefile

24 lines
570 B
Makefile
Raw Normal View History

APPTAINER ?= singularity
2024-04-21 01:22:06 +00:00
OVERLAY_DIR ?= ./overlay
NUM_THREADS ?= $(shell grep -c processor /proc/cpuinfo)
2024-04-21 01:22:06 +00:00
UID := $(shell id -u)
.DEFAULT_GOAL := mobileinsight.sif
2024-04-21 01:22:06 +00:00
mobileinsight.sif: mobileinsight.def
"$(APPTAINER)" build --build-arg="NUM_THREADS=$(NUM_THREADS)" "$@" "$<"
2024-04-21 01:22:06 +00:00
2024-04-30 00:52:17 +00:00
prepare:
2024-04-21 01:22:06 +00:00
@mkdir -p "$(OVERLAY_DIR)"
@lsmod | grep overlay > /dev/null || sudo modprobe overlay
2024-04-30 00:52:17 +00:00
run: mobileinsight.sif prepare
2024-04-21 01:22:06 +00:00
@$(APPTAINER) run --overlay "$(OVERLAY_DIR)" \
-B "/run/user/$(UID)" mobileinsight.sif
clean:
2024-04-30 00:52:17 +00:00
rm -rf *.sif $(OVERLAY_DIR)
2024-04-21 01:22:06 +00:00
2024-04-30 00:52:17 +00:00
.PHONY: prepare run run-spark clean