feat: inject DUAL_GPU_MODE sub-profile in Makefile; update manage.sh help

This commit is contained in:
pyr0ball 2026-02-27 06:18:34 -08:00
parent d626b20470
commit 889c55702e
2 changed files with 8 additions and 1 deletions

View file

@ -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.

View file

@ -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"