1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2025-01-02 03:37:40 +02:00

update litellm

This commit is contained in:
kev 2024-12-27 15:51:16 +08:00
parent e6e8aa7a1e
commit ac8f050121
3 changed files with 27 additions and 6 deletions

View File

@ -1,5 +1,6 @@
#
# https://docs.litellm.ai/docs/proxy/configs
# - https://docs.litellm.ai/docs/proxy/configs
# - https://github.com/BerriAI/litellm/blob/main/proxy_server_config.yaml
#
model_list:
@ -17,4 +18,11 @@ model_list:
api_base: http://localhost:11434
general_settings:
master_key: sk-xxxxxx
master_key: os.environ/LITELLM_MASTER_KEY
# database_url: postgresql://litellm:litellm@postgres:5432/litellm
# store_model_in_db: True
environment_variables:
OPENAI_API_KEY: sk-xxxxxx
ANTHROPIC_API_KEY: sk-xxxxxx
LITELLM_MASTER_KEY: sk-xxxxxx

View File

@ -1,12 +1,25 @@
services:
litellm:
image: ghcr.io/berriai/litellm:main-stable
command: --config /app/config.yaml --detailed_debug
ports:
- "4000:4000"
volumes:
- ./data/config.yaml:/app/config.yaml
- ./data/litellm/config.yaml:/app/config.yaml
environment:
- OPENAI_API_KEY=sk-xxxxxx
- ANTHROPIC_API_KEY=sk-xxxxxx
- DATABASE_URL=postgresql://litellm:litellm@postgres:5432/litellm
- STORE_MODEL_IN_DB=True
depends_on:
- postgres
restart: unless-stopped
postgres:
image: postgres:17-alpine
volumes:
- ./data/postgres:/var/lib/postgresql/data
environment:
- POSTGRES_USER=litellm
- POSTGRES_PASSWORD=litellm
- POSTGRES_DB=litellm
restart: unless-stopped

View File

@ -1,7 +1,7 @@
version: "3.8"
services:
postgres:
image: postgres:16-alpine
image: postgres:17-alpine
ports:
- "5432:5432"
volumes: