- compose.yml: pass STREAMLIT_SERVER_BASE_URL_PATH from .env into container Streamlit prefixes all asset URLs with the path so Caddy handle_path routing works. Without this, /static/* requests skip the /peregrine* route → 503 text/plain MIME error. - config/server.yaml.example: document base_url_path + server_port settings - .gitignore: ignore config/server.yaml (local gitignored instance of server.yaml.example) - app/pages/2_Settings.py: add Deployment/Server expander under System tab Shows active base URL path from env; saves edits to config/server.yaml + .env; prompts user to run ./manage.sh restart to apply. Refs: https://docs.streamlit.io/develop/api-reference/configuration/config.toml#server.baseUrlPath
116 lines
3.5 KiB
YAML
116 lines
3.5 KiB
YAML
# compose.yml — Peregrine by Circuit Forge LLC
|
|
# Profiles: remote | cpu | single-gpu | dual-gpu-ollama | dual-gpu-vllm | dual-gpu-mixed
|
|
services:
|
|
|
|
app:
|
|
build: .
|
|
ports:
|
|
- "${STREAMLIT_PORT:-8501}:8501"
|
|
volumes:
|
|
- ./config:/app/config
|
|
- ./data:/app/data
|
|
- ${DOCS_DIR:-~/Documents/JobSearch}:/docs
|
|
environment:
|
|
- STAGING_DB=/app/data/staging.db
|
|
- DOCS_DIR=/docs
|
|
- ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY:-}
|
|
- OPENAI_COMPAT_URL=${OPENAI_COMPAT_URL:-}
|
|
- OPENAI_COMPAT_KEY=${OPENAI_COMPAT_KEY:-}
|
|
- PEREGRINE_GPU_COUNT=${PEREGRINE_GPU_COUNT:-0}
|
|
- PEREGRINE_GPU_NAMES=${PEREGRINE_GPU_NAMES:-}
|
|
- RECOMMENDED_PROFILE=${RECOMMENDED_PROFILE:-remote}
|
|
- STREAMLIT_SERVER_BASE_URL_PATH=${STREAMLIT_BASE_URL_PATH:-}
|
|
- PYTHONUNBUFFERED=1
|
|
- PYTHONLOGGING=WARNING
|
|
depends_on:
|
|
searxng:
|
|
condition: service_healthy
|
|
extra_hosts:
|
|
- "host.docker.internal:host-gateway"
|
|
restart: unless-stopped
|
|
|
|
searxng:
|
|
image: searxng/searxng:latest
|
|
ports:
|
|
- "${SEARXNG_PORT:-8888}:8080"
|
|
volumes:
|
|
- ./docker/searxng:/etc/searxng:ro
|
|
healthcheck:
|
|
test: ["CMD", "wget", "-q", "--spider", "http://localhost:8080/"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 3
|
|
restart: unless-stopped
|
|
|
|
ollama:
|
|
image: ollama/ollama:latest
|
|
ports:
|
|
- "${OLLAMA_PORT:-11434}:11434"
|
|
volumes:
|
|
- ${OLLAMA_MODELS_DIR:-~/models/ollama}:/root/.ollama
|
|
- ./docker/ollama/entrypoint.sh:/entrypoint.sh
|
|
environment:
|
|
- OLLAMA_MODELS=/root/.ollama
|
|
- DEFAULT_OLLAMA_MODEL=${OLLAMA_DEFAULT_MODEL:-llama3.2:3b}
|
|
entrypoint: ["/bin/bash", "/entrypoint.sh"]
|
|
profiles: [cpu, single-gpu, dual-gpu-ollama, dual-gpu-vllm, dual-gpu-mixed]
|
|
restart: unless-stopped
|
|
|
|
ollama_research:
|
|
image: ollama/ollama:latest
|
|
ports:
|
|
- "${OLLAMA_RESEARCH_PORT:-11435}:11434"
|
|
volumes:
|
|
- ${OLLAMA_MODELS_DIR:-~/models/ollama}:/root/.ollama
|
|
- ./docker/ollama/entrypoint.sh:/entrypoint.sh
|
|
environment:
|
|
- OLLAMA_MODELS=/root/.ollama
|
|
- DEFAULT_OLLAMA_MODEL=${OLLAMA_RESEARCH_MODEL:-llama3.2:3b}
|
|
entrypoint: ["/bin/bash", "/entrypoint.sh"]
|
|
profiles: [dual-gpu-ollama, dual-gpu-mixed]
|
|
restart: unless-stopped
|
|
|
|
vision:
|
|
build:
|
|
context: .
|
|
dockerfile: scripts/vision_service/Dockerfile
|
|
ports:
|
|
- "${VISION_PORT:-8002}:8002"
|
|
environment:
|
|
- VISION_MODEL=${VISION_MODEL:-vikhyatk/moondream2}
|
|
- VISION_REVISION=${VISION_REVISION:-2025-01-09}
|
|
profiles: [single-gpu, dual-gpu-ollama, dual-gpu-vllm, dual-gpu-mixed]
|
|
restart: unless-stopped
|
|
|
|
vllm:
|
|
image: vllm/vllm-openai:latest
|
|
ports:
|
|
- "${VLLM_PORT:-8000}:8000"
|
|
volumes:
|
|
- ${VLLM_MODELS_DIR:-~/models/vllm}:/models
|
|
command: >
|
|
--model /models/${VLLM_MODEL:-Ouro-1.4B}
|
|
--trust-remote-code
|
|
--max-model-len 4096
|
|
--gpu-memory-utilization 0.75
|
|
--enforce-eager
|
|
--max-num-seqs 8
|
|
--cpu-offload-gb ${CPU_OFFLOAD_GB:-0}
|
|
profiles: [dual-gpu-vllm, dual-gpu-mixed]
|
|
restart: unless-stopped
|
|
|
|
finetune:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile.finetune
|
|
volumes:
|
|
- ${DOCS_DIR:-~/Documents/JobSearch}:/docs
|
|
- ${OLLAMA_MODELS_DIR:-~/models/ollama}:/ollama-models
|
|
- ./config:/app/config
|
|
environment:
|
|
- DOCS_DIR=/docs
|
|
- OLLAMA_URL=http://ollama:11434
|
|
- OLLAMA_MODELS_MOUNT=/ollama-models
|
|
- OLLAMA_MODELS_OLLAMA_PATH=/root/.ollama
|
|
profiles: [finetune]
|
|
restart: "no"
|