Skip to main content

Private AI Hub - Host your own Generative AI Services

Project description

Private AI Hub (P8Hub)

"Host and use your own AI Services. Keep everything simple and private."

In an era where AI is transforming every aspect of our lives, I recognized the need for a private and easy-to-use platform where individuals and small teams could host and utilize their own AI services. The inspiration for P8Hub came from the desire to make AI technologies accessible and private, democratizing them for all.

P8Hub

Architecture

Architecture

The architecture of P8Hub consists of two main components: a FastAPI backend and a Next.js frontend. The backend and frontend communicate with each other via REST API. For ease of deployment, I build frontend into static files and serve them from the backend. The interaction with Docker (running, stopping, and monitoring services) is done via Python on Whales package.

Features

Some features are still in development. You can check the progress here.

  • Monitor hardware resources.
  • Service management (start, stop/delete).
  • Service logs viewer.
  • OllamaLLM - General chatbot service.
  • Teachable AI - Teach the computer to classify images - STEAM.
  • docTR - Document Text Recognition.
  • Whishper - Text to speech service.
  • TTS Generation (GPU Only)
  • Docker extension.
  • Image generation service.
  • Add documentation.
  • Add tests.
  • App editor.

The applications were not selected carefully due to limited time. I think many more interesting AI applications can be integrated into P8Hub. If you have any suggestions, please let me know or create a pull request.

I. Installation and Usage

1. Installation

  • Python 3.9 or higher.
  • Install p8hub:
pip install p8hub

2. Usage

  • Run the app:
python -m p8hub.app

or just:

p8hub

You can also run Private AI Hub publicly to your network or change the port with parameters. Example:

p8hub --host 0.0.0.0 --port 8080

3. Docker Extension (Experimental)

Docker Extension allows to extend the functionality of Docker Desktop. We've developed a Docker Extension for P8Hub. You can install it by running:

make install-extension

You should see the extension in Docker Desktop's UI.

P8Hub Docker Extension

Architecture:

P8Hub Docker Extension Architecture

II. Development

1. Clone the source code

git clone https://github.com/vietanhdev/p8hub
cd p8hub

2. Run your backend

  • Python 3.9 or higher.
  • To install from source, from p8hub source code directory, run:
pip install -e .
  • Run the app:
python -m p8hub.app

2. Run your frontend

  • Install the dependencies:
cd frontend
npm install
  • Run the app:
npm run dev

References

DockerML Hackathon 2023

This project was created for the Docker AI/ML Hackathon 2023.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

p8hub-0.0.4.tar.gz (639.7 kB view details)

Uploaded Source

Built Distribution

p8hub-0.0.4-py3-none-any.whl (661.9 kB view details)

Uploaded Python 3

File details

Details for the file p8hub-0.0.4.tar.gz.

File metadata

  • Download URL: p8hub-0.0.4.tar.gz
  • Upload date:
  • Size: 639.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for p8hub-0.0.4.tar.gz
Algorithm Hash digest
SHA256 c210b0a5815ab0a3ec8f37af21f749e60f33337333b18f21c5de31de693293e9
MD5 5a88d58bb5e00e467248ec4b1897f2a9
BLAKE2b-256 8a222c12fbbaaa0dca21ab5258273ae68bd82ed3d26afbffb9f05692ee14b034

See more details on using hashes here.

File details

Details for the file p8hub-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: p8hub-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 661.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for p8hub-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 bfac19e676d777bf885f01b4684848b676a7c9ea14bb0d379d2198cf4a352c3e
MD5 439f417a999b65d44299d814a32075f2
BLAKE2b-256 0a9996365a642b8d2b3023366c15b8ef24be9e245a3e5963d012e1432952ed83

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page