gzdaniel commited on
Commit
10a81a6
·
1 Parent(s): 4ba605f

Update README

Browse files
Files changed (2) hide show
  1. lightrag/api/README-zh.md +44 -4
  2. lightrag/api/README.md +42 -4
lightrag/api/README-zh.md CHANGED
@@ -105,23 +105,63 @@ lightrag-gunicorn --workers 4
105
  > - **要求将.env文件置于启动目录中是经过特意设计的**。 这样做的目的是支持用户同时启动多个LightRAG实例,并为不同实例配置不同的.env文件。
106
  > - **修改.env文件后,您需要重新打开终端以使新设置生效**。 这是因为每次启动时,LightRAG Server会将.env文件中的环境变量加载至系统环境变量,且系统环境变量的设置具有更高优先级。
107
 
108
- ### 使用 Docker Compose 启动 LightRAG 服务器
109
 
110
  * 克隆代码仓库:
111
- ```
112
  git clone https://github.com/HKUDS/LightRAG.git
113
  cd LightRAG
114
  ```
115
 
116
  * 配置 .env 文件:
117
- 通过复制 env.example 文件创建个性化的 .env 文件,并根据实际需求设置 LLM 及 Embedding 参数。
118
 
119
  * 通过以下命令启动 LightRAG 服务器:
120
- ```
121
  docker compose up
122
  # 如拉取了新版本,请添加 --build 重新构建
123
  docker compose up --build
124
  ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
125
 
126
  > 在此获取LightRAG docker镜像历史版本: [LightRAG Docker Images]( https://github.com/HKUDS/LightRAG/pkgs/container/lightrag)
127
 
 
105
  > - **要求将.env文件置于启动目录中是经过特意设计的**。 这样做的目的是支持用户同时启动多个LightRAG实例,并为不同实例配置不同的.env文件。
106
  > - **修改.env文件后,您需要重新打开终端以使新设置生效**。 这是因为每次启动时,LightRAG Server会将.env文件中的环境变量加载至系统环境变量,且系统环境变量的设置具有更高优先级。
107
 
108
+ ### 使用 Docker 启动 LightRAG 服务器
109
 
110
  * 克隆代码仓库:
111
+ ```shell
112
  git clone https://github.com/HKUDS/LightRAG.git
113
  cd LightRAG
114
  ```
115
 
116
  * 配置 .env 文件:
117
+ 通过复制示例文件 [`env.example`](env.example) 创建个性化的 .env 文件,并根据实际需求设置 LLM 及 Embedding 参数。
118
 
119
  * 通过以下命令启动 LightRAG 服务器:
120
+ ```shell
121
  docker compose up
122
  # 如拉取了新版本,请添加 --build 重新构建
123
  docker compose up --build
124
  ```
125
+ ### 无需克隆代码而使用 Docker 部署 LightRAG 服务器
126
+
127
+ * 为 LightRAG 服务器创建工作文件夹:
128
+
129
+ ```shell
130
+ mkdir lightrag
131
+ cd lightrag
132
+ ```
133
+
134
+ * 准备 .env 文件:
135
+ 通过复制 env.example 文件创建个性化的.env 文件。根据您的需求配置 LLM 和嵌入参数。
136
+
137
+ * 创建一个名为 docker-compose.yml 的 docker compose 文件:
138
+
139
+ ```yaml
140
+ services:
141
+ lightrag:
142
+ container_name: lightrag
143
+ image: ghcr.io/hkuds/lightrag:latest
144
+ ports:
145
+ - "${PORT:-9621}:9621"
146
+ volumes:
147
+ - ./data/rag_storage:/app/data/rag_storage
148
+ - ./data/inputs:/app/data/inputs
149
+ - ./config.ini:/app/config.ini
150
+ - ./.env:/app/.env
151
+ env_file:
152
+ - .env
153
+ restart: unless-stopped
154
+ extra_hosts:
155
+ - "host.docker.internal:host-gateway"
156
+ ```
157
+
158
+ * 准备 .env 文件:
159
+ 通过复制示例文件 [`env.example`](env.example) 创建个性化的 .env 文件。根据您的需求配置 LLM 和嵌入参数。
160
+
161
+ * 使用以下命令启动 LightRAG 服务器:
162
+ ```shell
163
+ docker compose up
164
+ ```
165
 
166
  > 在此获取LightRAG docker镜像历史版本: [LightRAG Docker Images]( https://github.com/HKUDS/LightRAG/pkgs/container/lightrag)
167
 
lightrag/api/README.md CHANGED
@@ -107,24 +107,62 @@ Here are some commonly used startup parameters:
107
  > - The requirement for the .env file to be in the startup directory is intentionally designed this way. The purpose is to support users in launching multiple LightRAG instances simultaneously, allowing different .env files for different instances.
108
  > - **After changing the .env file, you need to open a new terminal to make the new settings take effect.** This because the LightRAG Server will load the environment variables from .env into the system environment variables each time it starts, and LightRAG Server will prioritize the settings in the system environment variables.
109
 
110
- ### Launching the LightRAG Server with Docker Compose
111
 
112
  * Clone the repository:
113
- ```
114
  git clone https://github.com/HKUDS/LightRAG.git
115
  cd LightRAG
116
  ```
117
 
118
  * Prepare the .env file:
119
- Create a personalized .env file by duplicating env.example. Configure the LLM and embedding parameters according to your requirements.
120
 
121
  * Start the LightRAG Server using the following commands:
122
- ```
123
  docker compose up
124
  # Use --build if you have pulled a new version
125
  docker compose up --build
126
  ```
127
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
128
  > Historical versions of LightRAG docker images can be found here: [LightRAG Docker Images]( https://github.com/HKUDS/LightRAG/pkgs/container/lightrag)
129
 
130
  ### Auto scan on startup
 
107
  > - The requirement for the .env file to be in the startup directory is intentionally designed this way. The purpose is to support users in launching multiple LightRAG instances simultaneously, allowing different .env files for different instances.
108
  > - **After changing the .env file, you need to open a new terminal to make the new settings take effect.** This because the LightRAG Server will load the environment variables from .env into the system environment variables each time it starts, and LightRAG Server will prioritize the settings in the system environment variables.
109
 
110
+ ### Launching LightRAG Server with Docker
111
 
112
  * Clone the repository:
113
+ ```shell
114
  git clone https://github.com/HKUDS/LightRAG.git
115
  cd LightRAG
116
  ```
117
 
118
  * Prepare the .env file:
119
+ Create a personalized .env file from sample file `env.example`. Configure the LLM and embedding parameters according to your requirements.
120
 
121
  * Start the LightRAG Server using the following commands:
122
+ ```shell
123
  docker compose up
124
  # Use --build if you have pulled a new version
125
  docker compose up --build
126
  ```
127
 
128
+ ### Deploying LightRAG Server with docker without cloneing the repository
129
+
130
+ * Create a working folder for LightRAG Server:
131
+
132
+ ```shell
133
+ mkdir lightrag
134
+ cd lightrag
135
+ ```
136
+
137
+ * Create a docker compose file named docker-compose.yml:
138
+
139
+
140
+ ```yaml
141
+ services:
142
+ lightrag:
143
+ container_name: lightrag
144
+ image: ghcr.io/hkuds/lightrag:latest
145
+ ports:
146
+ - "${PORT:-9621}:9621"
147
+ volumes:
148
+ - ./data/rag_storage:/app/data/rag_storage
149
+ - ./data/inputs:/app/data/inputs
150
+ - ./config.ini:/app/config.ini
151
+ - ./.env:/app/.env
152
+ env_file:
153
+ - .env
154
+ restart: unless-stopped
155
+ extra_hosts:
156
+ - "host.docker.internal:host-gateway"
157
+ ```
158
+ * Prepare the .env file:
159
+ Create a personalized .env file from sample file `env.example`. Configure the LLM and embedding parameters according to your requirements.
160
+
161
+ * Start the LightRAG Server using the following commands:
162
+ ```shell
163
+ docker compose up
164
+ ```
165
+
166
  > Historical versions of LightRAG docker images can be found here: [LightRAG Docker Images]( https://github.com/HKUDS/LightRAG/pkgs/container/lightrag)
167
 
168
  ### Auto scan on startup