From c18762e34a8fed983eb391f466e47486af204cb4 Mon Sep 17 00:00:00 2001 From: yangdx Date: Fri, 17 Oct 2025 15:00:53 +0800 Subject: [PATCH] Simplify Docker deployment documentation and improve clarity --- lightrag/api/README-zh.md | 38 ++++++-------------------------------- lightrag/api/README.md | 38 +++++++------------------------------- 2 files changed, 13 insertions(+), 63 deletions(-) diff --git a/lightrag/api/README-zh.md b/lightrag/api/README-zh.md index a3fcf0d3..5fefe644 100644 --- a/lightrag/api/README-zh.md +++ b/lightrag/api/README-zh.md @@ -118,36 +118,10 @@ lightrag-gunicorn --workers 4 ### 使用 Docker 启动 LightRAG 服务器 -* 配置 .env 文件: - 通过复制示例文件 [`env.example`](env.example) 创建个性化的 .env 文件,并根据实际需求设置 LLM 及 Embedding 参数。 -* 创建一个名为 docker-compose.yml 的文件: - -```yaml -services: - lightrag: - container_name: lightrag - image: ghcr.io/hkuds/lightrag:latest - build: - context: . - dockerfile: Dockerfile - tags: - - ghcr.io/hkuds/lightrag:latest - ports: - - "${PORT:-9621}:9621" - volumes: - - ./data/rag_storage:/app/data/rag_storage - - ./data/inputs:/app/data/inputs - - ./data/tiktoken:/app/data/tiktoken - - ./config.ini:/app/config.ini - - ./.env:/app/.env - env_file: - - .env - environment: - - TIKTOKEN_CACHE_DIR=/app/data/tiktoken - restart: unless-stopped - extra_hosts: - - "host.docker.internal:host-gateway" -``` +使用 Docker Compose 是部署和运行 LightRAG Server 最便捷的方式。 +- 创建一个项目目录。 +- 将 LightRAG 仓库中的 `docker-compose.yml` 文件复制到您的项目目录中。 +- 准备 `.env` 文件:复制示例文件 [`env.example`](https://ai.znipower.com:5013/c/env.example) 创建自定义的 `.env` 文件,并根据您的具体需求配置 LLM 和嵌入参数。 * 通过以下命令启动 LightRAG 服务器: @@ -155,11 +129,11 @@ services: docker compose up # 如果希望启动后让程序退到后台运行,需要在命令的最后添加 -d 参数 ``` -> 可以通过以下链接获取官方的docker compose文件:[docker-compose.yml]( https://raw.githubusercontent.com/HKUDS/LightRAG/refs/heads/main/docker-compose.yml) 。如需获取LightRAG的历史版本镜像,可以访问以下链接: [LightRAG Docker Images]( https://github.com/HKUDS/LightRAG/pkgs/container/lightrag) +> 可以通过以下链接获取官方的docker compose文件:[docker-compose.yml]( https://raw.githubusercontent.com/HKUDS/LightRAG/refs/heads/main/docker-compose.yml) 。如需获取LightRAG的历史版本镜像,可以访问以下链接: [LightRAG Docker Images]( https://github.com/HKUDS/LightRAG/pkgs/container/lightrag). 如需获取更多关于docker部署的信息,请参阅 [DockerDeployment.md](./../../docs/DockerDeployment.md). ### 离线部署 -对于离线或隔离环境,请参阅[离线部署指南](./../../docs/OfflineDeployment.md),了解如何预先安装所有依赖项和缓存文件。 +官方的 LightRAG Docker 镜像完全兼容离线或隔离网络环境。如需搭建自己的离线部署环境,请参考 [离线部署指南](./../../docs/OfflineDeployment.md)。 ### 启动多个LightRAG实例 diff --git a/lightrag/api/README.md b/lightrag/api/README.md index e1c20b99..cbeaedd2 100644 --- a/lightrag/api/README.md +++ b/lightrag/api/README.md @@ -119,37 +119,13 @@ During startup, configurations in the `.env` file can be overridden by command-l ### Launching LightRAG Server with Docker -* Prepare the .env file: - Create a personalized .env file by copying the sample file [`env.example`](env.example). Configure the LLM and embedding parameters according to your requirements. +Using Docker Compose is the most convenient way to deploy and run the LightRAG Server. -* Create a file named `docker-compose.yml`: +* Create a project directory. -```yaml -services: - lightrag: - container_name: lightrag - image: ghcr.io/hkuds/lightrag:latest - build: - context: . - dockerfile: Dockerfile - tags: - - ghcr.io/hkuds/lightrag:latest - ports: - - "${PORT:-9621}:9621" - volumes: - - ./data/rag_storage:/app/data/rag_storage - - ./data/inputs:/app/data/inputs - - ./data/tiktoken:/app/data/tiktoken - - ./config.ini:/app/config.ini - - ./.env:/app/.env - env_file: - - .env - environment: - - TIKTOKEN_CACHE_DIR=/app/data/tiktoken - restart: unless-stopped - extra_hosts: - - "host.docker.internal:host-gateway" -``` +* Copy the `docker-compose.yml` file from the LightRAG repository into your project directory. + +* Prepare the `.env` file: Duplicate the sample file [`env.example`](https://ai.znipower.com:5013/c/env.example)to create a customized `.env` file, and configure the LLM and embedding parameters according to your specific requirements. * Start the LightRAG Server with the following command: @@ -158,11 +134,11 @@ docker compose up # If you want the program to run in the background after startup, add the -d parameter at the end of the command. ``` -> You can get the official docker compose file from here: [docker-compose.yml](https://raw.githubusercontent.com/HKUDS/LightRAG/refs/heads/main/docker-compose.yml). For historical versions of LightRAG docker images, visit this link: [LightRAG Docker Images](https://github.com/HKUDS/LightRAG/pkgs/container/lightrag) +You can get the official docker compose file from here: [docker-compose.yml](https://raw.githubusercontent.com/HKUDS/LightRAG/refs/heads/main/docker-compose.yml). For historical versions of LightRAG docker images, visit this link: [LightRAG Docker Images](https://github.com/HKUDS/LightRAG/pkgs/container/lightrag). For more details about docker deployment, please refer to [DockerDeployment.md](./../../docs/DockerDeployment.md). ### Offline Deployment - For offline or air-gapped environments, see the [Offline Deployment Guide](./../../docs/OfflineDeployment.md) for instructions on pre-installing all dependencies and cache files. +Official LightRAG Docker images are fully compatible with offline or air-gapped environments. If you want to build up you own offline enviroment, please refer to [Offline Deployment Guide](./../../docs/OfflineDeployment.md). ### Starting Multiple LightRAG Instances