Skip to content

Commit c7392d4

Browse files
committed
local-ai-cc: adjust some things
Signed-off-by: Simon L. <[email protected]>
1 parent 35ff787 commit c7392d4

File tree

2 files changed

+17
-15
lines changed

2 files changed

+17
-15
lines changed

community-containers/local-ai/local-ai.json

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,23 @@
66
"documentation": "https://github.com/nextcloud/all-in-one/tree/main/community-containers/local-ai",
77
"image": "szaimen/aio-local-ai",
88
"image_tag": "v2",
9-
"internal_port": "8080",
9+
"internal_port": "8000",
1010
"restart": "unless-stopped",
11+
"ports": [
12+
{
13+
"ip_binding": "%APACHE_IP_BINDING%",
14+
"port_number": "8000",
15+
"protocol": "tcp"
16+
}
17+
],
1118
"environment": [
1219
"TZ=%TIMEZONE%",
13-
"MODELS_PATH=/models"
20+
"MODELS_PATH=/models",
21+
"API_KEY=%LOCAL_AI_API_KEY%",
22+
"LOCALAI_ADDRESS=:8000"
23+
],
24+
"secrets": [
25+
"LOCAL_AI_API_KEY"
1426
],
1527
"volumes": [
1628
{
@@ -22,11 +34,6 @@
2234
"source": "nextcloud_aio_localai_images",
2335
"destination": "/tmp/generated/images/",
2436
"writeable": true
25-
},
26-
{
27-
"source": "%NEXTCLOUD_DATADIR%",
28-
"destination": "/nextcloud",
29-
"writeable": false
3037
}
3138
],
3239
"enable_nvidia_gpu": false,
@@ -37,7 +44,8 @@
3744
"php /var/www/html/occ files:scan --path='/admin/files/nextcloud-aio-local-ai'",
3845
"php /var/www/html/occ app:install integration_openai",
3946
"php /var/www/html/occ app:enable integration_openai",
40-
"php /var/www/html/occ config:app:set integration_openai url --value http://nextcloud-aio-local-ai:8080",
47+
"php /var/www/html/occ config:app:set integration_openai url --value http://nextcloud-aio-local-ai:8000",
48+
"php /var/www/html/occ config:app:set integration_openai api_key --value $LOCAL_AI_API_KEY",
4149
"php /var/www/html/occ app:install assistant",
4250
"php /var/www/html/occ app:enable assistant"
4351
]

community-containers/local-ai/readme.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,7 @@ This container bundles Local AI and auto-configures it for you.
33

44
### Notes
55
- 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.
6-
- 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.
7-
- Example for content of `models.yaml` (if you add all of them, it takes around 10GB additional space):
8-
```yaml
9-
# Stable Diffusion in NCNN with c++, supported txt2img and img2img
10-
- url: github:mudler/LocalAI/blob/master/gallery/stablediffusion.yaml
11-
name: Stable_diffusion
12-
```
6+
- After the container was started the first time, you can open `http://ip.address.of.server:8000` and log in with the api key that you can retreive when running...
137
- 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.
148
- See [this guide](https://github.com/nextcloud/all-in-one/discussions/5430) for how to improve AI task pickup speed
159
- See https://github.com/nextcloud/all-in-one/tree/main/community-containers#community-containers how to add it to the AIO stack

0 commit comments

Comments
 (0)