mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-06 08:16:43 +00:00
fix req changes
This commit is contained in:
parent
c1e9dea88b
commit
0d2abcaec9
2 changed files with 26 additions and 8 deletions
|
|
@ -9,10 +9,19 @@ if [ -d "/app/.cache/prisma-python/binaries" ] && [ ! -d "/tmp/.cache/prisma-pyt
|
|||
echo "Prisma binaries copied successfully"
|
||||
fi
|
||||
|
||||
# Set runtime cache locations to /tmp (writable even in read-only root filesystem)
|
||||
export XDG_CACHE_HOME="${XDG_CACHE_HOME:-/tmp/.cache}"
|
||||
export NPM_CONFIG_CACHE="${NPM_CONFIG_CACHE:-/tmp/npm-cache}"
|
||||
export PRISMA_BINARY_CACHE_DIR="${PRISMA_BINARY_CACHE_DIR:-/tmp/.cache/prisma-python/binaries}"
|
||||
# Override Dockerfile ENV defaults that point to read-only /app/.cache,
|
||||
# but respect user-provided overrides (e.g. via K8s pod spec, docker-compose).
|
||||
# The Dockerfile.non_root sets these to /app/.cache/... at build time, but at
|
||||
# runtime /app is read-only, so we redirect to /tmp which is always writable.
|
||||
if [ "$XDG_CACHE_HOME" = "/app/.cache" ] || [ -z "$XDG_CACHE_HOME" ]; then
|
||||
export XDG_CACHE_HOME="/tmp/.cache"
|
||||
fi
|
||||
if [ "$NPM_CONFIG_CACHE" = "/app/.cache/npm" ] || [ -z "$NPM_CONFIG_CACHE" ]; then
|
||||
export NPM_CONFIG_CACHE="/tmp/npm-cache"
|
||||
fi
|
||||
if [ "$PRISMA_BINARY_CACHE_DIR" = "/app/.cache/prisma-python/binaries" ] || [ -z "$PRISMA_BINARY_CACHE_DIR" ]; then
|
||||
export PRISMA_BINARY_CACHE_DIR="/tmp/.cache/prisma-python/binaries"
|
||||
fi
|
||||
|
||||
# Run the Python migration script
|
||||
python3 litellm/proxy/prisma_migration.py
|
||||
|
|
|
|||
|
|
@ -8,10 +8,19 @@ if [ -d "/app/.cache/prisma-python/binaries" ] && [ ! -d "/tmp/.cache/prisma-pyt
|
|||
echo "Prisma binaries copied successfully"
|
||||
fi
|
||||
|
||||
# Set runtime cache locations to /tmp (writable even in read-only root filesystem)
|
||||
export XDG_CACHE_HOME="${XDG_CACHE_HOME:-/tmp/.cache}"
|
||||
export NPM_CONFIG_CACHE="${NPM_CONFIG_CACHE:-/tmp/npm-cache}"
|
||||
export PRISMA_BINARY_CACHE_DIR="${PRISMA_BINARY_CACHE_DIR:-/tmp/.cache/prisma-python/binaries}"
|
||||
# Override Dockerfile ENV defaults that point to read-only /app/.cache,
|
||||
# but respect user-provided overrides (e.g. via K8s pod spec, docker-compose).
|
||||
# The Dockerfile.non_root sets these to /app/.cache/... at build time, but at
|
||||
# runtime /app is read-only, so we redirect to /tmp which is always writable.
|
||||
if [ "$XDG_CACHE_HOME" = "/app/.cache" ] || [ -z "$XDG_CACHE_HOME" ]; then
|
||||
export XDG_CACHE_HOME="/tmp/.cache"
|
||||
fi
|
||||
if [ "$NPM_CONFIG_CACHE" = "/app/.cache/npm" ] || [ -z "$NPM_CONFIG_CACHE" ]; then
|
||||
export NPM_CONFIG_CACHE="/tmp/npm-cache"
|
||||
fi
|
||||
if [ "$PRISMA_BINARY_CACHE_DIR" = "/app/.cache/prisma-python/binaries" ] || [ -z "$PRISMA_BINARY_CACHE_DIR" ]; then
|
||||
export PRISMA_BINARY_CACHE_DIR="/tmp/.cache/prisma-python/binaries"
|
||||
fi
|
||||
|
||||
if [ "$SEPARATE_HEALTH_APP" = "1" ]; then
|
||||
export LITELLM_ARGS="$@"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue