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: docs/community/troubleshooting.md
+9Lines changed: 9 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -87,6 +87,15 @@ If you have any trouble, feel free to raise an Issue and we can provide you with
87
87
-- usually the issue will be related to the retrieval step and formation of the Prompt, and as always, good pipelines and a little experimentation usually help !
88
88
89
89
90
+
8.**Newly added examples not working as intended**
91
+
92
+
-- If you run a recently added example and it does not run as intended, it is possible that the feature being used in the example has not yet been added to the latest pip install.
93
+
94
+
-- To fix this, move the example file to the outer-most directory of the repository, so that the example file you are trying to run is in the same directory as the `llmware` source code directory.
95
+
96
+
-- This will let you run the example using the latest source code!
97
+
98
+
90
99
# More information about the project - [see main repository](https://www.github.com/llmware-ai/llmware.git)
Copy file name to clipboardExpand all lines: docs/getting_started/working_with_docker.md
+88-2Lines changed: 88 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -6,9 +6,95 @@ nav_order: 6
6
6
permalink: /getting_started/working_with_docker
7
7
---
8
8
9
-
##Working with Docker Scripts
9
+
# Working with Docker Scripts
10
10
11
-
COMING SOON ...
11
+
This section is a short guide on setting up a Linux environment with Docker and running LLMWare examples with different database systems.
12
+
13
+
## 1. Python and Pip
14
+
Python should come installed with your Linux environment.
15
+
16
+
To install Pip, run the following:
17
+
```
18
+
sudo apt-get update
19
+
sudo apt-get -y install python3-pip
20
+
pip3 install --upgrade pip
21
+
```
22
+
23
+
## 2. Docker and Docker Compose
24
+
The latest versions of Docker and Docker Comopse should be installed to be able to use the Docker Compose files in the LLMWare repository.
25
+
26
+
Instructions to install Docker: https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-20-04 (Steps 1-2)
27
+
Note: Step 1 is necessary, Step 2 is optional but we highly recommend it.
28
+
29
+
Instructions to install Docker Compose: https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-compose-on-ubuntu-20-04 (Step 1)
30
+
Note: replace the URL in the `curl` command with the latest download from https://github.com/docker/compose/releases.
31
+
32
+
Check that Docker is running on your system:
33
+
```
34
+
sudo systemctl status docker
35
+
```
36
+
37
+
## 3. Running Docker Compose files
38
+
`cd` into the repository and ensure that you can see files of the format `docker-compose-database-name.yaml`.
39
+
40
+
To run a Compose file:
41
+
```
42
+
docker-compose -f docker-compose-database-name.yaml up -d
43
+
```
44
+
45
+
Check that the container is running:
46
+
```
47
+
docker ps
48
+
```
49
+
Note: this will list only the the containers that are currently running, add the `-a` flag (`docker ps -a`) to list all containers (even those that are stopped).
50
+
51
+
## 4. Test with Examples
52
+
The Compose files currently support 6 database systems:
53
+
- Mongo
54
+
- Postgres/PG Vector
55
+
- Neo4j
56
+
- Milvus
57
+
- Qdrant
58
+
- Redis
59
+
60
+
Note: PG Vector is an alias for Postgres and is used for vector embeddings.
61
+
62
+
1. Mongo and Postgres are used as the active database to store library text collections.
63
+
2. PG Vector, Neo4j, Milvus, Qdrant and Redis are used as the vector database to store vector embeddings.
64
+
65
+
To test that the containers are working as intended, you can modify an example provided in the LLMWare repository. The simplest example to do this is `fast_start/example-2-build_embeddings.py`.
66
+
67
+
Open the file in an editor.
68
+
1. Change the argument passed in as the active database on line 128 to an appropriate active database (Mongo or Postgres).
69
+
2. Change the argument passed in as the vector database on line 138 to an appropriate vector database (PG Vector, Neo4j, Milvus, Qdrant or Redis).
70
+
71
+
Run the example with these changes, and you should see updates in the terminal indicating that the embeddings are being generated correctly.
72
+
73
+
Note: It is possible that you will see an error:
74
+
```
75
+
llmware.exceptions.EmbeddingModelNotFoundException: Embedding model for 'example2_library' could not be located
76
+
```
77
+
In this case, use a unique name for the library name passed in on line 147.
78
+
79
+
## 5. Stopping/Deleting Containers
80
+
To stop a container, run:
81
+
```
82
+
docker stop container_ID_OR_container_name
83
+
```
84
+
85
+
To delete a container, run:
86
+
```
87
+
docker rm container_ID_OR_container_name
88
+
```
89
+
90
+
Note: passing in either the ID or the name will work.
91
+
92
+
To find the ID or name of a container, run:
93
+
```
94
+
docker ps -a
95
+
```
96
+
97
+
---
12
98
13
99
# More information about the project - [see main repository](https://www.github.com/llmware-ai/llmware.git)
0 commit comments