Adjust local-ai community container to add Vulkan support (#5797)

Signed-off-by: Jean-Yves <7360784+docjyJ@users.noreply.github.com>
Co-authored-by: Simon L. <szaimen@e.mail.de>
This commit is contained in:
Jean-Yves 2026-01-29 16:11:04 +01:00 committed by GitHub
parent ffd8dac1b4
commit 12b065f9b6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 42 additions and 29 deletions

View file

@ -1,5 +1,5 @@
## Caddy with geoblocking ## Caddy with geoblocking
This container bundles caddy and auto-configures it for you. It also covers [vaultwarden](https://github.com/nextcloud/all-in-one/tree/main/community-containers/vaultwarden) by listening on `bw.$NC_DOMAIN`, if installed. It also covers [stalwart](https://github.com/nextcloud/all-in-one/tree/main/community-containers/stalwart) by listening on `mail.$NC_DOMAIN`, if installed. It also covers [jellyfin](https://github.com/nextcloud/all-in-one/tree/main/community-containers/jellyfin) by listening on `media.$NC_DOMAIN`, if installed. It also covers [lldap](https://github.com/nextcloud/all-in-one/tree/main/community-containers/lldap) by listening on `ldap.$NC_DOMAIN`, if installed. It also covers [nocodb](https://github.com/nextcloud/all-in-one/tree/main/community-containers/nocodb) by listening on `tables.$NC_DOMAIN`, if installed. It also covers [jellyseerr](https://github.com/nextcloud/all-in-one/tree/main/community-containers/jellyseerr) by listening on `requests.$NC_DOMAIN`, if installed. It also covers [nextcloud-exporter](https://github.com/nextcloud/all-in-one/tree/main/community-containers/nextcloud-exporter) by listening on `metrics.$NC_DOMAIN`, if installed. This container bundles caddy and auto-configures it for you. It also covers [vaultwarden](https://github.com/nextcloud/all-in-one/tree/main/community-containers/vaultwarden) by listening on `bw.$NC_DOMAIN`, if installed. It also covers [stalwart](https://github.com/nextcloud/all-in-one/tree/main/community-containers/stalwart) by listening on `mail.$NC_DOMAIN`, if installed. It also covers [jellyfin](https://github.com/nextcloud/all-in-one/tree/main/community-containers/jellyfin) by listening on `media.$NC_DOMAIN`, if installed. It also covers [lldap](https://github.com/nextcloud/all-in-one/tree/main/community-containers/lldap) by listening on `ldap.$NC_DOMAIN`, if installed. It also covers [nocodb](https://github.com/nextcloud/all-in-one/tree/main/community-containers/nocodb) by listening on `tables.$NC_DOMAIN`, if installed. It also covers [jellyseerr](https://github.com/nextcloud/all-in-one/tree/main/community-containers/jellyseerr) by listening on `requests.$NC_DOMAIN`, if installed. It also covers [nextcloud-exporter](https://github.com/nextcloud/all-in-one/tree/main/community-containers/nextcloud-exporter) by listening on `metrics.$NC_DOMAIN`, if installed. It also covers [LocalAI](https://github.com/nextcloud/all-in-one/tree/main/community-containers/local-ai) by listening on `ai.$NC_DOMAIN`, if installed.
### Notes ### Notes
- This container is incompatible with the [npmplus](https://github.com/nextcloud/all-in-one/tree/main/community-containers/npmplus) community container. So make sure that you do not enable both at the same time! - This container is incompatible with the [npmplus](https://github.com/nextcloud/all-in-one/tree/main/community-containers/npmplus) community container. So make sure that you do not enable both at the same time!
@ -14,6 +14,7 @@ This container bundles caddy and auto-configures it for you. It also covers [vau
- If you want to use this with [nocodb](https://github.com/nextcloud/all-in-one/tree/main/community-containers/nocodb), make sure that you point `tables.your-nc-domain.com` to your server using a cname record so that caddy can get a certificate automatically for nocodb. - If you want to use this with [nocodb](https://github.com/nextcloud/all-in-one/tree/main/community-containers/nocodb), make sure that you point `tables.your-nc-domain.com` to your server using a cname record so that caddy can get a certificate automatically for nocodb.
- If you want to use this with [jellyseerr](https://github.com/nextcloud/all-in-one/tree/main/community-containers/jellyseerr), make sure that you point `requests.your-nc-domain.com` to your server using a cname record so that caddy can get a certificate automatically for jellyseerr. - If you want to use this with [jellyseerr](https://github.com/nextcloud/all-in-one/tree/main/community-containers/jellyseerr), make sure that you point `requests.your-nc-domain.com` to your server using a cname record so that caddy can get a certificate automatically for jellyseerr.
- If you want to use this with [nextcloud-exporter](https://github.com/nextcloud/all-in-one/tree/main/community-containers/nextcloud-exporter), make sure that you point `metrics.your-nc-domain.com` to your server using a cname record so that caddy can get a certificate automatically for nextcloud-exporter. - If you want to use this with [nextcloud-exporter](https://github.com/nextcloud/all-in-one/tree/main/community-containers/nextcloud-exporter), make sure that you point `metrics.your-nc-domain.com` to your server using a cname record so that caddy can get a certificate automatically for nextcloud-exporter.
- If you want to use this with [local AI](https://github.com/nextcloud/all-in-one/tree/main/community-containers/local-ai), make sure that you point `ai.your-nc-domain.com` to your server using a cname record so that caddy can get a certificate automatically for local AI.
- After the container was started the first time, you should see a new `nextcloud-aio-caddy` folder and inside there an `allowed-countries.txt` file when you open the files app with the default `admin` user. In there you can adjust the allowed country codes for caddy by adding them to the first line, e.g. `IT FR` would allow access from italy and france. Private ip-ranges are always allowed. Additionally, in order to activate this config, you need to get an account at https://dev.maxmind.com/geoip/geolite2-free-geolocation-data and download the `GeoLite2-Country.mmdb` and upload it with this exact name into the `nextcloud-aio-caddy` folder. Afterwards restart all containers from the AIO interface and your new config should be active! - After the container was started the first time, you should see a new `nextcloud-aio-caddy` folder and inside there an `allowed-countries.txt` file when you open the files app with the default `admin` user. In there you can adjust the allowed country codes for caddy by adding them to the first line, e.g. `IT FR` would allow access from italy and france. Private ip-ranges are always allowed. Additionally, in order to activate this config, you need to get an account at https://dev.maxmind.com/geoip/geolite2-free-geolocation-data and download the `GeoLite2-Country.mmdb` and upload it with this exact name into the `nextcloud-aio-caddy` folder. Afterwards restart all containers from the AIO interface and your new config should be active!
- You can add your own Caddy configurations in `/data/caddy-imports/` inside the Caddy container (`sudo docker exec -it nextcloud-aio-caddy bash`). These will be imported on container startup. **Please note:** If you do not have CLI access to the server, you can now run docker commands via a web session by using this community container: https://github.com/nextcloud/all-in-one/tree/main/community-containers/container-management - You can add your own Caddy configurations in `/data/caddy-imports/` inside the Caddy container (`sudo docker exec -it nextcloud-aio-caddy bash`). These will be imported on container startup. **Please note:** If you do not have CLI access to the server, you can now run docker commands via a web session by using this community container: https://github.com/nextcloud/all-in-one/tree/main/community-containers/container-management
- See https://github.com/nextcloud/all-in-one/tree/main/community-containers#community-containers how to add it to the AIO stack - See https://github.com/nextcloud/all-in-one/tree/main/community-containers#community-containers how to add it to the AIO stack

View file

@ -4,42 +4,59 @@
"container_name": "nextcloud-aio-local-ai", "container_name": "nextcloud-aio-local-ai",
"display_name": "Local AI", "display_name": "Local AI",
"documentation": "https://github.com/nextcloud/all-in-one/tree/main/community-containers/local-ai", "documentation": "https://github.com/nextcloud/all-in-one/tree/main/community-containers/local-ai",
"image": "ghcr.io/szaimen/aio-local-ai", "image": "ghcr.io/docjyj/aio-local-ai-vulkan",
"image_tag": "v2", "image_tag": "v1",
"internal_port": "8080", "internal_port": "10078",
"restart": "unless-stopped", "restart": "unless-stopped",
"environment": [ "environment": [
"TZ=%TIMEZONE%", "TZ=%TIMEZONE%",
"MODELS_PATH=/models" "LOCALAI_API_KEY=%LOCALAI_API_KEY%",
"LOCALAI_ADDRESS=:10078",
"LOCALAI_CONFIG_DIR=/configuration",
"LOCALAI_MODEL_PATH=/models",
"LOCALAI_BACKEND_PATH=/backends"
],
"ports": [
{
"ip_binding": "%APACHE_IP_BINDING%",
"port_number": "10078",
"protocol": "tcp"
}
], ],
"volumes": [ "volumes": [
{
"source": "nextcloud_aio_localai_configuration",
"destination": "/configuration",
"writeable": true
},
{ {
"source": "nextcloud_aio_localai_models", "source": "nextcloud_aio_localai_models",
"destination": "/models", "destination": "/models",
"writeable": true "writeable": true
}, },
{ {
"source": "nextcloud_aio_localai_images", "source": "nextcloud_aio_localai_backends",
"destination": "/tmp/generated/images/", "destination": "/backends",
"writeable": true "writeable": true
},
{
"source": "%NEXTCLOUD_DATADIR%",
"destination": "/nextcloud",
"writeable": false
} }
], ],
"enable_nvidia_gpu": false, "secrets": [
"LOCALAI_API_KEY"
],
"ui_secret": "LOCALAI_API_KEY",
"devices": [
"/dev/dri"
],
"nextcloud_exec_commands": [ "nextcloud_exec_commands": [
"mkdir '/mnt/ncdata/admin/files/nextcloud-aio-local-ai'",
"touch '/mnt/ncdata/admin/files/nextcloud-aio-local-ai/models.yaml'",
"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 app:install integration_openai",
"php /var/www/html/occ app:enable 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:8080", "php /var/www/html/occ config:app:set integration_openai url --value http://nextcloud-aio-local-ai:8080",
"php /var/www/html/occ config:app:set integration_openai api_key --value %LOCALAI_API_KEY%",
"php /var/www/html/occ app:install assistant", "php /var/www/html/occ app:install assistant",
"php /var/www/html/occ app:enable assistant" "php /var/www/html/occ app:enable assistant"
],
"backup_volumes": [
"nextcloud_aio_localai_configuration"
] ]
} }
] ]

View file

@ -1,21 +1,16 @@
## Local AI ## Local AI
This container bundles Local AI and auto-configures it for you. This container bundles Local AI and auto-configures it for you. It support hardware acceleration with Vulkan.
### Notes ### 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. Documentation is available on the container repository. This documentation is regularly updated and is intended to be as simple and detailed as possible. Thanks for all your feedback!
- 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): - See https://github.com/docjyJ/aio-local-ai-vulkan#getting-started for getting start with this container.
```yaml
# Stable Diffusion in NCNN with c++, supported txt2img and img2img
- url: github:mudler/LocalAI/blob/master/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 [this guide](https://github.com/nextcloud/all-in-one/discussions/5430) for how to improve AI task pickup speed
- Note that Nextcloud supports only one server for AI queries, so this container cannot be used at the same time as other AI containers.
- See https://github.com/nextcloud/all-in-one/tree/main/community-containers#community-containers how to add it to the AIO stack - See https://github.com/nextcloud/all-in-one/tree/main/community-containers#community-containers how to add it to the AIO stack
### Repository ### Repository
https://github.com/szaimen/aio-local-ai https://github.com/docjyJ/aio-local-ai-vulkan
### Maintainer ### Maintainer
https://github.com/szaimen https://github.com/docjyJ