Skip to content

Add local-ai community container with Vulkan support #5797

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions community-containers/local-ai-vulkan/local-ai-vulkan.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"aio_services_v1": [
{
"container_name": "nextcloud-aio-local-ai-vulkan",
"display_name": "Local AI",
"documentation": "https://github.com/nextcloud/all-in-one/tree/main/community-containers/local-ai-vulkan",
"image": "docjyJ/aio-local-ai-vulkan",
"image_tag": "%AIO_CHANNEL%",
"internal_port": "8080",
"restart": "unless-stopped",
"environment": [
"TZ=%TIMEZONE%",
"MODELS_PATH=/models"
],
"volumes": [
{
"source": "nextcloud_aio_localai_vulkan_models",
"destination": "/models",
"writeable": true
},
{
"source": "nextcloud_aio_localai_vulkan_images",
"destination": "/tmp/generated/images/",
"writeable": true
},
{
"source": "%NEXTCLOUD_DATADIR%",
"destination": "/nextcloud",
"writeable": false
}
],
"devices": [
"/dev/dri"
],
"enable_nvidia_gpu": true,
"nextcloud_exec_commands": [
"mkdir '/mnt/ncdata/admin/files/nextcloud-aio-local-ai-vulkan'",
"touch '/mnt/ncdata/admin/files/nextcloud-aio-local-ai-vulkan/models.yaml'",
"echo 'Scanning nextcloud-aio-local-ai-vulkan folder for admin user...'",
"php /var/www/html/occ files:scan --path='/admin/files/nextcloud-aio-local-ai-vulkan'",
"php /var/www/html/occ app:install integration_openai",
"php /var/www/html/occ app:enable integration_openai",
"php /var/www/html/occ config:app:set integration_openai url --value http://nextcloud-aio-local-ai-vulkan:8080",
"php /var/www/html/occ app:install assistant",
"php /var/www/html/occ app:enable assistant"
]
}
]
}
23 changes: 23 additions & 0 deletions community-containers/local-ai-vulkan/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[//]: # (TODO update the readme)

## Local AI
This container bundles Local AI and auto-configures it for you.

### Notes
- Make sure to have enough storage space available. This container alone needs ~7GB storage. Every model that you add to `models.yaml` will of course use additional space which adds up quite fast.
- After the container was started the first time, you should see a new `nextcloud-aio-local-ai` folder when you open the files app with the default `admin` user. In there you should see a `models.yaml` config file. You can now add models in there. Please refer [here](https://github.com/mudler/LocalAI/blob/master/gallery/index.yaml) where you can get further urls that you can put in there. Afterwards restart all containers from the AIO interface and the models should automatically get downloaded by the local-ai container and activated.
- Example for content of `models.yaml` (if you add all of them, it takes around 10GB additional space):
```yaml
# Stable Diffusion in NCNN with c++, supported txt2img and img2img
- url: github:mudler/LocalAI/gallery/stablediffusion.yaml
name: Stable_diffusion
```
- To make it work, you first need to browse `https://your-nc-domain.com/settings/admin/ai` and enable or disable specific features for your models in the openAI settings. Afterwards using the Nextcloud Assistant should work.
- See [this guide](https://github.com/nextcloud/all-in-one/discussions/5430) for how to improve AI task pickup speed
- See https://github.com/nextcloud/all-in-one/tree/main/community-containers#community-containers how to add it to the AIO stack

### Repository
https://github.com/szaimen/aio-local-ai

### Maintainer
https://github.com/szaimen
Loading