diff --git a/community-containers/local-ai/local-ai.json b/community-containers/local-ai/local-ai.json new file mode 100644 index 00000000..ce3a9dcc --- /dev/null +++ b/community-containers/local-ai/local-ai.json @@ -0,0 +1,41 @@ +{ + "aio_services_v1": [ + { + "container_name": "nextcloud-aio-local-ai", + "display_name": "Local AI", + "documentation": "https://github.com/nextcloud/all-in-one/tree/main/community-containers/local-ai", + "image": "szaimen/aio-local-ai", + "image_tag": "v1", + "internal_port": "8080", + "restart": "unless-stopped", + "environment": [ + "TZ=%TIMEZONE%" + ], + "volumes": [ + { + "source": "nextcloud_aio_localai_models", + "destination": "/models", + "writeable": true + }, + { + "source": "nextcloud_aio_localai_images", + "destination": "/images", + "writeable": true + }, + { + "source": "%NEXTCLOUD_DATADIR%", + "destination": "/nextcloud", + "writeable": false + } + ], + "nextcloud_exec_commands": [ + "mkdir '/mnt/ncdata/admin/files/nextcloud-aio-local-ai'", + "mkdir '/mnt/ncdata/admin/files/nextcloud-aio-local-ai/models'", + "echo 'Scanning nextcloud-aio-local-ai folder for admin user...'", + "php /var/www/html/occ files:scan --path='/admin/files/nextcloud-aio-local-ai'", + "php /var/www/html/occ app:install integration_openai", + "php /var/www/html/occ config:app:set integration_openai url --value http://nextcloud-aio-local-ai:8080" + ] + } + ] +} diff --git a/community-containers/local-ai/readme.md b/community-containers/local-ai/readme.md new file mode 100644 index 00000000..84f2161b --- /dev/null +++ b/community-containers/local-ai/readme.md @@ -0,0 +1,12 @@ +## Local AI +This container bundles Local AI and auto-configures it for you. + +### Notes +- 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` folder. Now you can download models from e.g. https://download.nextcloud.com/server/apps/stt_whisper/ or https://download.nextcloud.com/server/apps/llm/ or others that are mentioned in https://localai.io/model-compatibility/index.html#model-compatibility-table and put them into the `models` folder. Afterwards restart all containers from the AIO interface and the models should automatically get active. Additionally after doing so, you might want to enable specific features for your models in the integration_openai settings: `https://your-nc-domain.com/settings/admin/connected-accounts` +- See https://github.com/nextcloud/all-in-one/tree/main/community-containers how to add it to the AIO stack + +### Repository +https://github.com/szaimen/aio-local-ai + +### Maintainer +https://github.com/szaimen diff --git a/community-containers/readme.md b/community-containers/readme.md index 9291bd54..c6c8e6f1 100644 --- a/community-containers/readme.md +++ b/community-containers/readme.md @@ -12,4 +12,4 @@ Before adding any additional container, make sure to create a backup via the AIO Afterwards, you might want to add additional community containers to the default AIO stack. You can do so by adding `--env AIO_COMMUNITY_CONTAINERS="container1 container2"` to the docker run command of the mastercontainer (but before the last line `nextcloud/all-in-one:latest`! If it was started already, you will need to stop the mastercontainer, remove it (no data will be lost) and recreate it using the docker run command that you initially used) and customize the value to your fitting. It must match the folder names in this directory! ⚠️⚠️⚠️ Please review the folder for documentation on each of the containers before adding them! Not reviewing the documentation for each of them first might break starting the AIO containers because e.g. fail2ban only works on Linux and not on Docker Desktop! ## How to add containers? -Simply submit a PR by creating a new folder in this directory: https://github.com/nextcloud/all-in-one/tree/main/community-containers with the name of your container. It must include a json file with the same name and with correct syntax and a readme.md with additional information. You might get inspired by caddy, fail2ban, plex, pi-hole or vaultwarden (subfolders in this directory). For a full-blown example of the json file, see https://github.com/nextcloud/all-in-one/blob/main/php/containers.json. The json-schema that it validates against can be found here: https://github.com/nextcloud/all-in-one/blob/main/php/containers-schema.json. +Simply submit a PR by creating a new folder in this directory: https://github.com/nextcloud/all-in-one/tree/main/community-containers with the name of your container. It must include a json file with the same name and with correct syntax and a readme.md with additional information. You might get inspired by caddy, fail2ban, local-ai, plex, pi-hole or vaultwarden (subfolders in this directory). For a full-blown example of the json file, see https://github.com/nextcloud/all-in-one/blob/main/php/containers.json. The json-schema that it validates against can be found here: https://github.com/nextcloud/all-in-one/blob/main/php/containers-schema.json.