You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
FEATURE_REQUEST: services[].profiles in stacker.yml schema (compose profiles passthrough) #300
stacker.yml's services: schema has no profiles field, so profile gating
is lost when Stacker generates .stacker/docker-compose.yml. Services that
upstream compose treats as optional variants (e.g. GPU builds) always end up
in the generated compose and are always started — which breaks deploys on
hosts where those variants cannot run.
Background
Docker Compose profiles mark services as opt-in:
services:
ollama-cpu: # no profiles -> starts by defaultimage: ollama/ollama:0.40.4ollama-gpu-amd:
image: ollama/ollama:0.40.4-rocmprofiles: [gpu-amd] # started only with COMPOSE_PROFILES=gpu-amddevices: [/dev/kfd, /dev/dri]
Upstream coleam00/local-ai-packaged uses exactly this to ship three Ollama
variants (cpu / gpu-nvidia / gpu-amd) in one compose file.
Motivating failure
Deploying the local-ai-packaged stack to a CPU-only host aborts the whole docker compose up:
Error response from daemon: error gathering device information while adding
custom device "/dev/kfd": no such file or directory
One service (ollama-gpu-amd) failing on a missing device kills the entire
compose up — half the containers stay Created, the deployment is marked paused [local_exec_provisioner_error] (cloud path) or paused [internal_error] (server path). Seen in deployments #1382, #1383, #1385
(2026-10-16 / 2026-10-19). COMPOSE_PROFILES= in .env cannot help because
the generated compose contains no profiles: keys to activate.
Proposal
Add profiles to the stacker.yml service schema and pass it through:
ComposeService already has user (and shm_size) but ServiceDefinition
cannot express them, so services[].user: root (e.g. the surrealdb volume
ownership workaround in open-notebook) is likewise impossible from
stacker.yml. Worth adding in the same pass.
Workarounds today
None inside the schema. Templates must either drop optional variants
(feature loss) or replace devices: with privileged: true (broader device
access than intended).
Update (2026-10-19): profiles already landed — this request is resolved
Closing the loop for future readers:
services[].profiles support merged in PR Feature/service runtime fields #288 (dev, 2026-10-15) and
reached main via Dev #298 (2026-10-19). Both the parser
(ServiceDefinition.profiles) and the compose generator emit it.
The motivating local-ai-packaged template already declares profiles: [gpu-amd] / [gpu-nvidia] on the Ollama GPU variants.
The CPU-host failures (/dev/kfd aborting the whole docker compose up,
deployments #1382/#1383/#1385 in the templates repo) were caused by
deploying with a pre-Feature/service runtime fields #288 CLI build that silently dropped the unknown profiles key, which made the GPU variant start unconditionally. The
baked snapshot from 2026-10-15 was produced with the same old code and
likely carries the same problem.
Activity
vsilent commentedon Oct 19, 2026
Update (2026-10-19): profiles already landed — this request is resolved
Closing the loop for future readers:
services[].profilessupport merged in PR Feature/service runtime fields #288 (dev, 2026-10-15) andreached
mainvia Dev #298 (2026-10-19). Both the parser(
ServiceDefinition.profiles) and the compose generator emit it.profiles: [gpu-amd]/[gpu-nvidia]on the Ollama GPU variants./dev/kfdaborting the wholedocker compose up,deployments #1382/#1383/#1385 in the templates repo) were caused by
deploying with a pre-Feature/service runtime fields #288 CLI build that silently dropped the unknown
profileskey, which made the GPU variant start unconditionally. Thebaked snapshot from 2026-10-15 was produced with the same old code and
likely carries the same problem.
Still open (split into separate tickets)
services[].userandservices[].shm_size— the compose generator(
ComposeService) already supports both, but the stacker.yml schemacannot express them (e.g.
user: rootneeded for root-owned volumeworkarounds). → FEATURE_REQUEST: services[].user and services[].shm_size in stacker.yml schema #302
services[]are ignored silently — that is exactly howprofilesdisappeared without an error. At minimum this needs a warning.→ FEATURE_REQUEST: warn on unknown keys in services[] (silent config drops) #303