fix: skip --profile for remote profile; fixes podman-compose compat

podman-compose 1.0.6 has no --profile flag, causing a fatal parse error.
'remote' profile means base services only — no service in compose.yml is
tagged 'remote', so --profile remote was always a no-op with Docker too.
Introduce PROFILE_ARG that only adds --profile for cpu/gpu profiles where
it actually activates optional services.
This commit is contained in:
pyr0ball 2026-02-26 21:12:12 -08:00
parent 995e9f6aea
commit c88b25d1f8

View file

@ -35,6 +35,11 @@ else
endif
endif
# 'remote' means base services only — no services are tagged 'remote' in compose.yml,
# so --profile remote is a no-op with Docker and a fatal error on old podman-compose.
# Only pass --profile for profiles that actually activate optional services.
PROFILE_ARG := $(if $(filter remote,$(PROFILE)),,--profile $(PROFILE))
setup: ## Install dependencies (Docker or Podman + NVIDIA toolkit)
@bash setup.sh
@ -42,7 +47,7 @@ preflight: ## Check ports + system resources; write .env
@$(PYTHON) scripts/preflight.py
start: preflight ## Preflight check then start Peregrine (PROFILE=remote|cpu|single-gpu|dual-gpu)
$(COMPOSE) $(COMPOSE_FILES) --profile $(PROFILE) up -d
$(COMPOSE) $(COMPOSE_FILES) $(PROFILE_ARG) up -d
stop: ## Stop all Peregrine services
$(COMPOSE) down
@ -50,7 +55,7 @@ stop: ## Stop all Peregrine services
restart: ## Stop services, re-run preflight (ports now free), then start
$(COMPOSE) down
@$(PYTHON) scripts/preflight.py
$(COMPOSE) $(COMPOSE_FILES) --profile $(PROFILE) up -d
$(COMPOSE) $(COMPOSE_FILES) $(PROFILE_ARG) up -d
logs: ## Tail app logs
$(COMPOSE) logs -f app