Files
esh-pfi-infrastructure/stacks/infinity/compose.yaml
T
vh e376d0aec9 Initial commit: PFI fleet inventory, stacks, tooling, and backup pipeline
Captures the full workspace state built up to this point:

  - CLAUDE.md + README.md describing conventions and the four-host fleet
    (ana-ml2, ana-docker, nh3-docker, esh-docker-vm).
  - Per-host notes under servers/<host>/ with ssh-target fallback files
    and latest system-details snapshots (two in-compose credential leaks
    scrubbed; the upstream compose files still need to move those to .env).
  - scripts/: server_inspect.sh (read-only remote diagnostic),
    refresh-server-info.sh (dir-driven discovery + snapshot capture with
    validation warnings), add-host.sh, sync-stacks.sh (pull
    compose/conf trees), deploy-stack.sh (push with per-file diff + prompt).
  - stacks/: canonical compose for backrest, beszel, dozzle, llama-swap,
    rest-server-ana, rest-server-nh3, vllm-qwen3, plus the retired
    infinity reference. All use the .env-driven + traefik-net + homepage
    label pattern.
  - configs/restic/ana-docker/: first resticprofile config + pre-backup
    hook (Synapse pg_dump, Seafile mysqldump, Vaultwarden SQLite); templates
    for the other three hosts to come.
  - docs/pfi/: general infrastructure reference carried over.
  - .gitignore excludes .env, stacks-mirror/, and assorted secret/state
    filenames to prevent re-leaks on later commits.
2026-04-20 14:29:48 -07:00

64 lines
1.8 KiB
YAML

# Infinity — OpenAI-compatible embeddings + reranker server.
#
# Serves embedding and reranker models simultaneously from one container
# on port 7997 (HTTP). Consumers: AIPA agents (search/retrieval), LibreChat
# RAG, anything that needs vector embeddings.
#
# All tunables live in .env — edit that, not this file.
#
# Pre-download models to avoid first-run delay:
# HF_HOME=/tank/aimodels/huggingface hf download Qwen/Qwen3-Embedding-0.6B
# HF_HOME=/tank/aimodels/huggingface hf download Qwen/Qwen3-Reranker-0.6B
services:
infinity:
image: michaelf34/infinity:${INFINITY_VERSION}
container_name: infinity
restart: unless-stopped
ports:
- "${INFINITY_PORT}:7997"
volumes:
- /tank/aimodels/huggingface:/hfcache
environment:
- HF_HOME=/hfcache
- HF_HUB_CACHE=/hfcache/hub
- HUGGING_FACE_HUB_TOKEN=${HF_TOKEN:-}
command: >
v2
--model-id ${EMBED_MODEL}
--model-id ${RERANK_MODEL}
--engine ${ENGINE}
--device cuda
--batch-size ${BATCH_SIZE}
--host 0.0.0.0
--port 7997
--api-key ${API_KEY:-}
deploy:
resources:
reservations:
devices:
- driver: nvidia
device_ids:
- "${GPU_ID}"
capabilities:
- gpu
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:7997/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 120s
networks:
- tnet
labels:
- homepage.group=AI Systems
- homepage.name=Infinity
- homepage.icon=mdi-vector-arrange-below
- homepage.description=Embeddings + Reranker API (ana-ml2)
- homepage.href=http://10.250.50.54:7997/docs
networks:
tnet:
name: traefik-net
external: true