Skip to content

Commit

Permalink
fix: Fix litellm docker-compose settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Julep Developers committed Sep 21, 2024
1 parent abb3c9d commit 4805278
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 47 deletions.
5 changes: 0 additions & 5 deletions agents-api/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ x--shared-environment: &shared-environment
x--base-agents-api: &base-agents-api
image: julepai/agents-api:${TAG}
depends_on:
memory-store:
condition: service_started
worker:
condition: service_started
environment:
Expand Down Expand Up @@ -92,9 +90,6 @@ services:
cozo-migrate:
image: julepai/cozo-migrate:${TAG}
container_name: cozo-migrate
depends_on:
memory-store:
condition: service_started
build:
context: .
dockerfile: Dockerfile.migration
Expand Down
97 changes: 55 additions & 42 deletions llm-proxy/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,72 +1,85 @@
name: julep-llm-proxy

x--litellm-base: &litellm-base
image: ghcr.io/berriai/litellm-database:main-v1.46.6
restart: unless-stopped
hostname: litellm
volumes:
- ./litellm-config.yaml:/app/config.yaml
- .keys:/app/.keys:ro
environment:
- LITELLM_MASTER_KEY=${LITELLM_MASTER_KEY}
- DATABASE_URL=${LITELLM_DATABASE_URL:-postgresql://${LITELLM_POSTGRES_USER:-llmproxy}:${LITELLM_POSTGRES_PASSWORD}@${LITELLM_POSTGRES_HOST:-litellm-db}:${LITELLM_POSTGRES_PORT:-5432}/${LITELLM_POSTGRES_DB:-litellm}?sslmode=${LITELLM_POSTGRES_SSLMODE:-prefer_ssl}}
- REDIS_URL=${LITELLM_REDIS_URL:-${LITELLM_REDIS_PROTOCOL:-redis}://${LITELLM_REDIS_USER:-default}:${LITELLM_REDIS_PASSWORD:-${LITELLM_REDIS_PASSWORD}}@${LITELLM_REDIS_HOST:-litellm-redis}:${LITELLM_REDIS_PORT:-6379}}

- OPENAI_API_KEY=${OPENAI_API_KEY}
- ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY}
- GROQ_API_KEY=${GROQ_API_KEY}
- CLOUDFLARE_API_KEY=${CLOUDFLARE_API_KEY}
- CLOUDFLARE_ACCOUNT_ID=${CLOUDFLARE_ACCOUNT_ID}
- NVIDIA_NIM_API_KEY=${NVIDIA_NIM_API_KEY}
- GITHUB_API_KEY=${GITHUB_API_KEY}
- VOYAGE_API_KEY=${VOYAGE_API_KEY}
- GOOGLE_APPLICATION_CREDENTIALS=${GOOGLE_APPLICATION_CREDENTIALS}
command:
[
"--config",
"/app/config.yaml",
"--port",
"4000",
"--num_workers",
"8",
"--telemetry",
"False"
]

develop:
watch:
- action: sync+restart
path: ./litellm-config.yaml
target: /app/config.yaml


services:
litellm-managed:
<<: *litellm-base
profiles:
- managed-db

litellm:
image: ghcr.io/berriai/litellm-database:main-v1.46.6
restart: unless-stopped
volumes:
- ./litellm-config.yaml:/app/config.yaml
- .keys:/app/.keys:ro
environment:
- LITELLM_MASTER_KEY=${LITELLM_MASTER_KEY}
- LITELLM_POSTGRES_DB=${LITELLM_POSTGRES_DB:-litellm}
- LITELLM_POSTGRES_USER=${LITELLM_POSTGRES_USER:-llmproxy}
- LITELLM_POSTGRES_PASSWORD=${LITELLM_POSTGRES_PASSWORD}
- LITELLM_REDIS_HOST=${LITELLM_REDIS_HOST:-litellm-redis}
- LITELLM_REDIS_PORT=${LITELLM_REDIS_PORT:-6379}
- LITELLM_REDIS_PASSWORD=${LITELLM_REDIS_PASSWORD}
- LITELLM_DATABASE_URL=postgresql://${LITELLM_POSTGRES_USER:-llmproxy}:${LITELLM_POSTGRES_PASSWORD}@litellm-db:5432/${LITELLM_POSTGRES_DB:-litellm}
- OPENAI_API_KEY=${OPENAI_API_KEY}
- ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY}
- GROQ_API_KEY=${GROQ_API_KEY}
- CLOUDFLARE_API_KEY=${CLOUDFLARE_API_KEY}
- CLOUDFLARE_ACCOUNT_ID=${CLOUDFLARE_ACCOUNT_ID}
- NVIDIA_NIM_API_KEY=${NVIDIA_NIM_API_KEY}
- GITHUB_API_KEY=${GITHUB_API_KEY}
- VOYAGE_API_KEY=${VOYAGE_API_KEY}
- GOOGLE_APPLICATION_CREDENTIALS=${GOOGLE_APPLICATION_CREDENTIALS}
command:
[
"--config",
"/app/config.yaml",
"--port",
"4000",
"--num_workers",
"8",
"--telemetry",
"False"
]
<<: *litellm-base
profiles:
- self-hosted-db

depends_on:
- litellm-db
- litellm-redis

develop:
watch:
- action: sync+restart
path: ./litellm-config.yaml
target: /app/config.yaml

litellm-db:
image: postgres:16
restart: unless-stopped
volumes:
- litellm-db-data:/var/lib/postgresql/data
ports:
- "15432:5432"
profiles:
- self-hosted-db
environment:
- POSTGRES_DB=${LITELLM_POSTGRES_DB:-litellm}
- POSTGRES_USER=${LITELLM_POSTGRES_USER:-llmproxy}
- POSTGRES_PASSWORD=${LITELLM_POSTGRES_PASSWORD}
healthcheck:
test: [ "CMD-SHELL", "pg_isready -d ${LITELLM_POSTGRES_DB:-litellm} -U ${LITELLM_POSTGRES_USER:-llmproxy}" ]

interval: 1s
timeout: 5s
retries: 10

litellm-redis:
image: redis/redis-stack-server
restart: unless-stopped
profiles:
- self-hosted-db
environment:
REDIS_ARGS: --requirepass ${LITELLM_REDIS_PASSWORD}
volumes:
Expand Down

0 comments on commit 4805278

Please sign in to comment.