Commit
·
434b253
1
Parent(s):
e26292c
Add build image and launch from source in README (#2658)
Browse files### What problem does this PR solve?
Move the build image and launch from source back to README.
### Type of change
- [x] Documentation Update
---------
Signed-off-by: Jin Hai <[email protected]>
- README.md +87 -6
- README_ja.md +5 -6
- README_ko.md +5 -6
- README_zh.md +5 -6
- api/ragflow_server.py +5 -6
- docker/launch_backend_service.sh +28 -0
- docs/quickstart.mdx +5 -6
- docs/references/faq.md +5 -6
README.md
CHANGED
@@ -42,6 +42,9 @@
|
|
42 |
- 🔎 [System Architecture](#-system-architecture)
|
43 |
- 🎬 [Get Started](#-get-started)
|
44 |
- 🔧 [Configurations](#-configurations)
|
|
|
|
|
|
|
45 |
- 📚 [Documentation](#-documentation)
|
46 |
- 📜 [Roadmap](#-roadmap)
|
47 |
- 🏄 [Community](#-community)
|
@@ -166,12 +169,12 @@ Try our demo at [https://demo.ragflow.io](https://demo.ragflow.io).
|
|
166 |
_The following output confirms a successful launch of the system:_
|
167 |
|
168 |
```bash
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
|
176 |
* Running on all addresses (0.0.0.0)
|
177 |
* Running on http://127.0.0.1:9380
|
@@ -208,6 +211,84 @@ Updates to the above configurations require a reboot of all containers to take e
|
|
208 |
> $ docker-compose -f docker/docker-compose.yml up -d
|
209 |
> ```
|
210 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
211 |
## 📚 Documentation
|
212 |
|
213 |
- [Quickstart](https://ragflow.io/docs/dev/)
|
|
|
42 |
- 🔎 [System Architecture](#-system-architecture)
|
43 |
- 🎬 [Get Started](#-get-started)
|
44 |
- 🔧 [Configurations](#-configurations)
|
45 |
+
- 🪛 [Build the docker image without embedding models](#-build-the-docker-image-without-embedding-models)
|
46 |
+
- 🪚 [Build the docker image including embedding models](#-build-the-docker-image-including-embedding-models)
|
47 |
+
- 🔨 [Launch service from source for development](#-launch-service-from-source-for-development)
|
48 |
- 📚 [Documentation](#-documentation)
|
49 |
- 📜 [Roadmap](#-roadmap)
|
50 |
- 🏄 [Community](#-community)
|
|
|
169 |
_The following output confirms a successful launch of the system:_
|
170 |
|
171 |
```bash
|
172 |
+
____ ___ ______ ______ __
|
173 |
+
/ __ \ / | / ____// ____// /____ _ __
|
174 |
+
/ /_/ // /| | / / __ / /_ / // __ \| | /| / /
|
175 |
+
/ _, _// ___ |/ /_/ // __/ / // /_/ /| |/ |/ /
|
176 |
+
/_/ |_|/_/ |_|\____//_/ /_/ \____/ |__/|__/
|
177 |
+
|
178 |
|
179 |
* Running on all addresses (0.0.0.0)
|
180 |
* Running on http://127.0.0.1:9380
|
|
|
211 |
> $ docker-compose -f docker/docker-compose.yml up -d
|
212 |
> ```
|
213 |
|
214 |
+
## 🪛 Build the Docker image without embedding models
|
215 |
+
|
216 |
+
This image is approximately 1 GB in size and relies on external LLM and embedding services.
|
217 |
+
|
218 |
+
```bash
|
219 |
+
git clone https://github.com/infiniflow/ragflow.git
|
220 |
+
cd ragflow/
|
221 |
+
pip3 install huggingface-hub
|
222 |
+
python3 download_deps.py # embedding models
|
223 |
+
docker build -f Dockerfile.slim -t infiniflow/ragflow:dev-slim .
|
224 |
+
```
|
225 |
+
|
226 |
+
## 🪚 Build the Docker image including embedding models
|
227 |
+
|
228 |
+
This image includes embedding models and is approximately 9 GB in size, and so relies on external LLM services only.
|
229 |
+
|
230 |
+
```bash
|
231 |
+
git clone https://github.com/infiniflow/ragflow.git
|
232 |
+
cd ragflow/
|
233 |
+
pip3 install huggingface-hub
|
234 |
+
python3 download_deps.py # embedding models
|
235 |
+
docker build -f Dockerfile -t infiniflow/ragflow:dev .
|
236 |
+
```
|
237 |
+
|
238 |
+
## 🔨 Launch service from source for development
|
239 |
+
|
240 |
+
1. Install Poetry, or skip this step if it is already installed:
|
241 |
+
```bash
|
242 |
+
curl -sSL https://install.python-poetry.org | python3 -
|
243 |
+
```
|
244 |
+
|
245 |
+
2. Clone the source code and install Python dependencies:
|
246 |
+
```bash
|
247 |
+
git clone https://github.com/infiniflow/ragflow.git
|
248 |
+
cd ragflow/
|
249 |
+
export POETRY_VIRTUALENVS_CREATE=true POETRY_VIRTUALENVS_IN_PROJECT=true
|
250 |
+
~/.local/bin/poetry install --sync --no-root # install RAGFlow dependent python modules
|
251 |
+
```
|
252 |
+
|
253 |
+
3. Launch the dependent services (MinIO, Elasticsearch, Redis, and MySQL) using Docker Compose:
|
254 |
+
```bash
|
255 |
+
docker compose -f docker/docker-compose-base.yml up -d
|
256 |
+
```
|
257 |
+
|
258 |
+
Add the following line to `/etc/hosts` to resolve all hosts specified in **docker/service_conf.yaml** to `127.0.0.1`:
|
259 |
+
```
|
260 |
+
127.0.0.1 es01 mysql minio redis
|
261 |
+
```
|
262 |
+
In **docker/service_conf.yaml**, update mysql port to `5455` and es port to `1200`, as specified in **docker/.env**.
|
263 |
+
|
264 |
+
4. If you cannot access HuggingFace, set the `HF_ENDPOINT` environment variable to use a mirror site:
|
265 |
+
|
266 |
+
```bash
|
267 |
+
export HF_ENDPOINT=https://hf-mirror.com
|
268 |
+
```
|
269 |
+
|
270 |
+
5. Launch backend service:
|
271 |
+
```bash
|
272 |
+
source .venv/bin/activate
|
273 |
+
export PYTHONPATH=$(pwd)
|
274 |
+
bash docker/launch_backend_service.sh
|
275 |
+
```
|
276 |
+
|
277 |
+
6. Install frontend dependencies:
|
278 |
+
```bash
|
279 |
+
cd web
|
280 |
+
npm install --force
|
281 |
+
```
|
282 |
+
7. Configure frontend to update `proxy.target` in **.umirc.ts** to `http://127.0.0.1:9380`:
|
283 |
+
8. Launch frontend service:
|
284 |
+
```bash
|
285 |
+
npm run dev
|
286 |
+
```
|
287 |
+
|
288 |
+
_The following output confirms a successful launch of the system:_
|
289 |
+
|
290 |
+

|
291 |
+
|
292 |
## 📚 Documentation
|
293 |
|
294 |
- [Quickstart](https://ragflow.io/docs/dev/)
|
README_ja.md
CHANGED
@@ -152,12 +152,11 @@
|
|
152 |
_以下の出力は、システムが正常に起動したことを確認するものです:_
|
153 |
|
154 |
```bash
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
/____/
|
161 |
|
162 |
* Running on all addresses (0.0.0.0)
|
163 |
* Running on http://127.0.0.1:9380
|
|
|
152 |
_以下の出力は、システムが正常に起動したことを確認するものです:_
|
153 |
|
154 |
```bash
|
155 |
+
____ ___ ______ ______ __
|
156 |
+
/ __ \ / | / ____// ____// /____ _ __
|
157 |
+
/ /_/ // /| | / / __ / /_ / // __ \| | /| / /
|
158 |
+
/ _, _// ___ |/ /_/ // __/ / // /_/ /| |/ |/ /
|
159 |
+
/_/ |_|/_/ |_|\____//_/ /_/ \____/ |__/|__/
|
|
|
160 |
|
161 |
* Running on all addresses (0.0.0.0)
|
162 |
* Running on http://127.0.0.1:9380
|
README_ko.md
CHANGED
@@ -157,12 +157,11 @@
|
|
157 |
_다음 출력 결과로 시스템이 성공적으로 시작되었음을 확인합니다:_
|
158 |
|
159 |
```bash
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
/____/
|
166 |
|
167 |
* Running on all addresses (0.0.0.0)
|
168 |
* Running on http://127.0.0.1:9380
|
|
|
157 |
_다음 출력 결과로 시스템이 성공적으로 시작되었음을 확인합니다:_
|
158 |
|
159 |
```bash
|
160 |
+
____ ___ ______ ______ __
|
161 |
+
/ __ \ / | / ____// ____// /____ _ __
|
162 |
+
/ /_/ // /| | / / __ / /_ / // __ \| | /| / /
|
163 |
+
/ _, _// ___ |/ /_/ // __/ / // /_/ /| |/ |/ /
|
164 |
+
/_/ |_|/_/ |_|\____//_/ /_/ \____/ |__/|__/
|
|
|
165 |
|
166 |
* Running on all addresses (0.0.0.0)
|
167 |
* Running on http://127.0.0.1:9380
|
README_zh.md
CHANGED
@@ -150,12 +150,11 @@
|
|
150 |
_出现以下界面提示说明服务器启动成功:_
|
151 |
|
152 |
```bash
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
/____/
|
159 |
|
160 |
* Running on all addresses (0.0.0.0)
|
161 |
* Running on http://127.0.0.1:9380
|
|
|
150 |
_出现以下界面提示说明服务器启动成功:_
|
151 |
|
152 |
```bash
|
153 |
+
____ ___ ______ ______ __
|
154 |
+
/ __ \ / | / ____// ____// /____ _ __
|
155 |
+
/ /_/ // /| | / / __ / /_ / // __ \| | /| / /
|
156 |
+
/ _, _// ___ |/ /_/ // __/ / // /_/ /| |/ |/ /
|
157 |
+
/_/ |_|/_/ |_|\____//_/ /_/ \____/ |__/|__/
|
|
|
158 |
|
159 |
* Running on all addresses (0.0.0.0)
|
160 |
* Running on http://127.0.0.1:9380
|
api/ragflow_server.py
CHANGED
@@ -47,12 +47,11 @@ def update_progress():
|
|
47 |
|
48 |
if __name__ == '__main__':
|
49 |
print(r"""
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
/_/ |_|
|
55 |
-
/____/
|
56 |
|
57 |
""", flush=True)
|
58 |
stat_logger.info(
|
|
|
47 |
|
48 |
if __name__ == '__main__':
|
49 |
print(r"""
|
50 |
+
____ ___ ______ ______ __
|
51 |
+
/ __ \ / | / ____// ____// /____ _ __
|
52 |
+
/ /_/ // /| | / / __ / /_ / // __ \| | /| / /
|
53 |
+
/ _, _// ___ |/ /_/ // __/ / // /_/ /| |/ |/ /
|
54 |
+
/_/ |_|/_/ |_|\____//_/ /_/ \____/ |__/|__/
|
|
|
55 |
|
56 |
""", flush=True)
|
57 |
stat_logger.info(
|
docker/launch_backend_service.sh
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/bin/bash
|
2 |
+
|
3 |
+
# unset http proxy which maybe set by docker daemon
|
4 |
+
export http_proxy=""; export https_proxy=""; export no_proxy=""; export HTTP_PROXY=""; export HTTPS_PROXY=""; export NO_PROXY=""
|
5 |
+
|
6 |
+
export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/
|
7 |
+
|
8 |
+
PY=python3
|
9 |
+
if [[ -z "$WS" || $WS -lt 1 ]]; then
|
10 |
+
WS=1
|
11 |
+
fi
|
12 |
+
|
13 |
+
function task_exe(){
|
14 |
+
while [ 1 -eq 1 ];do
|
15 |
+
$PY rag/svr/task_executor.py $1;
|
16 |
+
done
|
17 |
+
}
|
18 |
+
|
19 |
+
for ((i=0;i<WS;i++))
|
20 |
+
do
|
21 |
+
task_exe $i &
|
22 |
+
done
|
23 |
+
|
24 |
+
while [ 1 -eq 1 ];do
|
25 |
+
$PY api/ragflow_server.py
|
26 |
+
done
|
27 |
+
|
28 |
+
wait;
|
docs/quickstart.mdx
CHANGED
@@ -196,12 +196,11 @@ This section provides instructions on setting up the RAGFlow server on Linux. If
|
|
196 |
_The following output confirms a successful launch of the system:_
|
197 |
|
198 |
```bash
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
/____/
|
205 |
|
206 |
* Running on all addresses (0.0.0.0)
|
207 |
* Running on http://127.0.0.1:9380
|
|
|
196 |
_The following output confirms a successful launch of the system:_
|
197 |
|
198 |
```bash
|
199 |
+
____ ___ ______ ______ __
|
200 |
+
/ __ \ / | / ____// ____// /____ _ __
|
201 |
+
/ /_/ // /| | / / __ / /_ / // __ \| | /| / /
|
202 |
+
/ _, _// ___ |/ /_/ // __/ / // /_/ /| |/ |/ /
|
203 |
+
/_/ |_|/_/ |_|\____//_/ /_/ \____/ |__/|__/
|
|
|
204 |
|
205 |
* Running on all addresses (0.0.0.0)
|
206 |
* Running on http://127.0.0.1:9380
|
docs/references/faq.md
CHANGED
@@ -168,12 +168,11 @@ You will not log in to RAGFlow unless the server is fully initialized. Run `dock
|
|
168 |
*The server is successfully initialized, if your system displays the following:*
|
169 |
|
170 |
```
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
/_/ |_|
|
176 |
-
/____/
|
177 |
|
178 |
* Running on all addresses (0.0.0.0)
|
179 |
* Running on http://127.0.0.1:9380
|
|
|
168 |
*The server is successfully initialized, if your system displays the following:*
|
169 |
|
170 |
```
|
171 |
+
____ ___ ______ ______ __
|
172 |
+
/ __ \ / | / ____// ____// /____ _ __
|
173 |
+
/ /_/ // /| | / / __ / /_ / // __ \| | /| / /
|
174 |
+
/ _, _// ___ |/ /_/ // __/ / // /_/ /| |/ |/ /
|
175 |
+
/_/ |_|/_/ |_|\____//_/ /_/ \____/ |__/|__/
|
|
|
176 |
|
177 |
* Running on all addresses (0.0.0.0)
|
178 |
* Running on http://127.0.0.1:9380
|