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
2.`docker run --add-host=host.docker.internal:host-gateway -p 10034:10034 context_chat_backend_dev`
47
55
3. Volumes can be mounted for `model_files` and `vector_db_files` if you wish with `-v $(pwd)/model_files:/app/model_files` and similar for vector_db_files
48
56
4. If your Nextcloud is running inside a docker container, ensure you have mounted the docker socket inside your container and has the correct permissions for the web server user to have access to it or add the web server to the docker group:
49
57
- for docker compose
50
-
```yaml
58
+
```
51
59
volumes:
52
60
- /var/run/docker.sock:/tmp/docker.sock:ro
53
61
```
@@ -61,9 +69,13 @@ volumes:
61
69
1.`python -m venv .venv`
62
70
2.`. .venv/bin/activate`
63
71
3. Install requirements
72
+
4.
64
73
3.1 **CPU:**
74
+
65
75
`pip install --no-deps -r requirements.cpu.txt`
76
+
66
77
3.2 **GPU:**
78
+
67
79
`pip install --no-deps -r requirements.cuda.txt`
68
80
69
81
5. Install pandoc from your desired package manager (`# apt install pandoc` for Debian-based systems)
@@ -75,10 +87,15 @@ volumes:
75
87
## Manual Install (with docker)
76
88
1. Build the image
77
89
*(this is a good place to edit the example.env file before building the container)*
2.`docker run --add-host=host.docker.internal:host-gateway -p10034:10034 context_chat_backend_dev`
83
100
3. Volumes can be mounted for `model_files` and `vector_db_files` if you wish with `-v $(pwd)/model_files:/app/model_files` and similar for vector_db_files
84
101
4. If your Nextcloud is running inside a docker container, there are two ways to configure the deploy daemon
@@ -114,7 +131,7 @@ An alternative method would be to provide the Nextcloud's web server user access
114
131
Mount the docker.sock in the Nextcloud container if you happen to use a containerized install of Nextcloud and ensure correct permissions for the web server user to access it.
Tells Docker to build the image without using any cache from previous builds.
138
156
157
+
139
158
`-f Dockerfile.cuda11.8`
140
-
The `-f` or `--file` option specifies the name of the Dockerfile to use for the build. In this case, `Dockerfile.cuda11.8`
159
+
160
+
The *-f* or *--file* option specifies the name of the Dockerfile to use for the build. In this case *Dockerfile.cuda11.8*
161
+
141
162
142
163
`-t context_chat_backend_dev:11.8`
164
+
143
165
The *-t* or *--tag* option allows you to name and optionally tag your image, so you can refer to it later.
144
166
In this case we name it *context_chat_backend_dev*with the specified version *11.8*
145
167
168
+
146
169
`.`
170
+
147
171
This final argument specifies the build context to the Docker daemon. In most cases, it's the path to a directory containing the Dockerfile and any other files needed for the build. Using `.` means "use the current directory as the build context."
148
172
149
173
**2. Run the image**
@@ -168,30 +192,39 @@ docker run \
168
192
-***Parameter explanation:***
169
193
170
194
`-v ./config.cuda.yaml:/app/config.yaml`
195
+
171
196
Mounts the config_cuda.yaml which will be used inside the running image
Mounts the context_chat_backend into the docker image
175
201
176
202
`-v /var/run/docker.sock:/var/run/docker.sock`
203
+
177
204
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.
178
205
179
206
`-v ./persistent_storage:/app/persistent_storage`
207
+
180
208
Mounts the persistent storage into the docker instance to keep downloaded models stored for the future.
181
209
182
210
`--env-file example.env`
211
+
183
212
Specifies an environment file named example.env to load environment variables from. Please adjust it for your needs.
184
213
185
214
`-p 10034:10034`
215
+
186
216
This publishes a container's port (10034) to the host (10034). Please align it with your environment file
187
217
188
218
`-e CUDA_VISIBLE_DEVICES=0`
219
+
189
220
Used to limit which GPUs are visible to CUDA applications running in the container. In this case, it restricts visibility to only the first GPU.
190
221
191
222
`--gpus all`
223
+
192
224
Grants the container access to all GPUs available on the host. This is crucial for running GPU-accelerated applications inside the container.
193
225
194
226
`context_chat_backend_dev:11.8`
227
+
195
228
Specifies the image to use for creating the container. In this case we have build the image in 1.) with the specified tag
0 commit comments