# The LOCAL-ONLY demo overlay (demo epic D5). `./docker/demo.sh up` applies it; # by hand: # # docker compose -p archilyzer-demo --env-file .env.demo \ # -f docker-compose.yml -f docker-compose.demo.yml [-f docker-compose.ollama-vulkan.yml] \ # --profile umtool --profile ollama up -d # # What it changes, and nothing else: # # * The editor runs LOCAL ONLY (ARCHILYZER_LOCAL_ONLY=1, # common/lib/llm/localOnly.ts LOCAL_ONLY_CLAIM): it refuses, before any # request or process, the Claude API, Claude Code answers, the digest's # `claude` lane, ollama cloud models, and every model server that is not # loopback or `ollama` — the compose service, the one name # ARCHILYZER_LOCAL_MODEL_HOSTS allows. umtool makes no model call itself # (it asks the editor); it carries the same variables only so nothing it # starts could differ. The anthropic overlay is never part of this stack, # so there is no API key in it either. `archilyzer gen local-check` checks # it afterwards. # * The published archive DEMO_ARCHIVE is the connected source # (TRANSCRIPT_SITE_URL: offered by umtool's Source chip and the editor with # nothing written; a sweep over it cites it). # * The apps reach the `ollama` service (profile `ollama`), which runs with # bounds: one request and one model at a time, no cloud models, a capped # prompt cache and a memory limit with no swap beyond it. # # Nothing here publishes a port or changes a bind: Caddy stays the only front # door, on 127.0.0.1 (demo.sh exports 127.0.0.1 for every *_BIND and refuses # any other), and the exposure guard judges the binds compose publishes on # (docker-compose.yml hands caddy the same interpolated values). services: editor: environment: ARCHILYZER_LOCAL_ONLY: "1" # "Local" is loopback, or this — the compose ollama service's name on the # stack's own network. Nothing else a model is asked from is allowed. ARCHILYZER_LOCAL_MODEL_HOSTS: ollama TRANSCRIPT_SITE_URL: ${DEMO_ARCHIVE:-https://jeralyzer.pages.dev} WORKER_TOKEN: ${WORKER_TOKEN:-} OLLAMA_URL: http://ollama:11434 depends_on: ollama: condition: service_started umtool: environment: ARCHILYZER_LOCAL_ONLY: "1" ARCHILYZER_LOCAL_MODEL_HOSTS: ollama TRANSCRIPT_SITE_URL: ${DEMO_ARCHIVE:-https://jeralyzer.pages.dev} WORKER_TOKEN: ${WORKER_TOKEN:-} OLLAMA_URL: http://ollama:11434 ollama: # A wrapper that prints one honest line about the GPU, then execs # `ollama serve` (docker/ollama-start.sh). entrypoint: ["/bin/sh", "/etc/archilyzer/ollama-start.sh"] volumes: - ./docker:/etc/archilyzer:ro environment: # Ollama's hosted models are not this machine's: off. OLLAMA_NO_CLOUD: "1" # One request and one loaded model at a time (an 8 GB card holds one 7B). OLLAMA_NUM_PARALLEL: "1" OLLAMA_MAX_LOADED_MODELS: "1" OLLAMA_KEEP_ALIVE: ${DEMO_OLLAMA_KEEP_ALIVE:-2m} # llama.cpp's prompt cache (llama-server --cache-ram, default 8192 MiB): # it grew to 8-11 GB of host RAM in D0 and was OOM-killed twice. LLAMA_ARG_CACHE_RAM: ${DEMO_OLLAMA_CACHE_RAM_MIB:-1024} # The backstop: ollama dies in its own cgroup, not the desktop session. # memswap_limit equal to mem_limit = no swap on top. mem_limit: ${DEMO_OLLAMA_MEM:-6g} memswap_limit: ${DEMO_OLLAMA_MEM:-6g}