feat: inject DUAL_GPU_MODE sub-profile in Makefile; update manage.sh help
This commit is contained in:
parent
d626b20470
commit
889c55702e
2 changed files with 8 additions and 1 deletions
4
Makefile
4
Makefile
|
|
@ -23,6 +23,7 @@ COMPOSE ?= $(shell \
|
||||||
# compose.override.yml. We must include it explicitly when present.
|
# compose.override.yml. We must include it explicitly when present.
|
||||||
OVERRIDE_FILE := $(wildcard compose.override.yml)
|
OVERRIDE_FILE := $(wildcard compose.override.yml)
|
||||||
COMPOSE_OVERRIDE := $(if $(OVERRIDE_FILE),-f 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)
|
COMPOSE_FILES := -f compose.yml $(COMPOSE_OVERRIDE)
|
||||||
ifneq (,$(findstring podman,$(COMPOSE)))
|
ifneq (,$(findstring podman,$(COMPOSE)))
|
||||||
|
|
@ -34,6 +35,9 @@ else
|
||||||
COMPOSE_FILES := -f compose.yml $(COMPOSE_OVERRIDE) -f compose.gpu.yml
|
COMPOSE_FILES := -f compose.yml $(COMPOSE_OVERRIDE) -f compose.gpu.yml
|
||||||
endif
|
endif
|
||||||
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,
|
# '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.
|
# so --profile remote is a no-op with Docker and a fatal error on old podman-compose.
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,10 @@ usage() {
|
||||||
echo " remote API-only, no local inference (default)"
|
echo " remote API-only, no local inference (default)"
|
||||||
echo " cpu Local Ollama inference on CPU"
|
echo " cpu Local Ollama inference on CPU"
|
||||||
echo " single-gpu Ollama + Vision on GPU 0"
|
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 ""
|
||||||
echo " Examples:"
|
echo " Examples:"
|
||||||
echo " ./manage.sh start"
|
echo " ./manage.sh start"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue