merge this (#4759)
* wait I forgot to comit locally * cp the entire core directory and then rm the .git subdir
This commit is contained in:
32
scripts/docker-compose.yml
Normal file
32
scripts/docker-compose.yml
Normal file
@@ -0,0 +1,32 @@
|
||||
version: '3.7'
|
||||
services:
|
||||
redis:
|
||||
image: redis:alpine
|
||||
container_name: redis
|
||||
healthcheck:
|
||||
test: ['CMD-SHELL', 'redis-cli ping | grep PONG']
|
||||
interval: 1s
|
||||
timeout: 3s
|
||||
retries: 5
|
||||
ports:
|
||||
- '6379:6379'
|
||||
volumes:
|
||||
- ./data/redis:/data
|
||||
command: redis-server --appendonly yes
|
||||
postgres:
|
||||
image: ankane/pgvector
|
||||
container_name: postgres
|
||||
healthcheck:
|
||||
test: ['CMD-SHELL', 'pg_isready -U postgres']
|
||||
interval: 1s
|
||||
timeout: 3s
|
||||
retries: 5
|
||||
ports:
|
||||
- '5432:5432'
|
||||
environment:
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: postgres
|
||||
POSTGRES_DB: letta
|
||||
volumes:
|
||||
- ./data/postgres:/var/lib/postgresql/data
|
||||
- ./scripts/postgres-db-init/init.sql:/docker-entrypoint-initdb.d/init.sql
|
||||
12
scripts/migrate_tools.py
Normal file
12
scripts/migrate_tools.py
Normal file
@@ -0,0 +1,12 @@
|
||||
from tqdm import tqdm
|
||||
|
||||
from letta.schemas.user import User
|
||||
from letta.services.organization_manager import OrganizationManager
|
||||
from letta.services.tool_manager import ToolManager
|
||||
|
||||
orgs = OrganizationManager().list_organizations(cursor=None, limit=5000)
|
||||
for org in tqdm(orgs):
|
||||
if org.name != "default":
|
||||
fake_user = User(id="user-00000000-0000-4000-8000-000000000000", name="fake", organization_id=org.id)
|
||||
|
||||
ToolManager().upsert_base_tools(actor=fake_user)
|
||||
3
scripts/pack_docker.sh
Normal file
3
scripts/pack_docker.sh
Normal file
@@ -0,0 +1,3 @@
|
||||
export MEMGPT_VERSION=$(letta version)
|
||||
docker buildx build --platform=linux/amd64,linux/arm64,linux/x86_64 --build-arg MEMGPT_ENVIRONMENT=RELEASE -t letta/letta-server:${MEMGPT_VERSION} .
|
||||
docker push letta/letta-server:${MEMGPT_VERSION}
|
||||
16
scripts/wait_for_service.sh
Normal file
16
scripts/wait_for_service.sh
Normal file
@@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
# wait-for-it.sh
|
||||
|
||||
set -e
|
||||
|
||||
host="$1"
|
||||
shift
|
||||
cmd="$@"
|
||||
|
||||
until curl -s "$host" > /dev/null; do
|
||||
>&2 echo "Service is unavailable - sleeping"
|
||||
sleep 1
|
||||
done
|
||||
|
||||
>&2 echo "Service is up - executing command"
|
||||
exec $cmd
|
||||
Reference in New Issue
Block a user