Giter VIP home page Giter VIP logo

local_ai_manager's Introduction

Local AI Manager

Allows you to run/monitor local AI tools like oobabooga/text-generation-webui with a service in the background.

Supported Tools

WARNING: In both cases the manager will start the WebUI with the --listen flag which means the tool will be accessible by other devices in your network.

Supported Manager

  • MQTT

Setup

Virtual Environment

The manager is tested using venv. It might work with other virtual environments if they provide a file bin/activate which can be sourced to activate the virtual environment.

oobabooga/text-generation-webui

When using the text-generation-webui, the manager assumes there is an executable webui.sh located in the folder defined as OOBABOOGA_LOCATION which starts the WebUI.

The easiest way to get started is by just adding the line python server.py to your webui.sh. Optional you cann pass through the arguments given to webui.sh which is usefull as the manager passes the --listen flag to webui.sh.

python server.py $@

Requirements

MQTT Manager:

  • paho-mqtt

Usage

Each manager can be started using the according python script in project root. The manager can then be configured using command line arguments. Use --help to get a detailed information about the available attributes.

Each configuration can also be defined using an environment variable. The required name is also given with the --help command

Run in background

For linux devices there is a service for each manager in services/. Just fill in the missing bits like the user and the path to the *_manager.py and copy it into your systemd folder /etc/systemd/**.

The startup options for the manager are loaded as environment variables from a config file by the systemd service. An example is provided in services/. Copy this file to the location defined in the systemd file (/etc/local_ai_manager/*.conf) and set the variables according to your setup.

As this file might include secrets, make sure to set the permissions so that only user with admin rights can read (and edit) this file.

Now you can start the service and enable it to autostart.

systemctl daemon-reload
systemctl start *_ai_manager
systemctl enable *_ai_manager

Check the status of your service with systemctl status *_ai_manager.

Standalone systemd services

This repository also features some standalone systemd services which can be used to run the given tool in the background.

Supported Tools

local_ai_manager's People

Contributors

lufixsch avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.