mirror of
https://github.com/BerriAI/litellm.git
synced 2025-12-06 11:33:26 +08:00
chore: setting devcontainer for develop
This commit is contained in:
@@ -11,7 +11,12 @@
|
|||||||
// },
|
// },
|
||||||
|
|
||||||
// Features to add to the dev container. More info: https://containers.dev/features.
|
// Features to add to the dev container. More info: https://containers.dev/features.
|
||||||
// "features": {},
|
"features": {
|
||||||
|
"ghcr.io/devcontainers/features/node:1": {
|
||||||
|
"version": "lts"
|
||||||
|
},
|
||||||
|
"ghcr.io/devcontainers/features/docker-in-docker:2": {}
|
||||||
|
},
|
||||||
|
|
||||||
// Configure tool-specific properties.
|
// Configure tool-specific properties.
|
||||||
"customizations": {
|
"customizations": {
|
||||||
@@ -30,7 +35,7 @@
|
|||||||
|
|
||||||
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
||||||
"forwardPorts": [4000],
|
"forwardPorts": [4000],
|
||||||
|
|
||||||
"containerEnv": {
|
"containerEnv": {
|
||||||
"LITELLM_LOG": "DEBUG"
|
"LITELLM_LOG": "DEBUG"
|
||||||
},
|
},
|
||||||
@@ -48,5 +53,5 @@
|
|||||||
// "remoteUser": "litellm",
|
// "remoteUser": "litellm",
|
||||||
|
|
||||||
// Use 'postCreateCommand' to run commands after the container is created.
|
// Use 'postCreateCommand' to run commands after the container is created.
|
||||||
"postCreateCommand": "pipx install poetry && poetry install -E extra_proxy -E proxy"
|
"postCreateCommand": "bash ./.devcontainer/post-create.sh"
|
||||||
}
|
}
|
||||||
17
.devcontainer/post-create.sh
Normal file
17
.devcontainer/post-create.sh
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
echo "[post-create] Installing poetry via pip"
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
python -m pip install poetry
|
||||||
|
|
||||||
|
echo "[post-create] Installing Python dependencies (poetry)"
|
||||||
|
poetry install --with dev --extras proxy
|
||||||
|
|
||||||
|
echo "[post-create] Generating Prisma client"
|
||||||
|
poetry run prisma generate
|
||||||
|
|
||||||
|
echo "[post-create] Installing npm dependencies"
|
||||||
|
cd ui/litellm-dashboard && npm install --no-audit --no-fund
|
||||||
|
|
||||||
|
echo "[post-create] Done"
|
||||||
Reference in New Issue
Block a user