Skip to content

Commit 64ccf4c

Browse files
authored
expose port & required env vars & instructions for running in dev (BerriAI#8404)
1 parent 12ac414 commit 64ccf4c

File tree

3 files changed

+24
-0
lines changed

3 files changed

+24
-0
lines changed

.env.example

+5
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,8 @@ REPLICATE_API_TOKEN = ""
2020
ANTHROPIC_API_KEY = ""
2121
# Infisical
2222
INFISICAL_TOKEN = ""
23+
24+
# Development Configs
25+
LITELLM_MASTER_KEY = "sk-1234"
26+
DATABASE_URL = "postgresql://llmproxy:dbpassword9090@db:5432/litellm"
27+
STORE_MODEL_IN_DB = "True"

README.md

+17
Original file line numberDiff line numberDiff line change
@@ -451,3 +451,20 @@ If you have suggestions on how to improve the code quality feel free to open an
451451
<a href="https://github.com/BerriAI/litellm/graphs/contributors">
452452
<img src="https://contrib.rocks/image?repo=BerriAI/litellm" />
453453
</a>
454+
455+
456+
## Run in Developer mode
457+
### Services
458+
1. Setup .env file in root
459+
2. Run dependant services `docker-compose up db prometheus`
460+
461+
### Backend
462+
1. (In root) create virtual environment `python -m venv .venv`
463+
2. Activate virtual environment `source .venv/bin/activate`
464+
3. Install dependencies `pip install -e ".[all]"`
465+
4. Start proxy backend `uvicorn litellm.proxy.proxy_server:app --host localhost --port 4000 --reload`
466+
467+
### Frontend
468+
1. Navigate to `ui/litellm-dashboard`
469+
2. Install dependencies `npm install`
470+
3. Run `npm run dev` to start the dashboard

docker-compose.yml

+2
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ services:
2929
POSTGRES_DB: litellm
3030
POSTGRES_USER: llmproxy
3131
POSTGRES_PASSWORD: dbpassword9090
32+
ports:
33+
- "5432:5432"
3234
healthcheck:
3335
test: ["CMD-SHELL", "pg_isready -d litellm -U llmproxy"]
3436
interval: 1s

0 commit comments

Comments
 (0)