From 6febea216ea5f8176e7d044a4d8cfff185fbc47a Mon Sep 17 00:00:00 2001 From: pyr0ball Date: Fri, 27 Feb 2026 06:18:34 -0800 Subject: [PATCH] feat: inject DUAL_GPU_MODE sub-profile in Makefile; update manage.sh help --- Makefile | 4 ++++ manage.sh | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index b606fb9..efa8502 100644 --- a/Makefile +++ b/Makefile @@ -23,6 +23,7 @@ COMPOSE ?= $(shell \ # compose.override.yml. We must include it explicitly when present. OVERRIDE_FILE := $(wildcard compose.override.yml) COMPOSE_OVERRIDE := $(if $(OVERRIDE_FILE),-f compose.override.yml,) +DUAL_GPU_MODE ?= $(shell grep -m1 '^DUAL_GPU_MODE=' .env 2>/dev/null | cut -d= -f2 || echo ollama) COMPOSE_FILES := -f compose.yml $(COMPOSE_OVERRIDE) ifneq (,$(findstring podman,$(COMPOSE))) @@ -34,6 +35,9 @@ else COMPOSE_FILES := -f compose.yml $(COMPOSE_OVERRIDE) -f compose.gpu.yml endif endif +ifeq ($(PROFILE),dual-gpu) + COMPOSE_FILES += --profile dual-gpu-$(DUAL_GPU_MODE) +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. diff --git a/manage.sh b/manage.sh index 1d2ee5e..3e24197 100755 --- a/manage.sh +++ b/manage.sh @@ -42,7 +42,10 @@ usage() { echo " remote API-only, no local inference (default)" echo " cpu Local Ollama inference on CPU" echo " single-gpu Ollama + Vision on GPU 0" - echo " dual-gpu Ollama + Vision + vLLM on GPU 0+1" + echo " dual-gpu Ollama + Vision on GPU 0; GPU 1 set by DUAL_GPU_MODE" + echo " DUAL_GPU_MODE=ollama (default) ollama_research on GPU 1" + echo " DUAL_GPU_MODE=vllm vllm on GPU 1" + echo " DUAL_GPU_MODE=mixed both on GPU 1 (VRAM-split)" echo "" echo " Examples:" echo " ./manage.sh start"