# 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](https://raw.githubusercontent.com/vietanhdev/vietanhdev/main/p8hub/screenshot.png)
## Architecture
![Architecture](https://raw.githubusercontent.com/vietanhdev/vietanhdev/main/p8hub/p8hub-architecture.svg)
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](https://pypi.org/project/python-on-whales/) package.
## Features
Some features are still in development. You can check the progress here.
- [x] Monitor hardware resources.
- [x] Service management (start, stop/delete).
- [x] Service logs viewer.
- [x] [OllamaLLM](https://github.com/ollama-webui/ollama-webui) - General chatbot service.
- [x] **Teachable AI** - Teach the computer to classify images - STEAM.
- [x] [docTR](https://github.com/mindee/doctr) - Document Text Recognition.
- [x] [Whishper](https://github.com/pluja/whishper/) - Text to speech service.
- [x] [TTS Generation](https://github.com/rsxdalv/tts-generation-webui) (GPU Only)
- [x] 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](https://github.com/vietanhdev/p8hub/pulls) or create a pull request.
## I. Installation and Usage
### 1. Installation
- Python 3.9 or higher.
- Install **p8hub**:
```shell
pip install p8hub
```
### 2. Usage
- Run the app:
```shell
python -m p8hub.app
```
or just:
```shell
p8hub
```
- Go to <http://localhost:5678/> to see the user interface.
You can also run Private AI Hub publicly to your network or change the port with parameters. Example:
```shell
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:
```shell
make install-extension
```
You should see the extension in Docker Desktop's UI.
![P8Hub Docker Extension](https://raw.githubusercontent.com/vietanhdev/vietanhdev/main/p8hub/p8hub-docker-extension-screenshot.png)
**Architecture:**
![P8Hub Docker Extension Architecture](https://raw.githubusercontent.com/vietanhdev/vietanhdev/main/p8hub/p8hub-docker-extension.svg)
## II. Development
### 1. Clone the source code
```shell
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:
```shell
pip install -e .
```
- Run the app:
```shell
python -m p8hub.app
```
- Go to <http://localhost:5678/> to see the user interface.
### 2. Run your frontend
- Install the dependencies:
```shell
cd frontend
npm install
```
- Run the app:
```shell
npm run dev
```
- Go to <http://localhost:3000/> to see the user interface. Use this address to develop the frontend.
## References
- Next Template: [https://github.com/shadcn-ui/next-template](https://github.com/shadcn-ui/next-template).
- PAutoBot: [https://github.com/nrl-ai/pautobot](https://github.com/nrl-ai/pautobot).
![DockerML Hackathon 2023](https://raw.githubusercontent.com/vietanhdev/vietanhdev/main/p8hub/dockerml2023.jpeg)
This project was created for the [Docker AI/ML Hackathon 2023](https://docker.devpost.com/).
Raw data
{
"_id": null,
"home_page": "https://github.com/vietanhdev/p8hub",
"name": "p8hub",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "Platform,Local,Generative AI,GPT,LLM,Stable Diffusion,Docker",
"author": "Viet-Anh Nguyen",
"author_email": "vietanh.dev@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/8a/22/2c12fbbaaa0dca21ab5258273ae68bd82ed3d26afbffb9f05692ee14b034/p8hub-0.0.4.tar.gz",
"platform": null,
"description": "# Private AI Hub (P8Hub)\n\n**\"Host and use your own AI Services. Keep everything simple and private.\"**\n\nIn 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.\n\n![P8Hub](https://raw.githubusercontent.com/vietanhdev/vietanhdev/main/p8hub/screenshot.png)\n\n## Architecture\n\n![Architecture](https://raw.githubusercontent.com/vietanhdev/vietanhdev/main/p8hub/p8hub-architecture.svg)\n\nThe 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](https://pypi.org/project/python-on-whales/) package.\n\n## Features\n\nSome features are still in development. You can check the progress here.\n\n- [x] Monitor hardware resources.\n- [x] Service management (start, stop/delete).\n- [x] Service logs viewer.\n- [x] [OllamaLLM](https://github.com/ollama-webui/ollama-webui) - General chatbot service.\n- [x] **Teachable AI** - Teach the computer to classify images - STEAM.\n- [x] [docTR](https://github.com/mindee/doctr) - Document Text Recognition.\n- [x] [Whishper](https://github.com/pluja/whishper/) - Text to speech service.\n- [x] [TTS Generation](https://github.com/rsxdalv/tts-generation-webui) (GPU Only)\n- [x] Docker extension.\n- [ ] Image generation service.\n- [ ] Add documentation.\n- [ ] Add tests.\n- [ ] App editor.\n\nThe 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](https://github.com/vietanhdev/p8hub/pulls) or create a pull request.\n\n## I. Installation and Usage\n\n### 1. Installation\n\n- Python 3.9 or higher.\n- Install **p8hub**:\n\n```shell\npip install p8hub\n```\n\n### 2. Usage\n\n- Run the app:\n\n```shell\npython -m p8hub.app\n```\n\nor just:\n\n```shell\np8hub\n```\n\n- Go to <http://localhost:5678/> to see the user interface.\n\nYou can also run Private AI Hub publicly to your network or change the port with parameters. Example:\n\n```shell\np8hub --host 0.0.0.0 --port 8080\n```\n\n### 3. Docker Extension (Experimental)\n\nDocker Extension allows to extend the functionality of Docker Desktop. We've developed a Docker Extension for P8Hub. You can install it by running:\n\n```shell\nmake install-extension\n```\n\nYou should see the extension in Docker Desktop's UI.\n\n![P8Hub Docker Extension](https://raw.githubusercontent.com/vietanhdev/vietanhdev/main/p8hub/p8hub-docker-extension-screenshot.png)\n\n**Architecture:**\n\n![P8Hub Docker Extension Architecture](https://raw.githubusercontent.com/vietanhdev/vietanhdev/main/p8hub/p8hub-docker-extension.svg)\n\n\n## II. Development\n\n### 1. Clone the source code\n\n```shell\ngit clone https://github.com/vietanhdev/p8hub\ncd p8hub\n```\n\n### 2. Run your backend\n\n- Python 3.9 or higher.\n- To install from source, from `p8hub` source code directory, run:\n\n```shell\npip install -e .\n```\n\n- Run the app:\n\n```shell\npython -m p8hub.app\n```\n\n- Go to <http://localhost:5678/> to see the user interface.\n\n### 2. Run your frontend\n\n- Install the dependencies:\n\n```shell\ncd frontend\nnpm install\n```\n\n- Run the app:\n\n```shell\nnpm run dev\n```\n\n- Go to <http://localhost:3000/> to see the user interface. Use this address to develop the frontend.\n\n## References\n\n- Next Template: [https://github.com/shadcn-ui/next-template](https://github.com/shadcn-ui/next-template).\n- PAutoBot: [https://github.com/nrl-ai/pautobot](https://github.com/nrl-ai/pautobot).\n\n![DockerML Hackathon 2023](https://raw.githubusercontent.com/vietanhdev/vietanhdev/main/p8hub/dockerml2023.jpeg)\n\nThis project was created for the [Docker AI/ML Hackathon 2023](https://docker.devpost.com/).\n",
"bugtrack_url": null,
"license": "Apache License 2.0",
"summary": "Private AI Hub - Host your own Generative AI Services",
"version": "0.0.4",
"project_urls": {
"Homepage": "https://github.com/vietanhdev/p8hub"
},
"split_keywords": [
"platform",
"local",
"generative ai",
"gpt",
"llm",
"stable diffusion",
"docker"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "0a9996365a642b8d2b3023366c15b8ef24be9e245a3e5963d012e1432952ed83",
"md5": "439f417a999b65d44299d814a32075f2",
"sha256": "bfac19e676d777bf885f01b4684848b676a7c9ea14bb0d379d2198cf4a352c3e"
},
"downloads": -1,
"filename": "p8hub-0.0.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "439f417a999b65d44299d814a32075f2",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 661913,
"upload_time": "2023-11-04T05:39:51",
"upload_time_iso_8601": "2023-11-04T05:39:51.670378Z",
"url": "https://files.pythonhosted.org/packages/0a/99/96365a642b8d2b3023366c15b8ef24be9e245a3e5963d012e1432952ed83/p8hub-0.0.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "8a222c12fbbaaa0dca21ab5258273ae68bd82ed3d26afbffb9f05692ee14b034",
"md5": "5a88d58bb5e00e467248ec4b1897f2a9",
"sha256": "c210b0a5815ab0a3ec8f37af21f749e60f33337333b18f21c5de31de693293e9"
},
"downloads": -1,
"filename": "p8hub-0.0.4.tar.gz",
"has_sig": false,
"md5_digest": "5a88d58bb5e00e467248ec4b1897f2a9",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 639705,
"upload_time": "2023-11-04T05:39:54",
"upload_time_iso_8601": "2023-11-04T05:39:54.430955Z",
"url": "https://files.pythonhosted.org/packages/8a/22/2c12fbbaaa0dca21ab5258273ae68bd82ed3d26afbffb9f05692ee14b034/p8hub-0.0.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-11-04 05:39:54",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "vietanhdev",
"github_project": "p8hub",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "urllib3",
"specs": [
[
"==",
"2.0.2"
]
]
},
{
"name": "unstructured",
"specs": [
[
"==",
"0.6.6"
]
]
},
{
"name": "extract-msg",
"specs": [
[
"==",
"0.41.1"
]
]
},
{
"name": "tabulate",
"specs": [
[
"==",
"0.9.0"
]
]
},
{
"name": "python-multipart",
"specs": [
[
"==",
"0.0.6"
]
]
},
{
"name": "fastapi",
"specs": [
[
"==",
"0.96.0"
]
]
},
{
"name": "SQLAlchemy",
"specs": [
[
"==",
"2.0.15"
]
]
},
{
"name": "alembic",
"specs": [
[
"==",
"1.11.1"
]
]
},
{
"name": "requests",
"specs": [
[
"==",
"2.31.0"
]
]
},
{
"name": "PyYAML",
"specs": [
[
"==",
"6.0.1"
]
]
},
{
"name": "psutil",
"specs": [
[
"==",
"5.9.6"
]
]
},
{
"name": "python-on-whales",
"specs": [
[
"==",
"0.65.0"
]
]
}
],
"lcname": "p8hub"
}