Skip to content

Commit bceacdc

Browse files
Fix README issues (#817)
Signed-off-by: lvliang-intel <liang1.lv@intel.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 375ea7a commit bceacdc

File tree

24 files changed

+106
-243
lines changed

24 files changed

+106
-243
lines changed

ChatQnA/docker_compose/intel/cpu/xeon/README.md

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,11 @@ Port 5173 - Open to 0.0.0.0/0
6161

6262
First of all, you need to build Docker Images locally and install the python package of it.
6363

64-
```bash
65-
git clone https://github.com/opea-project/GenAIComps.git
66-
cd GenAIComps
67-
```
68-
6964
### 1. Build Embedding Image
7065

7166
```bash
67+
git clone https://github.com/opea-project/GenAIComps.git
68+
cd GenAIComps
7269
docker build --no-cache -t opea/embedding-tei:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/embeddings/tei/langchain/Dockerfile .
7370
```
7471

@@ -128,7 +125,6 @@ cd ..
128125
git clone https://github.com/opea-project/GenAIExamples.git
129126
cd GenAIExamples/ChatQnA
130127
docker build --no-cache -t opea/chatqna:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f Dockerfile .
131-
cd ../../..
132128
```
133129

134130
2. MegaService without Rerank
@@ -139,7 +135,6 @@ cd ..
139135
git clone https://github.com/opea-project/GenAIExamples.git
140136
cd GenAIExamples/ChatQnA
141137
docker build --no-cache -t opea/chatqna-without-rerank:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f Dockerfile.without_rerank .
142-
cd ../../..
143138
```
144139

145140
### 7. Build UI Docker Image
@@ -149,7 +144,6 @@ Build frontend Docker image via below command:
149144
```bash
150145
cd GenAIExamples/ChatQnA/ui
151146
docker build --no-cache -t opea/chatqna-ui:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f ./docker/Dockerfile .
152-
cd ../../../..
153147
```
154148

155149
### 8. Build Conversational React UI Docker Image (Optional)
@@ -161,7 +155,6 @@ Build frontend Docker image that enables Conversational experience with ChatQnA
161155
```bash
162156
cd GenAIExamples/ChatQnA/ui
163157
docker build --no-cache -t opea/chatqna-conversation-ui:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f ./docker/Dockerfile.react .
164-
cd ../../../..
165158
```
166159

167160
Then run the command `docker images`, you will have the following 7 Docker Images:
@@ -188,15 +181,15 @@ By default, the embedding, reranking and LLM models are set to a default value a
188181

189182
Change the `xxx_MODEL_ID` below for your needs.
190183

191-
For customers with proxy issues, the models from [ModelScope](https://www.modelscope.cn/models) are also supported in ChatQnA with TGI serving. ModelScope models are supported in two ways for TGI:
184+
For users in China who are unable to download models directly from Huggingface, you can use [ModelScope](https://www.modelscope.cn/models) or a Huggingface mirror to download models. TGI can load the models either online or offline as described below:
192185

193186
1. Online
194187

195188
```bash
196189
export HF_TOKEN=${your_hf_token}
197190
export HF_ENDPOINT="https://hf-mirror.com"
198191
model_name="Intel/neural-chat-7b-v3-3"
199-
docker run -p 8008:80 -v ./data:/data --name tgi-service -e HF_ENDPOINT=$HF_ENDPOINT -e http_proxy=$http_proxy -e https_proxy=$https_proxy --shm-size 1g ghcr.io/huggingface/text-generation-inference:2.1.0 --model-id $model_name
192+
docker run -p 8008:80 -v ./data:/data --name tgi-service -e HF_ENDPOINT=$HF_ENDPOINT -e http_proxy=$http_proxy -e https_proxy=$https_proxy --shm-size 1g ghcr.io/huggingface/text-generation-inference:2.2.0 --model-id $model_name
200193
```
201194

202195
2. Offline
@@ -210,7 +203,7 @@ For customers with proxy issues, the models from [ModelScope](https://www.models
210203
```bash
211204
export HF_TOKEN=${your_hf_token}
212205
export model_path="/path/to/model"
213-
docker run -p 8008:80 -v $model_path:/data --name tgi_service --shm-size 1g ghcr.io/huggingface/text-generation-inference:2.1.0 --model-id /data
206+
docker run -p 8008:80 -v $model_path:/data --name tgi_service --shm-size 1g ghcr.io/huggingface/text-generation-inference:2.2.0 --model-id /data
214207
```
215208

216209
### Setup Environment Variables

ChatQnA/docker_compose/intel/hpu/gaudi/README.md

Lines changed: 18 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -6,44 +6,39 @@ This document outlines the deployment process for a ChatQnA application utilizin
66

77
First of all, you need to build Docker Images locally. This step can be ignored after the Docker images published to Docker hub.
88

9-
### 1. Source Code install GenAIComps
9+
### 1. Build Embedding Image
1010

1111
```bash
1212
git clone https://github.com/opea-project/GenAIComps.git
1313
cd GenAIComps
14-
```
15-
16-
### 2. Build Embedding Image
17-
18-
```bash
1914
docker build --no-cache -t opea/embedding-tei:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/embeddings/tei/langchain/Dockerfile .
2015
```
2116

22-
### 3. Build Retriever Image
17+
### 2. Build Retriever Image
2318

2419
```bash
2520
docker build --no-cache -t opea/retriever-redis:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/retrievers/redis/langchain/Dockerfile .
2621
```
2722

28-
### 4. Build Rerank Image
23+
### 3. Build Rerank Image
2924

3025
> Skip for ChatQnA without Rerank pipeline
3126
3227
```bash
3328
docker build --no-cache -t opea/reranking-tei:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/reranks/tei/Dockerfile .
3429
```
3530

36-
### 5. Build LLM Image
31+
### 4. Build LLM Image
3732

3833
You can use different LLM serving solutions, choose one of following four options.
3934

40-
#### 5.1 Use TGI
35+
#### 4.1 Use TGI
4136

4237
```bash
4338
docker build --no-cache -t opea/llm-tgi:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/llms/text-generation/tgi/Dockerfile .
4439
```
4540

46-
#### 5.2 Use VLLM
41+
#### 4.2 Use VLLM
4742

4843
Build vllm docker.
4944

@@ -57,7 +52,7 @@ Build microservice docker.
5752
docker build --no-cache -t opea/llm-vllm:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/llms/text-generation/vllm/langchain/Dockerfile .
5853
```
5954

60-
#### 5.3 Use VLLM-on-Ray
55+
#### 4.3 Use VLLM-on-Ray
6156

6257
Build vllm-on-ray docker.
6358

@@ -71,24 +66,21 @@ Build microservice docker.
7166
docker build --no-cache -t opea/llm-vllm-ray:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/llms/text-generation/vllm/ray/Dockerfile .
7267
```
7368

74-
### 6. Build Dataprep Image
69+
### 5. Build Dataprep Image
7570

7671
```bash
7772
docker build --no-cache -t opea/dataprep-redis:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/dataprep/redis/langchain/Dockerfile .
7873
```
7974

80-
### 7. Build TEI Gaudi Image
75+
### 6. Build Guardrails Docker Image (Optional)
8176

82-
Since a TEI Gaudi Docker image hasn't been published, we'll need to build it from the [tei-gaudi](https://github.com/huggingface/tei-gaudi) repository.
77+
To fortify AI initiatives in production, Guardrails microservice can secure model inputs and outputs, building Trustworthy, Safe, and Secure LLM-based Applications.
8378

8479
```bash
85-
git clone https://github.com/huggingface/tei-gaudi
86-
cd tei-gaudi/
87-
docker build --no-cache -f Dockerfile-hpu -t opea/tei-gaudi:latest .
88-
cd ../..
80+
docker build -t opea/guardrails-tgi:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/guardrails/llama_guard/langchain/Dockerfile .
8981
```
9082

91-
### 8. Build MegaService Docker Image
83+
### 7. Build MegaService Docker Image
9284

9385
1. MegaService with Rerank
9486

@@ -98,7 +90,6 @@ cd ../..
9890
git clone https://github.com/opea-project/GenAIExamples.git
9991
cd GenAIExamples/ChatQnA/docker
10092
docker build --no-cache -t opea/chatqna:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f Dockerfile .
101-
cd ../../..
10293
```
10394

10495
2. MegaService with Guardrails
@@ -109,7 +100,6 @@ cd ../..
109100
git clone https://github.com/opea-project/GenAIExamples.git
110101
cd GenAIExamples/ChatQnA/
111102
docker build --no-cache -t opea/chatqna-guardrails:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f Dockerfile.guardrails .
112-
cd ../../..
113103
```
114104

115105
3. MegaService without Rerank
@@ -120,20 +110,18 @@ cd ../..
120110
git clone https://github.com/opea-project/GenAIExamples.git
121111
cd GenAIExamples/ChatQnA/docker
122112
docker build --no-cache -t opea/chatqna-without-rerank:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f Dockerfile.without_rerank .
123-
cd ../../..
124113
```
125114

126-
### 9. Build UI Docker Image
115+
### 8. Build UI Docker Image
127116

128117
Construct the frontend Docker image using the command below:
129118

130119
```bash
131120
cd GenAIExamples/ChatQnA/ui
132121
docker build --no-cache -t opea/chatqna-ui:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f ./docker/Dockerfile .
133-
cd ../../../..
134122
```
135123

136-
### 10. Build Conversational React UI Docker Image (Optional)
124+
### 9. Build Conversational React UI Docker Image (Optional)
137125

138126
Build frontend Docker image that enables Conversational experience with ChatQnA megaservice via below command:
139127

@@ -142,26 +130,14 @@ Build frontend Docker image that enables Conversational experience with ChatQnA
142130
```bash
143131
cd GenAIExamples/ChatQnA/ui
144132
docker build --no-cache -t opea/chatqna-conversation-ui:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f ./docker/Dockerfile.react .
145-
cd ../../../..
146-
```
147-
148-
### 11. Build Guardrails Docker Image (Optional)
149-
150-
To fortify AI initiatives in production, Guardrails microservice can secure model inputs and outputs, building Trustworthy, Safe, and Secure LLM-based Applications.
151-
152-
```bash
153-
cd GenAIComps
154-
docker build -t opea/guardrails-tgi:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/guardrails/llama_guard/langchain/Dockerfile .
155-
cd ../../..
156133
```
157134

158-
Then run the command `docker images`, you will have the following 8 Docker Images:
135+
Then run the command `docker images`, you will have the following 7 Docker Images:
159136

160137
- `opea/embedding-tei:latest`
161138
- `opea/retriever-redis:latest`
162139
- `opea/reranking-tei:latest`
163140
- `opea/llm-tgi:latest` or `opea/llm-vllm:latest` or `opea/llm-vllm-ray:latest`
164-
- `opea/tei-gaudi:latest`
165141
- `opea/dataprep-redis:latest`
166142
- `opea/chatqna:latest` or `opea/chatqna-guardrails:latest` or `opea/chatqna-without-rerank:latest`
167143
- `opea/chatqna-ui:latest`
@@ -188,15 +164,15 @@ By default, the embedding, reranking and LLM models are set to a default value a
188164

189165
Change the `xxx_MODEL_ID` below for your needs.
190166

191-
For customers with proxy issues, the models from [ModelScope](https://www.modelscope.cn/models) are also supported in ChatQnA with TGI serving. ModelScope models are supported in two ways for TGI:
167+
For users in China who are unable to download models directly from Huggingface, you can use [ModelScope](https://www.modelscope.cn/models) or a Huggingface mirror to download models. TGI can load the models either online or offline as described below:
192168

193169
1. Online
194170

195171
```bash
196172
export HF_TOKEN=${your_hf_token}
197173
export HF_ENDPOINT="https://hf-mirror.com"
198174
model_name="Intel/neural-chat-7b-v3-3"
199-
docker run -p 8008:80 -v ./data:/data --name tgi-service -e HF_ENDPOINT=$HF_ENDPOINT -e http_proxy=$http_proxy -e https_proxy=$https_proxy --shm-size 1g ghcr.io/huggingface/text-generation-inference:2.1.0 --model-id $model_name
175+
docker run -p 8008:80 -v ./data:/data --name tgi-service -e HF_ENDPOINT=$HF_ENDPOINT -e http_proxy=$http_proxy -e https_proxy=$https_proxy --runtime=habana -e HABANA_VISIBLE_DEVICES=all -e OMPI_MCA_btl_vader_single_copy_mechanism=none -e HUGGING_FACE_HUB_TOKEN=$HF_TOKEN -e ENABLE_HPU_GRAPH=true -e LIMIT_HPU_GRAPH=true -e USE_FLASH_ATTENTION=true -e FLASH_ATTENTION_RECOMPUTE=true --cap-add=sys_nice --ipc=host ghcr.io/huggingface/tgi-gaudi:2.0.5 --model-id $model_name --max-input-tokens 1024 --max-total-tokens 2048
200176
```
201177

202178
2. Offline
@@ -210,7 +186,7 @@ For customers with proxy issues, the models from [ModelScope](https://www.models
210186
```bash
211187
export HF_TOKEN=${your_hf_token}
212188
export model_path="/path/to/model"
213-
docker run -p 8008:80 -v $model_path:/data --name tgi_service --shm-size 1g ghcr.io/huggingface/text-generation-inference:2.1.0 --model-id /data
189+
docker run -p 8008:80 -v $model_path:/data --name tgi_service --runtime=habana -e HABANA_VISIBLE_DEVICES=all -e OMPI_MCA_btl_vader_single_copy_mechanism=none -e HUGGING_FACE_HUB_TOKEN=$HF_TOKEN -e ENABLE_HPU_GRAPH=true -e LIMIT_HPU_GRAPH=true -e USE_FLASH_ATTENTION=true -e FLASH_ATTENTION_RECOMPUTE=true --cap-add=sys_nice --ipc=host ghcr.io/huggingface/tgi-gaudi:2.0.5 --model-id /data --max-input-tokens 1024 --max-total-tokens 2048
214190
```
215191

216192
### Setup Environment Variables

CodeGen/docker_compose/intel/cpu/xeon/README.md

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,15 @@ After launching your instance, you can connect to it using SSH (for Linux instan
1414

1515
Should the Docker image you seek not yet be available on Docker Hub, you can build the Docker image locally.
1616

17-
### 1. Git Clone GenAIComps
17+
### 1. Build the LLM Docker Image
1818

1919
```bash
2020
git clone https://github.com/opea-project/GenAIComps.git
2121
cd GenAIComps
22-
```
23-
24-
### 2. Build the LLM Docker Image
25-
26-
```bash
2722
docker build -t opea/llm-tgi:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/llms/text-generation/tgi/Dockerfile .
2823
```
2924

30-
### 3. Build the MegaService Docker Image
25+
### 2. Build the MegaService Docker Image
3126

3227
To construct the Mega Service, we utilize the [GenAIComps](https://github.com/opea-project/GenAIComps.git) microservice pipeline within the `codegen.py` Python script. Build MegaService Docker image via the command below:
3328

@@ -37,7 +32,7 @@ cd GenAIExamples/CodeGen
3732
docker build -t opea/codegen:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f Dockerfile .
3833
```
3934

40-
### 4. Build the UI Docker Image
35+
### 3. Build the UI Docker Image
4136

4237
Build the frontend Docker image via the command below:
4338

@@ -52,7 +47,7 @@ Then run the command `docker images`, you will have the following 3 Docker Image
5247
- `opea/codegen:latest`
5348
- `opea/codegen-ui:latest`
5449

55-
### 8. Build CodeGen React UI Docker Image (Optional)
50+
### 4. Build CodeGen React UI Docker Image (Optional)
5651

5752
Build react frontend Docker image via below command:
5853

CodeGen/docker_compose/intel/hpu/gaudi/README.md

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,15 @@ This document outlines the deployment process for a CodeGen application utilizin
66

77
First of all, you need to build the Docker images locally. This step can be ignored after the Docker images published to the Docker Hub.
88

9-
### 1. Git Clone GenAIComps
9+
### 1. Build the LLM Docker Image
1010

1111
```bash
1212
git clone https://github.com/opea-project/GenAIComps.git
1313
cd GenAIComps
14-
```
15-
16-
### 2. Build the LLM Docker Image
17-
18-
```bash
1914
docker build -t opea/llm-tgi:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/llms/text-generation/tgi/Dockerfile .
2015
```
2116

22-
### 3. Build the MegaService Docker Image
17+
### 2. Build the MegaService Docker Image
2318

2419
To construct the Mega Service, we utilize the [GenAIComps](https://github.com/opea-project/GenAIComps.git) microservice pipeline within the `codegen.py` Python script. Build the MegaService Docker image via the command below:
2520

@@ -29,7 +24,7 @@ cd GenAIExamples/CodeGen
2924
docker build -t opea/codegen:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f Dockerfile .
3025
```
3126

32-
### 4. Build the UI Docker Image
27+
### 3. Build the UI Docker Image
3328

3429
Construct the frontend Docker image via the command below:
3530

@@ -38,7 +33,7 @@ cd GenAIExamples/CodeGen/ui
3833
docker build -t opea/codegen-ui:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f ./docker/Dockerfile .
3934
```
4035

41-
### 8. Build CodeGen React UI Docker Image (Optional)
36+
### 4. Build CodeGen React UI Docker Image (Optional)
4237

4338
Build react frontend Docker image via below command:
4439

CodeTrans/docker_compose/intel/cpu/xeon/README.md

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,35 +14,30 @@ After launching your instance, you can connect to it using SSH (for Linux instan
1414

1515
First of all, you need to build Docker Images locally and install the python package of it. This step can be ignored after the Docker images published to Docker hub.
1616

17-
### 1. Install GenAIComps from Source Code
17+
### 1. Build the LLM Docker Image
1818

1919
```bash
2020
git clone https://github.com/opea-project/GenAIComps.git
2121
cd GenAIComps
22-
```
23-
24-
### 2. Build the LLM Docker Image
25-
26-
```bash
2722
docker build -t opea/llm-tgi:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/llms/text-generation/tgi/Dockerfile .
2823
```
2924

30-
### 3. Build MegaService Docker Image
25+
### 2. Build MegaService Docker Image
3126

3227
```bash
3328
git clone https://github.com/opea-project/GenAIExamples.git
3429
cd GenAIExamples/CodeTrans
3530
docker build -t opea/codetrans:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f Dockerfile .
3631
```
3732

38-
### 4. Build UI Docker Image
33+
### 3. Build UI Docker Image
3934

4035
```bash
4136
cd GenAIExamples/CodeTrans/ui
4237
docker build -t opea/codetrans-ui:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f ./docker/Dockerfile .
4338
```
4439

45-
### 5. Build Nginx Docker Image
40+
### 4. Build Nginx Docker Image
4641

4742
```bash
4843
cd GenAIComps

0 commit comments

Comments
 (0)