autogpt / rnd /autogpt_server /README.advanced.md
kakumusic's picture
Upload folder using huggingface_hub
b225a21 verified
|
raw
history blame
1.51 kB

AutoGPT Agent Server Advanced set up

This guide walks you through a dockerized set up, with an external DB (postgres)

Setup

We use the Poetry to manage the dependencies. To set up the project, follow these steps inside this directory:

  1. Install Poetry

    pip install poetry
    
  2. Configure Poetry to use .venv in your project directory

    poetry config virtualenvs.in-project true
    
  3. Enter the poetry shell

    poetry shell
    
  4. Install dependencies

    poetry install
    
  5. Copy .env.example to .env

    cp .env.example .env
    
  6. Generate the Prisma client

    poetry run prisma generate --schema postgres/schema.prisma
    

    In case Prisma generates the client for the global Python installation instead of the virtual environment, the current mitigation is to just uninstall the global Prisma package:

    pip uninstall prisma
    

    Then run the generation again. The path should look something like this:
    <some path>/pypoetry/virtualenvs/autogpt-server-TQIRSwR6-py3.12/bin/prisma

  7. Run the postgres database from the /rnd folder

    cd rnd/
    docker compose up -d
    
  8. Run the migrations (from the autogpt_server folder)

    cd ../autogpt_server
    prisma migrate dev --schema postgres/schema.prisma
    

Running The Server

Starting the server directly

Run the following command:

poetry run app