Skip to content

Commit 9a5a4f0

Browse files
szymondudyczberkecanrizai
authored andcommitted
Update instructions for Private RAG (#8177)
Co-authored-by: berkecanrizai <63911408+berkecanrizai@users.noreply.github.com> GitOrigin-RevId: d425d6f6ae394f31053ee08ff259ae17122b18f7
1 parent 6d6155e commit 9a5a4f0

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

examples/pipelines/private-rag/README.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,13 +186,24 @@ First, make sure your local LLM is up and running. By default, the pipeline trie
186186
### With Docker
187187
In order to let the pipeline get updated with each change in local files, you need to mount the folder onto the docker. The following commands show how to do that.
188188

189+
#### Linux
189190
```bash
190191
# Build the image in this folder
191192
docker build -t privaterag .
192193
193194
# Run the image, mount the `data` folder into image
194-
# -e is used to pass value of LLM_API_BASE environmental variable
195-
docker run -v ./data:/app/data -e LLM_API_BASE -p 8000:8000 privaterag
195+
docker run --net host -v ./data:/app/data privaterag
196+
```
197+
198+
#### Mac or Windows
199+
In the `app.yaml` change `api_base` to be `http://host.docker.internal:11434`. Then run:
200+
201+
```bash
202+
# Build the image in this folder
203+
docker build -t privaterag .
204+
205+
# Run the image, mount the `data` folder into image
206+
docker run -v ./data:/app/data -p 8000:8000 privaterag
196207
```
197208

198209
### Locally

examples/pipelines/private-rag/app.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,8 @@ $llm: !pw.xpacks.llm.llms.LiteLLMChat
3232
max_retries: 6
3333
cache_strategy: !pw.udfs.DefaultCache
3434
temperature: 0
35-
top_p: 1
36-
format: "json" # only available in Ollama local deploy, not usable in Mistral API
37-
api_base: "http://localhost:11434"
35+
api_base: "http://localhost:11434"
36+
# api_base: "http://host.docker.internal:11434" # use this when you are running the app in the Docker on Mac or Windows
3837

3938
$embedding_model: "avsolatorio/GIST-small-Embedding-v0"
4039

0 commit comments

Comments
 (0)