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