APPTAINER ?= singularity OVERLAY_DIR ?= ./overlay NUM_THREADS ?= $(shell grep -c processor /proc/cpuinfo) UID := $(shell id -u) .DEFAULT_GOAL := mobileinsight.sif mobileinsight.sif: mobileinsight.def "$(APPTAINER)" build --build-arg="NUM_THREADS=$(NUM_THREADS)" "$@" "$<" run: mobileinsight.sif @mkdir -p "$(OVERLAY_DIR)" @lsmod | grep overlay > /dev/null || sudo modprobe overlay @$(APPTAINER) run --overlay "$(OVERLAY_DIR)" \ -B "/run/user/$(UID)" mobileinsight.sif clean: rm -f mobileinsight.sif $(OVERLAY_DIR) .PHONY: run clean