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: usecases/ai/rag-toolkit/README.md
+32-40Lines changed: 32 additions & 40 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,59 +19,59 @@ Please ensure that you have these ports available before running the application
19
19
| Serving | 8012 |
20
20
21
21
## Quick Start
22
-
### Prerequisite
23
-
If you are using this bundle without any finetuned model, you **must** follow the steps below before running the setup.
24
-
25
22
### 1. Install operating system
26
23
Install the latest [Ubuntu* 22.04 LTS Desktop](https://releases.ubuntu.com/jammy/). Refer to [Ubuntu Desktop installation tutorial](https://ubuntu.com/tutorials/install-ubuntu-desktop#1-overview) if needed.
27
24
25
+
### 2. Install GPU driver (Optional)
26
+
If you plan to use GPU to perform inference, please install the GPU driver according to your GPU version.
* Intel® Data Center GPU Flex Series: [link](https://github.com/intel/edge-developer-kit-reference-scripts/tree/main/gpu/flex/ats)
29
+
30
+
### 3. Setup docker
31
+
Refer to [here](https://docs.docker.com/engine/install/) to setup docker and docker compose.
32
+
28
33
<aname="hf-token-anchor"></a>
29
-
### 2. Create a Hugging Face account and generate an access token. For more information, please refer to [link](https://huggingface.co/docs/hub/en/security-tokens).
34
+
### 4. Create a Hugging Face account and generate an access token. For more information, please refer to [link](https://huggingface.co/docs/hub/en/security-tokens).
30
35
31
36
<aname="hf-access-anchor"></a>
32
-
### 3. Login to your Hugging Face account and browse to [mistralai/Mistral-7B-Instruct-v0.3](https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.3) and click on the `Agree and access repository` button.
37
+
### 5. Login to your Hugging Face account and browse to [mistralai/Mistral-7B-Instruct-v0.3](https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.3) and click on the `Agree and access repository` button.
33
38
34
-
### 4. Run the setup script
35
-
This step will download all the dependencies needed to run the application.
39
+
### 6. Build docker images with with your preference inference backend
40
+
This step will download all the necessary files online, please ensure you have a valid network connection.
36
41
```bash
37
-
./install.sh
42
+
# OLLAMA GPU backend
43
+
docker compose build --build-arg INSTALL_OPTION=2
44
+
45
+
# OpenVINO CPU backend (OpenVINO backend required Hugging Face token to be provided to download the model)
Run the script to start all the services. During the first time running, the script will download some assets required to run the services, please ensure you have internet connection.
50
+
### 7. Start docker container
42
51
```bash
43
-
./run.sh
52
+
docker compose up -d
44
53
```
45
-
## Docker Setup
46
-
### Prerequisite
47
-
1. Docker and docker compose should be setup before running the commands below. Refer to [here](https://docs.docker.com/engine/install/) to setup docker.
48
-
1. Install necessary GPU drivers.
49
-
- Refer to [here](../../../gpu/arc/dg2/README.md) to setup GPU drivers
50
-
51
-
52
-
### 1. Setup env
53
-
Set the INSTALL_OPTION in env file.
54
54
55
-
1 = VLLM (OpenVINO - CPU)
56
-
- Please also provide HF_TOKEN if using this option. Refer [here](#hf-token-anchor) to create a token.
57
-
- Ensure the hugging face token has access to Mistral 7b instruct v0.3 model. Refer [here](#hf-access-anchor) to get access to model.
58
-
59
-
2 [default] = OLLAMA (SYCL LLAMA.CPP - CPU/GPU)
55
+
## Development
56
+
On host installation can be done by following the steps below:
57
+
### 1. Run the setup script
58
+
This step will download all the dependencies needed to run the application.
60
59
```bash
61
-
cp .env.template .env
60
+
./install.sh
62
61
```
63
62
64
-
### 2. Build docker container
63
+
### 2. Start all the services
64
+
Run the script to start all the services. During the first time running, the script will download some assets required to run the services, please ensure you have internet connection.
65
65
```bash
66
-
docker compose build
66
+
./run.sh
67
67
```
68
-
69
-
### 3. Start docker container
68
+
69
+
## FAQ
70
+
### Uninstall the app
70
71
```bash
71
-
docker compose up -d
72
+
./uninstall.sh
72
73
```
73
74
74
-
## FAQ
75
75
### Utilize NPU in AI PC
76
76
The Speech to Text model inference can be offloaded on the NPU device on an AI PC. Edit the `ENCODER_DEVICE` to *NPU* in `backend/config.yaml` to run the encoder model on NPU. *Currently only encoder model is supported to run on NPU device*
77
77
```
@@ -82,11 +82,6 @@ STT:
82
82
DECODER_DEVICE: CPU
83
83
```
84
84
85
-
### Uninstall the app
86
-
```bash
87
-
./uninstall.sh
88
-
```
89
-
90
85
### Environmental variables
91
86
You can change the port of the backend server api to route to specific OpenAI compatible server running as well as the serving port.
92
87
| Environmental variable | Default Value |
@@ -98,6 +93,3 @@ You can change the port of the backend server api to route to specific OpenAI co
98
93
## Limitations
99
94
1. Current speech-to-text feature only work with localhost.
100
95
2. RAG documents will use all the documents that are uploaded.
101
-
102
-
## Troubleshooting
103
-
1. If you have error to run the applications, you can refer to the log files in the logs folder.
FROM intel/oneapi-basekit:2024.0.1-devel-ubuntu22.04
2
+
3
+
USER root
4
+
5
+
RUN rm /etc/apt/sources.list.d/intel-graphics.list
6
+
RUN wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor | tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null
7
+
RUN echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | tee /etc/apt/sources.list.d/oneAPI.list
0 commit comments