You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+13-19Lines changed: 13 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,11 +11,11 @@
11
11
>
12
12
> The HTTP request timeout is 50 minutes for all requests and can be changed with the `request_timeout` app config for the php app `context_chat` using the occ command (`occ config:app:set context_chat request_timeout --value=3000`, value is in seconds). The same also needs to be done for docker socket proxy. See [Slow responding ExApps](https://github.com/cloud-py-api/docker-socket-proxy?tab=readme-ov-file#slow-responding-exapps)
13
13
>
14
-
> An end-to-end example on how to build and register the backend manually (with CUDA) is at the end of this readme
14
+
> An end-to-end example for dev setups on how to build and register the backend manually (with CUDA) is at the end of this readme
15
15
>
16
16
> See the [NC Admin docs](https://docs.nextcloud.com/server/latest/admin_manual/ai/app_context_chat.html) for requirements and known limitations.
17
17
18
-
## Simple Install
18
+
## Install
19
19
20
20
Install the given apps for Context Chat to work as desired **in the given order**:
21
21
-[AppAPI from the Apps page](https://apps.nextcloud.com/apps/app_api)
@@ -32,25 +32,26 @@ Install the given apps for Context Chat to work as desired **in the given order*
32
32
> [!IMPORTANT]
33
33
> To avoid task processing execution delay, setup at 4 background job workers in the main server (where Nextcloud is installed). The setup process is documented here: https://docs.nextcloud.com/server/latest/admin_manual/ai/overview.html#improve-ai-task-pickup-speed
34
34
35
-
## Complex Install (without docker)
35
+
## Dev Install (without docker)
36
36
37
-
0. Install the required apps from [Simple Install](#simple-install) other than Context Chat Backend and setup background job workers
37
+
0. Install the required apps from [Install](#install) other than Context Chat Backend and setup background job workers
5. Copy example.env to .env and fill in the variables
43
-
6. Ensure the config file at `persistent_storage/config.yaml` points to the correct config file (cpu vs gpu). If you're unsure, delete it. It will be recreated upon launching the application. The default is to point to the gpu config.
44
-
7. Configure `persistent_storage/config.yaml` for the model name, model type and its parameters (which also includes model file's path and model id as per requirements, see example config)
43
+
6. Ensure the config file at `persistent_storage/config.yaml` points to the correct config file (cpu vs gpu). If you're unsure, delete it. It will be recreated upon launching the application.
44
+
7. Configure `persistent_storage/config.yaml`
45
45
8. Setup postgresql externally or use `dockerfile_scripts/pgsql/install.sh` to install it on a Debian-family system.
46
46
9. Set the env var `EXTERNAL_DB` or the `connection` key in the `pgvector` config to the postgresql connection string if you're using an external database.
47
47
10. Start the database (see `dockerfile_scripts/pgsql/setup.sh` for an example)
48
-
11.`./main.py`
49
-
12.[Follow the below steps to register the app in the app ecosystem](#register-as-an-ex-app)
48
+
11.`./main_em.py` in one terminal/tmux pane
49
+
12.`./main.py` in another
50
+
13.[Follow the below steps to register the app in the app ecosystem](#register-as-an-ex-app)
50
51
51
-
## Complex Install (with docker)
52
+
## Dev Install (with docker)
52
53
53
-
0. Install the required apps from [Simple Install](#simple-install) other than Context Chat Backend and setup background job workers
54
+
0. Install the required apps from [Install](#install) other than Context Chat Backend and setup background job workers
54
55
1. Build the image
55
56
*(this is a good place to edit the example.env file before building the container)*
`host` will be `localhost` if nextcloud can access localhost or `host.docker.internal` if nextcloud is inside a docker container and the backend app is on localhost.
69
70
70
-
If nextcloud is inside a container, `--add-host` option would be required by your nextcloud container. [See example above, pt. 2](#complex-install-with-docker)
71
+
If nextcloud is inside a container, `--add-host` option would be required by your nextcloud container. [See example above, pt. 2](#dev-install-with-docker)
71
72
72
73
**2. Register the app using the deploy daemon (be mindful of the port number and the app's version):**
73
74
```
@@ -167,7 +168,6 @@ Adjust the example.env to your needs so that it fits your environment
Mounts the context_chat_backend into the docker image
188
188
189
-
`-v /var/run/docker.sock:/var/run/docker.sock`
190
-
191
-
Mounts the Docker socket file from the host into the container. This is done to allow the Docker client running inside the container to communicate with the Docker daemon on the host, essentially controlling Docker and GPU from within the container.
192
-
193
189
`-v persistent_storage:/app/persistent_storage`
194
190
195
191
Mounts the persistent storage into the docker instance to keep downloaded models stored for the future.
0 commit comments