Skip to content

Commit c91934c

Browse files
committed
update readme
1 parent e035f82 commit c91934c

File tree

2 files changed

+33
-4
lines changed

2 files changed

+33
-4
lines changed

Diff for: README.md

+16-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ The project's startup scripts are divided into flask4modelcache.py and flask4mod
4343
pip install -r requirements.txt
4444
```
4545
### Service Startup
46-
#### Demo Service Startup
46+
#### Method 1: Demo Service Startup
4747
1. Download the embedding model bin file from the following address: [https://huggingface.co/shibing624/text2vec-base-chinese/tree/main](https://huggingface.co/shibing624/text2vec-base-chinese/tree/main). Place the downloaded bin file in the model/text2vec-base-chinese folder.
4848
2. Start the backend service using the flask4modelcache_dome.py script.
4949
```shell
@@ -53,7 +53,21 @@ cd CodeFuse-ModelCache
5353
python flask4modelcache_demo.py
5454
```
5555

56-
#### Normal Service Startup
56+
#### Method 2: Service Startup With Docker-compose
57+
1. Download the embedding model bin file from the following address: [https://huggingface.co/shibing624/text2vec-base-chinese/tree/main](https://huggingface.co/shibing624/text2vec-base-chinese/tree/main). Place the downloaded bin file in the model/text2vec-base-chinese folder.
58+
2. Configure docker network, only need to execute once
59+
```shell
60+
docker network create modelcache
61+
```
62+
3. Execute the docker-compose command
63+
```shell
64+
# When the modelcache image does not exist locally for the first time, or when the Dockerfile is changed
65+
docker-compose up --build
66+
67+
# This is not the first run and the Dockerfile has not changed
68+
docker-compose up
69+
```
70+
#### Method 3: Service Startup Without Docker-compose
5771
Before starting the service, the following environment configurations should be performed:
5872
1. Install the relational database MySQL and import the SQL file to create the data tables. The SQL file can be found at: ```reference_doc/create_table.sql```
5973
2. Install the vector database Milvus.

Diff for: README_CN.md

+17-2
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Codefuse-ModelCache 是一个开源的大模型语义缓存系统,通过缓存
4444
pip install -r requirements.txt
4545
```
4646
### 服务启动
47-
#### Demo服务启动
47+
#### 方式一:Demo服务启动
4848
- 离线模型bin文件下载, 参考地址:[https://huggingface.co/shibing624/text2vec-base-chinese/tree/main](https://huggingface.co/shibing624/text2vec-base-chinese/tree/main),并将下载的bin文件,放到 model/text2vec-base-chinese 文件夹中。
4949
- 执行flask4modelcache_demo.py启动服务。
5050
```shell
@@ -54,7 +54,22 @@ cd CodeFuse-ModelCache
5454
python flask4modelcache_demo.py
5555
```
5656

57-
#### 正常服务启动
57+
#### 方式二:通过 docker-compose 启动服务
58+
- 离线模型bin文件下载, 参考地址:[https://huggingface.co/shibing624/text2vec-base-chinese/tree/main](https://huggingface.co/shibing624/text2vec-base-chinese/tree/main),并将下载的bin文件,放到 model/text2vec-base-chinese 文件夹中。
59+
60+
- 配置 docker network,只需执行一次
61+
```shell
62+
docker network create modelcache
63+
```
64+
- 执行 docker-compose 命令
65+
```shell
66+
# 首次运行本地不存在 modelcache 镜像、或 Dockerfile 变更时
67+
docker-compose up --build
68+
69+
# 非首次运行,且 Dockerfile 无变更
70+
docker-compose up
71+
```
72+
#### 方式三:不通过 docker-compose 启动服务
5873
在启动服务前,应该进行如下环境配置:
5974
1. 安装关系数据库 mysql, 导入sql创建数据表,sql文件:```reference_doc/create_table.sql```
6075
2. 安装向量数据库milvus

0 commit comments

Comments
 (0)