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
+16-2
Original file line number
Diff line number
Diff line change
@@ -43,7 +43,7 @@ The project's startup scripts are divided into flask4modelcache.py and flask4mod
43
43
pip install -r requirements.txt
44
44
```
45
45
### Service Startup
46
-
#### Demo Service Startup
46
+
#### Method 1: Demo Service Startup
47
47
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.
48
48
2. Start the backend service using the flask4modelcache_dome.py script.
49
49
```shell
@@ -53,7 +53,21 @@ cd CodeFuse-ModelCache
53
53
python flask4modelcache_demo.py
54
54
```
55
55
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
57
71
Before starting the service, the following environment configurations should be performed:
58
72
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```
0 commit comments