# 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