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: README.md
+17
Original file line number
Diff line number
Diff line change
@@ -24,6 +24,7 @@ ModelCache
24
24
-[Dependencies](#dependencies)
25
25
-[Start service](#start-service)
26
26
-[Start demo](#start-demo)
27
+
-[Service Startup With Docker-compose](#service-startup-with-docker-compose)
27
28
-[Start normal service](#start-normal-service)
28
29
-[Visit the service](#visit-the-service)
29
30
-[Write cache](#write-cache)
@@ -87,7 +88,23 @@ You can find the start script in `flask4modelcache.py` and `flask4modelcache_dem
87
88
```shell
88
89
python flask4modelcache_demo.py
89
90
```
91
+
#### Service Startup With Docker-compose
92
+
1. Download the embedding model bin file from [Hugging Face](https://huggingface.co/shibing624/text2vec-base-chinese/tree/main). Place it in the `model/text2vec-base-chinese` folder.
93
+
2. Configure docker network, only need to execute once
94
+
```shell
95
+
cd CodeFuse-ModelCache
96
+
```
97
+
```shell
98
+
docker network create modelcache
99
+
```
100
+
3. Execute the docker-compose command
101
+
```shell
102
+
# When the modelcache image does not exist locally for the first time, or when the Dockerfile is changed
103
+
docker-compose up --build
90
104
105
+
# This is not the first run and the Dockerfile has not changed
106
+
docker-compose up
107
+
```
91
108
#### Start normal service
92
109
93
110
Before you start standard service, do these steps:
- 离线模型 bin 文件下载, 参考地址:[Hugging Face](https://huggingface.co/shibing624/text2vec-base-chinese/tree/main),并将下载的 bin 文件,放到 `model/text2vec-base-chinese` 文件夹中。
0 commit comments