-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add dockerfile and fix trival bugs (#78)
- Loading branch information
Showing
14 changed files
with
233 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
FROM infiniflow/ragflow-base:v1.0 | ||
|
||
WORKDIR /ragflow | ||
|
||
COPY . ./ | ||
RUN cd ./web && npm i && npm build | ||
|
||
ENV PYTHONPATH=/ragflow | ||
ENV HF_ENDPOINT=https://hf-mirror.com | ||
|
||
COPY docker/entrypoint.sh ./ | ||
RUN chmod +x ./entrypoint.sh | ||
|
||
ENTRYPOINT ["/bin/bash", "./entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,47 @@ | ||
# docgpt | ||
English | [简体中文](./README_zh.md) | ||
|
||
|
||
## System Environment Preparation | ||
|
||
### Install docker | ||
|
||
If your machine doesn't have *Docker* installed, please refer to [Install Docker Engine](https://docs.docker.com/engine/install/) | ||
|
||
### OS Setups | ||
Inorder to run [ElasticSearch](https://www.elastic.co/guide/en/elasticsearch/reference/current/install-elasticsearch.html), | ||
you need to check the following command: | ||
```bash | ||
121:/ragflow# sysctl vm.max_map_count | ||
vm.max_map_count = 262144 | ||
``` | ||
If **vm.max_map_count** is not larger than 65535, please run the following commands: | ||
```bash | ||
121:/ragflow# sudo sysctl -w vm.max_map_count=262144 | ||
``` | ||
However, this change is not persistent and will be reset after a system reboot. | ||
To make the change permanent, you need to update the **/etc/sysctl.conf file**. | ||
Add or update the following line in the file: | ||
```bash | ||
vm.max_map_count=262144 | ||
``` | ||
|
||
### Here we go! | ||
> If you want to change the basic setups, like port, password .etc., please refer to [.env](./docker/.env) before starting the system. | ||
> If you change anything in [.env](./docker/.env), please check [service_conf.yaml](./conf/service_conf.yaml) which is a | ||
> configuration of the back-end service and should be consistent with [.env](./docker/.env). | ||
> - In [service_conf.yaml](./conf/service_conf.yaml), configuration of *LLM* in **user_default_llm** is strongly recommended. | ||
> In **user_default_llm** of [service_conf.yaml](./conf/service_conf.yaml), you need to specify LLM factory and your own _API_KEY_. | ||
> It's O.K if you don't have _API_KEY_ at the moment, you can specify it later at the setting part after starting and logging in the system. | ||
> - We have supported the flowing LLM factory, and the others is coming soon: | ||
> [OpenAI](https://platform.openai.com/login?launch), [通义千问/QWen](https://dashscope.console.aliyun.com/model), | ||
> [智普AI/ZhipuAI](https://open.bigmodel.cn/) | ||
```bash | ||
121:/ragflow# cd docker | ||
121:/ragflow/docker# docker compose up | ||
``` | ||
If after a few minutes, it stops screening and halts like following picture, _**Hallelujah!**_ You have successfully launched the system. | ||
<div align="center" style="margin-top:20px;margin-bottom:20px;"> | ||
<img src="https://github.com/infiniflow/ragflow/assets/12318111/7dc8b73f-7890-41b4-aa09-97a417cfd20b" width="1000"/> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[English](./README.md) | 简体中文 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,36 @@ | ||
authentication: | ||
client: | ||
switch: false | ||
http_app_key: | ||
http_secret_key: | ||
site: | ||
switch: false | ||
permission: | ||
switch: false | ||
component: false | ||
dataset: false | ||
ragflow: | ||
# you must set real ip address, 127.0.0.1 and 0.0.0.0 is not supported | ||
host: 0.0.0.0 | ||
http_port: 9380 | ||
database: | ||
mysql: | ||
name: 'rag_flow' | ||
user: 'root' | ||
passwd: 'infini_rag_flow' | ||
password: 'infini_rag_flow' | ||
host: '127.0.0.1' | ||
port: 5455 | ||
max_connections: 100 | ||
stale_timeout: 30 | ||
minio: | ||
user: 'rag_flow' | ||
passwd: 'infini_rag_flow' | ||
password: 'infini_rag_flow' | ||
host: '127.0.0.1:9000' | ||
es: | ||
hosts: 'http://127.0.0.1:9200' | ||
hosts: 'http://127.0.0.1:1200' | ||
user_default_llm: | ||
factory: '通义千问' | ||
chat_model: 'qwen-plus' | ||
embedding_model: 'text-embedding-v2' | ||
asr_model: 'paraformer-realtime-8k-v1' | ||
image2text_model: 'qwen-vl-max' | ||
api_key: 'sk-xxxxxxxxxxxxx' | ||
oauth: | ||
github: | ||
client_id: 302129228f0d96055bee | ||
secret_key: e518e55ccfcdfcae8996afc40f110e9c95f14fc4 | ||
url: https://github.com/login/oauth/access_token | ||
url: https://github.com/login/oauth/access_token | ||
authentication: | ||
client: | ||
switch: false | ||
http_app_key: | ||
http_secret_key: | ||
site: | ||
switch: false | ||
permission: | ||
switch: false | ||
component: false | ||
dataset: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/bash | ||
|
||
python rag/svr/task_broker.py & | ||
|
||
function task_exe(){ | ||
while [ 1 -eq 1 ];do mpirun -n 2 python rag/svr/task_executor.py ; done | ||
} | ||
|
||
function watch_broker(){ | ||
while [ 1 -eq 1];do | ||
C=`ps aux|grep "task_broker.py"|grep -v grep|wc -l`; | ||
if [ $C -lt 1 ];then | ||
python rag/svr/task_broker.py & | ||
fi | ||
sleep 5; | ||
done | ||
} | ||
|
||
|
||
task_exe & | ||
sleep 10; | ||
watch_broker & | ||
|
||
python api/ragflow_server.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
ragflow: | ||
host: 0.0.0.0 | ||
http_port: 9380 | ||
mysql: | ||
name: 'rag_flow' | ||
user: 'root' | ||
password: 'infini_rag_flow' | ||
host: '127.0.0.1' | ||
port: 5455 | ||
max_connections: 100 | ||
stale_timeout: 30 | ||
minio: | ||
user: 'rag_flow' | ||
password: 'infini_rag_flow' | ||
host: '127.0.0.1:9000' | ||
es: | ||
hosts: 'http://127.0.0.1:1200' | ||
user_default_llm: | ||
factory: '通义千问' | ||
api_key: 'sk-xxxxxxxxxxxxx' | ||
oauth: | ||
github: | ||
client_id: 302129228f0d96055bee | ||
secret_key: e518e55ccfcdfcae8996afc40f110e9c95f14fc4 | ||
url: https://github.com/login/oauth/access_token | ||
authentication: | ||
client: | ||
switch: false | ||
http_app_key: | ||
http_secret_key: | ||
site: | ||
switch: false | ||
permission: | ||
switch: false | ||
component: false | ||
dataset: false |
Oops, something went wrong.