Skip to content

Commit dc605b1

Browse files
Merge pull request #14972 from 22mSqRi/chore/devContainer
chore: setting devcontainer for develop
2 parents 0f0b34e + dd30a0d commit dc605b1

File tree

2 files changed

+25
-3
lines changed

2 files changed

+25
-3
lines changed

.devcontainer/devcontainer.json

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,12 @@
1111
// },
1212

1313
// Features to add to the dev container. More info: https://containers.dev/features.
14-
// "features": {},
14+
"features": {
15+
"ghcr.io/devcontainers/features/node:1": {
16+
"version": "lts"
17+
},
18+
"ghcr.io/devcontainers/features/docker-in-docker:2": {}
19+
},
1520

1621
// Configure tool-specific properties.
1722
"customizations": {
@@ -30,7 +35,7 @@
3035

3136
// Use 'forwardPorts' to make a list of ports inside the container available locally.
3237
"forwardPorts": [4000],
33-
38+
3439
"containerEnv": {
3540
"LITELLM_LOG": "DEBUG"
3641
},
@@ -48,5 +53,5 @@
4853
// "remoteUser": "litellm",
4954

5055
// Use 'postCreateCommand' to run commands after the container is created.
51-
"postCreateCommand": "pipx install poetry && poetry install -E extra_proxy -E proxy"
56+
"postCreateCommand": "bash ./.devcontainer/post-create.sh"
5257
}

.devcontainer/post-create.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/usr/bin/env bash
2+
set -e
3+
4+
echo "[post-create] Installing poetry via pip"
5+
python -m pip install --upgrade pip
6+
python -m pip install poetry
7+
8+
echo "[post-create] Installing Python dependencies (poetry)"
9+
poetry install --with dev --extras proxy
10+
11+
echo "[post-create] Generating Prisma client"
12+
poetry run prisma generate
13+
14+
echo "[post-create] Installing npm dependencies"
15+
cd ui/litellm-dashboard && npm install --no-audit --no-fund
16+
17+
echo "[post-create] Done"

0 commit comments

Comments
 (0)