Skip to content
Snippets Groups Projects
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
README.md 4.22 KiB

Database-Server

The Database-Server package provides server side implementation of Database-API. It is a collection of wrapped retrieval methods.

database-server Package

The database-server Package contains only a placeholder database_app Flask application at the moment.

Deploying

Use the wheel:

pip install database-server --index-url https://gitlab.fachschaften.org/api/v4/projects/2724/packages/pypi/simple

Or install the package directly:

python3 -m pip install .

This currently installs two executables in the default python bin directory:

  • database-server is the server application
  • database-server-opensearch for direct OpenSearch interfacing

Project setup

Services

All services used by the database-server are defined in the docker-compose.yml file. Make sure to edit .env to contain your HuggingFace API token, since the jinaai models require authorization. You can start the services all together with:

cd database-server-services
docker compose --profile cpu up -d # or --profile cuda

NOTE: This will load some large models via TEI into memory.

To only start selected services, run something like:

cd database-server-services
docker compose up tei-jinaai-jina-embedding-v2-small-en-cpu opensearch-node1 -d

Testing the API manually

Start the server by running: