Files
compose/ai/compose.yml

213 lines
6.7 KiB
YAML
Executable File

services:
hermes:
build:
context: ./hermes
container_name: hermes
restart: always
command: gateway run
environment:
- HERMES_UID=10000
- HERMES_GID=10000
- OLLAMA_HOST=http://ollama-cpu:11434
- HERMES_DASHBOARD=1
- API_SERVER_ENABLED=true
- API_SERVER_PORT=8642
- API_SERVER_HOST=0.0.0.0
- API_SERVER_KEY=hermes_local_key
- GATEWAY_ALLOW_ALL_USERS=true
- OPENROUTER_API_KEY=${OPENROUTER_API_KEY}
- OPENCODE_API_KEY=${OPENCODE_API_KEY}
- HSA_OVERRIDE_GFX_VERSION=9.0.6
- HCC_AMDGPU_TARGET=gfx906
- HIP_VISIBLE_DEVICES=0,1
- ROCR_VISIBLE_DEVICES=0,1
- HSA_ENABLE_SDMA=0
- TZ=America/Montreal
volumes:
- /mnt/HoardingCow_docker_data/Hermes/data:/opt/data
- /mnt/HoardingCow_docker_data/Hermes/Syncthing/ExoKortex:/opt/data/ExoKortex
devices:
- /dev/kfd:/dev/kfd
- /dev/dri:/dev/dri
group_add:
- '303'
- '26'
networks:
ai_backend: null
ai_net: null
vpn_net:
ipv4_address: 172.24.0.5
depends_on:
- honcho
labels:
- traefik.enable=true
- traefik.docker.network=ai_net
- traefik.http.routers.hermes-web-http.rule=Host(`hermes.lazyworkhorse.net`)
- traefik.http.routers.hermes-web-http.entrypoints=web
- traefik.http.routers.hermes-web-http.middlewares=redirect-to-https
- traefik.http.routers.hermes-web-https.rule=Host(`hermes.lazyworkhorse.net`)
- traefik.http.routers.hermes-web-https.entrypoints=websecure
- traefik.http.routers.hermes-web-https.tls=true
- traefik.http.routers.hermes-web-https.tls.certresolver=njalla
- traefik.http.routers.hermes-web-https.middlewares=hermes-auth
- traefik.http.middlewares.hermes-auth.forwardauth.address=http://authelia:9091/api/verify?rd=https://auth.lazyworkhorse.net/
- traefik.http.middlewares.hermes-auth.forwardauth.trustforwardheader=true
- traefik.http.middlewares.hermes-auth.forwardauth.authresponseheaders=X-Forwarded-User,X-Forwarded-Groups
- traefik.http.services.hermes-web.loadbalancer.server.port=9119
syncthing:
image: syncthing/syncthing:latest
container_name: syncthing
hostname: syncthing
restart: always
ports:
- 8384:8384
- 22000:22000
- 21027:21027/udp
environment:
- TZ=America/Montreal
- PUID=10000
- PGID=10000
volumes:
- /mnt/HoardingCow_docker_data/Hermes/Syncthing/config:/var/syncthing/config
- /mnt/HoardingCow_docker_data/Hermes/Syncthing/ExoKortex:/ExoKortex
networks:
- ai_backend
- ai_net
labels:
- traefik.enable=true
- traefik.docker.network=ai_net
- traefik.http.routers.syncthing-http.rule=Host(`syncthing.lazyworkhorse.net`)
- traefik.http.routers.syncthing-http.entrypoints=web
- traefik.http.routers.syncthing-http.middlewares=redirect-to-https
- traefik.http.routers.syncthing-https.rule=Host(`syncthing.lazyworkhorse.net`)
- traefik.http.routers.syncthing-https.entrypoints=websecure
- traefik.http.routers.syncthing-https.tls=true
- traefik.http.routers.syncthing-https.tls.certresolver=njalla
- traefik.http.routers.syncthing-https.middlewares=hermes-auth
- traefik.http.services.syncthing.loadbalancer.server.port=8384
ollama-cpu:
build:
context: ./ollama
dockerfile: Dockerfile
image: ollama/ollama:rocm-gfx906
container_name: ollama-cpu
tty: true
restart: always
ports:
- 127.0.0.1:11434:11434
networks:
- ai_backend
volumes:
- /mnt/HoardingCow_docker_data/Ollama/ollama:/root/.ollama
environment:
- OLLAMA_VULKAN=0
- OLLAMA_HOST=0.0.0.0
llama-cpp-hermes:
image: llama-cpp:rocm-gfx906
container_name: llama-cpp-hermes
restart: unless-stopped
networks:
- ai_backend
ports:
- 127.0.0.1:8300:8080
ipc: host
devices:
- /dev/kfd:/dev/kfd
- /dev/dri:/dev/dri
group_add:
- '303'
- '26'
environment:
- HSA_OVERRIDE_GFX_VERSION=9.0.6
- HSA_ENABLE_SDMA=0
- HIP_VISIBLE_DEVICES=0,1
- LLAMA_CACHE=/models
volumes:
- /mnt/HoardingCow_docker_data/Llama_cpp/models:/models
- /mnt/HoardingCow_docker_data/Ollama/ollama/models/blobs/sha256-17823599694fa3503ef54bf748d5078c6ce881f4d01616cafa255dc05d215a08:/model.gguf:ro
command: '-m /model.gguf --host 0.0.0.0 --port 8080 --gpu-layers 99 --ctx-size
163840 -ctk f16 -ctv f16 --flash-attn on --split-mode layer --no-mmap --n-predict
-1
'
honcho:
build:
context: ./honcho
ssh:
- default
container_name: honcho
restart: unless-stopped
environment:
- DB_CONNECTION_URI=postgresql+psycopg://honcho:honcho_pass@honcho-db:5432/honcho
- CACHE_URL=redis://honcho-redis:6379/0
- CACHE_ENABLED=true
- EMBEDDING_VECTOR_DIMENSIONS=1024
- AUTH_USE_AUTH=true
- AUTH_JWT_SECRET=${HONCHO_AUTH_JWT_SECRET}
- HONCHO_OPENAI_API_KEY=${HONCHO_OPENAI_API_KEY}
volumes:
- /mnt/HoardingCow_docker_data/Honcho/data:/app/data
- /mnt/HoardingCow_docker_data/Honcho/config.toml:/app/config.toml:ro
networks:
- ai_backend
- ai_net
labels:
- traefik.enable=true
- traefik.docker.network=ai_net
- traefik.http.routers.honcho-http.rule=Host(`honcho.lazyworkhorse.net`)
- traefik.http.routers.honcho-http.entrypoints=web
- traefik.http.routers.honcho-http.middlewares=redirect-to-https
- traefik.http.routers.honcho-https.rule=Host(`honcho.lazyworkhorse.net`)
- traefik.http.routers.honcho-https.entrypoints=websecure
- traefik.http.routers.honcho-https.tls=true
- traefik.http.routers.honcho-https.tls.certresolver=njalla
- traefik.http.routers.honcho-https.middlewares=hermes-auth
- traefik.http.services.honcho.loadbalancer.server.port=80
depends_on:
- honcho-db
- honcho-redis
honcho-db:
image: pgvector/pgvector:pg15
container_name: honcho-db
restart: unless-stopped
ports:
- 127.0.0.1:5432:5432
command:
- postgres
- -c
- max_connections=200
environment:
- POSTGRES_DB=honcho
- POSTGRES_USER=honcho
- POSTGRES_PASSWORD=honcho_pass
- PGDATA=/var/lib/postgresql/data/pgdata
volumes:
- /mnt/HoardingCow_docker_data/Honcho/postgres:/var/lib/postgresql/data
- ./honcho/init-db.sql:/docker-entrypoint-initdb.d/init.sql:ro
networks:
- ai_backend
honcho-redis:
image: redis:8
container_name: honcho-redis
restart: unless-stopped
ports:
- 127.0.0.1:6379:6379
volumes:
- /mnt/HoardingCow_docker_data/Honcho/redis:/data
networks:
- ai_backend
networks:
ai_net:
driver: bridge
name: ai_net
ai_backend:
driver: bridge
name: ai_backend
vpn_net:
external: true
name: vpn_net
volumes:
honcho_data:
driver: bridge
name: honcho_data