Skip to content

Commit 33f8329

Browse files
dbkinderashahba
andauthored
doc: fix CodeGen/README.md markdown (#475)
* fix multiple H1 headings * edit use of please * remove use of unnecessary HTML tags Signed-off-by: David B. Kinder <david.b.kinder@intel.com> Co-authored-by: Abolfazl Shahbazi <abolfazl.shahbazi@intel.com>
1 parent 076bca3 commit 33f8329

File tree

1 file changed

+48
-48
lines changed

1 file changed

+48
-48
lines changed

CodeGen/README.md

Lines changed: 48 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -18,65 +18,65 @@ The workflow falls into the following architecture:
1818

1919
![architecture](./assets/img/codegen_architecture.png)
2020

21-
# Deploy CodeGen Service
21+
## Deploy CodeGen Service
2222

2323
The CodeGen service can be effortlessly deployed on either Intel Gaudi2 or Intel Xeon Scalable Processor.
2424

2525
Currently we support two ways of deploying ChatQnA services with docker compose:
2626

2727
1. Start services using the docker image on `docker hub`:
2828

29-
```bash
30-
docker pull opea/codegen:latest
31-
```
29+
```bash
30+
docker pull opea/codegen:latest
31+
```
3232

3333
2. Start services using the docker images `built from source`: [Guide](./docker)
3434

35-
## Setup Environment Variable
35+
### Setup Environment Variable
3636

3737
To set up environment variables for deploying ChatQnA services, follow these steps:
3838

3939
1. Set the required environment variables:
4040

41-
```bash
42-
# Example: host_ip="192.168.1.1"
43-
export host_ip="External_Public_IP"
44-
# Example: no_proxy="localhost, 127.0.0.1, 192.168.1.1"
45-
export no_proxy="Your_No_Proxy"
46-
export HUGGINGFACEHUB_API_TOKEN="Your_Huggingface_API_Token"
47-
```
41+
```bash
42+
# Example: host_ip="192.168.1.1"
43+
export host_ip="External_Public_IP"
44+
# Example: no_proxy="localhost, 127.0.0.1, 192.168.1.1"
45+
export no_proxy="Your_No_Proxy"
46+
export HUGGINGFACEHUB_API_TOKEN="Your_Huggingface_API_Token"
47+
```
4848

4949
2. If you are in a proxy environment, also set the proxy-related environment variables:
5050

51-
```bash
52-
export http_proxy="Your_HTTP_Proxy"
53-
export https_proxy="Your_HTTPs_Proxy"
54-
```
51+
```bash
52+
export http_proxy="Your_HTTP_Proxy"
53+
export https_proxy="Your_HTTPs_Proxy"
54+
```
5555

5656
3. Set up other environment variables:
5757

58-
```bash
59-
source ./docker/set_env.sh
60-
```
58+
```bash
59+
source ./docker/set_env.sh
60+
```
6161

62-
## Deploy CodeGen using Docker
62+
### Deploy CodeGen using Docker
6363

64-
### Deploy CodeGen on Gaudi
64+
#### Deploy CodeGen on Gaudi
6565

66-
Please find corresponding [compose.yaml](./docker/gaudi/compose.yaml).
66+
Find the corresponding [compose.yaml](./docker/gaudi/compose.yaml).
6767

6868
```bash
6969
cd GenAIExamples/CodeGen/docker/gaudi
7070
docker compose up -d
7171
```
7272

73-
> Notice: Currently only the <b>Habana Driver 1.16.x</b> is supported for Gaudi.
73+
> Notice: Currently only the **Habana Driver 1.16.xi** is supported for Gaudi.
7474
75-
Please refer to the [Gaudi Guide](./docker/gaudi/README.md) to build docker images from source.
75+
Refer to the [Gaudi Guide](./docker/gaudi/README.md) to build docker images from source.
7676

77-
### Deploy CodeGen on Xeon
77+
#### Deploy CodeGen on Xeon
7878

79-
Please find corresponding [compose.yaml](./docker/xeon/compose.yaml).
79+
Find the corresponding [compose.yaml](./docker/xeon/compose.yaml).
8080

8181
```bash
8282
cd GenAIExamples/CodeGen/docker/xeon
@@ -85,46 +85,46 @@ docker compose up -d
8585

8686
Refer to the [Xeon Guide](./docker/xeon/README.md) for more instructions on building docker images from source.
8787

88-
## Deploy CodeGen using Kubernetes
88+
### Deploy CodeGen using Kubernetes
8989

9090
Refer to the [Kubernetes Guide](./kubernetes/manifests/README.md) for instructions on deploying CodeGen into Kubernetes on Xeon & Gaudi.
9191

92-
## Deploy CodeGen into Kubernetes using Helm Chart
92+
### Deploy CodeGen into Kubernetes using Helm Chart
9393

94-
Install Helm (version >= 3.15) first. Please refer to the [Helm Installation Guide](https://helm.sh/docs/intro/install/) for more information.
94+
Install Helm (version >= 3.15) first. Refer to the [Helm Installation Guide](https://helm.sh/docs/intro/install/) for more information.
9595

9696
Refer to the [CodeGen helm chart](https://github.com/opea-project/GenAIInfra/tree/main/helm-charts/codegen) for instructions on deploying CodeGen into Kubernetes on Xeon & Gaudi.
9797

98-
# Consume CodeGen Service
98+
## Consume CodeGen Service
9999

100100
Two ways of consuming CodeGen Service:
101101

102102
1. Use cURL command on terminal
103103

104-
```bash
105-
curl http://${host_ip}:7778/v1/codegen \
106-
-H "Content-Type: application/json" \
107-
-d '{"messages": "Implement a high-level API for a TODO list application. The API takes as input an operation request and updates the TODO list in place. If the request is invalid, raise an exception."}'
108-
```
104+
```bash
105+
curl http://${host_ip}:7778/v1/codegen \
106+
-H "Content-Type: application/json" \
107+
-d '{"messages": "Implement a high-level API for a TODO list application. The API takes as input an operation request and updates the TODO list in place. If the request is invalid, raise an exception."}'
108+
```
109109

110110
2. Access via frontend
111111

112-
To access the frontend, open the following URL in your browser: http://{host_ip}:5173.
112+
To access the frontend, open the following URL in your browser: http://{host_ip}:5173.
113113

114-
By default, the UI runs on port 5173 internally.
114+
By default, the UI runs on port 5173 internally.
115115

116-
# Troubleshooting
116+
## Troubleshooting
117117

118-
1. If you get errors like "Access Denied", please [validate micro service](https://github.com/opea-project/GenAIExamples/tree/main/CodeGen/docker/xeon#validate-microservices) first. A simple example:
118+
1. If you get errors like "Access Denied", [validate micro service](https://github.com/opea-project/GenAIExamples/tree/main/CodeGen/docker/xeon#validate-microservices) first. A simple example:
119119

120-
```bash
121-
http_proxy=""
122-
curl http://${host_ip}:8028/generate \
123-
-X POST \
124-
-d '{"inputs":"Implement a high-level API for a TODO list application. The API takes as input an operation request and updates the TODO list in place. If the request is invalid, raise an exception.","parameters":{"max_new_tokens":256, "do_sample": true}}' \
125-
-H 'Content-Type: application/json'
126-
```
120+
```bash
121+
http_proxy=""
122+
curl http://${host_ip}:8028/generate \
123+
-X POST \
124+
-d '{"inputs":"Implement a high-level API for a TODO list application. The API takes as input an operation request and updates the TODO list in place. If the request is invalid, raise an exception.","parameters":{"max_new_tokens":256, "do_sample": true}}' \
125+
-H 'Content-Type: application/json'
126+
```
127127

128-
2. (Docker only) If all microservices work well, please check the port ${host_ip}:7778, the port may be allocated by other users, you can modify the `compose.yaml`.
128+
2. (Docker only) If all microservices work well, check the port ${host_ip}:7778, the port may be allocated by other users, you can modify the `compose.yaml`.
129129

130-
3. (Docker only) If you get errors like "The container name is in use", please change container name in `compose.yaml`.
130+
3. (Docker only) If you get errors like "The container name is in use", change container name in `compose.yaml`.

0 commit comments

Comments
 (0)