Skip to content

Latest commit

 

History

History
76 lines (51 loc) · 3.79 KB

README.md

File metadata and controls

76 lines (51 loc) · 3.79 KB

Nendo Platform API server


Nendo Core


Website Twitter Discord


The Nendo API Server is the backend component of Nendo Platform. It builds on Nendo and provides a set of powerful features for managing large libraries of audio files, organizing them in collections and running AI models on them.

The most straightforward way to run Nendo API Server is as part of Nendo Platform, so it is recommended to refer to that repo for deployment instructions.

Features

  • FastAPI server with swagger documentation.
  • Uses a highly performant PostgresDB implementation of the Nendo Library.
  • Scheduling of dockerized AI actions via Redis.
  • User management based on email/password combinations. OAuth forthcoming.
  • Extensible architecture that allows for quick integration of new application routes into the server.

Requirements

The Nendo API Server requires a PostgresDB instance running either locally or remotely that is reachable from where the server is running. The default configuration assumes that the database is running on localhost, port 5432 and has a user called nendo with password nendo and a database nendo, for which the user has full rights. If your environment is different, use environment variables to configure the server according to your setup. Furthermore, to use the embedding features, make sure that the PostgresDB instance has the pgvector extension installed. Follow the instructions presented in the README of the PostgresDB implementation of the Nendo Library to set it up.

Furthermore, the Nendo API Server needs access to a Redis instance for scheduling of actions.

Installation

To setup the Nendo API Server, just make sure you are running python >= 3.8 and < 3.11. Then install the dependencies:

pip install -r requirements.txt

Running

To run a nendo API server instance locally on port 8000, just use the startup script start_server.sh.

Alternatively, you can start a new nendo server by calling uvicorn directly (the --reload flag enables hot-reloading)

cd nendo_server
uvicorn main:app --host 127.0.0.1 --port 8000 --reload

Configuration

To configure the Nendo API Server, the use of environment variables is recommended. Refer to the documentation for more information.

Development

Tip: We recommend using the Nendo Platform for development, as it's very easy to set up. Just follow the instructions there and you'll be ready to work on the development of the Nendo API Server within minutes.

If you want to work on the development of the Nendo API Server without using docker, you can use the start_server_dev.sh script, which will enable hot-reloading.

To also work on the development of nendo, go to local path containing your nendo code and run

pip3 install -e ./

to install the package in editable mode. Now you can change nendo's core codebase and the changes will be reflected upon restart of nendo_server.