1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2025-05-31 22:59:39 +02:00

update litellm

This commit is contained in:
kevin 2025-03-08 21:39:13 +08:00
parent b5207e9a83
commit 4082f8c9eb
3 changed files with 33 additions and 3 deletions

View File

@ -37,7 +37,7 @@ model_list:
general_settings:
master_key: os.environ/LITELLM_MASTER_KEY
database_url: postgresql://litellm:litellm@postgres:5432/litellm
store_model_in_db: True
store_model_in_db: true
litellm_settings:
drop_params: true
@ -55,4 +55,5 @@ litellm_settings:
# export OPENAI_API_KEY=sk-xxxxxx #
# export ANTHROPIC_API_KEY=sk-xxxxxx #
# export LITELLM_MASTER_KEY=sk-xxxxxx #
# export DASHSCOPE_API_KEY=sk-xxxxxx #
#######################################

View File

@ -2,7 +2,7 @@ services:
litellm:
image: ghcr.io/berriai/litellm:main-stable
command: --config /app/config.yaml --detailed_debug
command: --config /app/config.yaml --telemetry False
ports:
- "4000:4000"
volumes:
@ -10,8 +10,12 @@ services:
environment:
- DATABASE_URL=postgresql://litellm:litellm@postgres:5432/litellm
- STORE_MODEL_IN_DB=True
- UI_USERNAME=litellm
- UI_PASSWORD=litellm
depends_on:
- postgres
postgres:
condition: service_healthy
restart: true
restart: unless-stopped
postgres:
@ -22,4 +26,10 @@ services:
- POSTGRES_USER=litellm
- POSTGRES_PASSWORD=litellm
- POSTGRES_DB=litellm
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
interval: 10s
retries: 5
start_period: 30s
timeout: 10s
restart: unless-stopped

View File

@ -0,0 +1,19 @@
#
# pipx install litellm[prisma,proxy]
# pipx upgrade litellm
#
[program:litellm]
command = /Users/kev/.local/bin/litellm --config litellm.yaml --telemetry False
process_name = %(program_name)s
directory = /usr/local/etc/litellm
environment =
UI_USERNAME="litellm",
UI_PASSWORD="litellm",
LITELLM_MASTER_KEY="sk-1234",
ANTHROPIC_API_KEY="sk-xxxxxx",
OPENAI_API_KEY="sk-xxxxxx",
DASHSCOPE_API_KEY="sk-xxxxxx"
autostart = true
autorestart = true
redirect_stderr = true