Files
comfyui-nvidia/deployments/ai-stack/.env.example
William Gill 5a34ced8f1 Add S3 mirror path for Ollama models + mirror-ollama-model.sh helper
Three pieces:

1. mirror-ollama-model.sh — run on any machine that has the model
   pulled. Parses the manifest at
   ~/.ollama/models/manifests/registry.ollama.ai/<ns>/<name>/<tag>,
   greps every sha256:* digest, tars manifest + referenced blobs into
   one .tgz. Output is portable — extract over any other Ollama
   data dir and the model is immediately visible.

2. init-models.sh gains an s3_pull function that curls a tarball from
   $S3_OLLAMA_BASE and extracts into /root/.ollama/models/. Falls back
   to ollama pull when S3_OLLAMA_BASE is unset, so s3_pull lines are
   safe to commit before the bucket is ready. huihui_ai/qwen3.5-
   abliterated:9b promoted to s3_pull as the example.

3. docker-compose.yml model-init service propagates S3_OLLAMA_BASE
   from .env. Curl auto-installs at script start because ollama/ollama
   doesn't always ship it.

README documents the mirror workflow under "Mirroring models to S3".

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 13:43:26 -05:00

38 lines
1.7 KiB
Plaintext

# Copy to .env and fill in. docker compose picks .env up automatically.
# Never commit the populated .env — it's in .gitignore at repo root.
# Public URL Open WebUI is reached at, with scheme. Used for auth redirects
# and email-link generation.
WEBUI_URL=https://chat.example.com
# Bare hostname (no scheme) for the same Open WebUI host. Used as the cookie
# domain by the Anubis sidecar so its session cookie scopes correctly.
LLM_URL=chat.example.com
# Cookie-signing key for Open WebUI sessions. Generate once with:
# openssl rand -hex 32
# Must stay stable across restarts — rotating it logs every user out.
WEBUI_SECRET_KEY=replace-with-32-byte-hex
# Ed25519 private key (hex) for the Anubis PoW sidecar. Generate with:
# openssl rand -hex 32
# Only needed if you uncomment the anubis-owui service in docker-compose.yml.
ANUBIS_OWUI_KEY=replace-with-32-byte-hex
# ComfyUI image tag to deploy. `latest` tracks whatever the release workflow
# last pushed; pin to a v* tag (e.g. 0.1.0) for reproducible deploys.
COMFYUI_IMAGE_TAG=latest
# HuggingFace access token. Only needed if comfyui-init-models.sh references
# gated repos (Flux-dev, SD3, etc.). Generate a read token at
# https://huggingface.co/settings/tokens. Leave empty for public-only.
HF_TOKEN=
# HTTPS base URL of an S3 bucket / CDN that hosts mirrored Ollama model
# tarballs (created by mirror-ollama-model.sh). Files under this base are
# fetched by init-models.sh's s3_pull instead of registry.ollama.ai —
# faster and immune to upstream rate-limiting / removal. Example:
# S3_OLLAMA_BASE=https://your-bucket.s3.amazonaws.com/ollama-models
# Leave empty to fall back to plain `ollama pull` for everything.
S3_OLLAMA_BASE=