Fix docker file bugs (#2662)
Browse files### What problem does this PR solve?
Fix docker file bugs
### Type of change
- [x] Bug Fix (non-breaking change which fixes an issue)
- [x] Documentation Update
---------
Co-authored-by: writinwaters <[email protected]>
Co-authored-by: Kevin Hu <[email protected]>
- Dockerfile +4 -2
- Dockerfile.arm +0 -43
- Dockerfile.cuda +0 -27
- Dockerfile.scratch.oc9 +0 -58
- Dockerfile.slim +12 -2
- README.md +1 -1
- README_ja.md +1 -1
- README_ko.md +1 -1
- README_zh.md +7 -5
- api/versions.py +1 -3
- docker/.env +7 -3
- docker/docker-compose-CN-oc9.yml +0 -30
- docker/docker-compose-CN.yml +0 -30
- docker/docker-compose-gpu-CN-oc9.yml +0 -37
- docker/docker-compose-gpu-CN.yml +0 -37
- docker/docker-compose-gpu.yml +1 -1
- docker/docker-compose.yml +1 -1
- docs/quickstart.mdx +1 -1
- docs/references/faq.md +10 -34
- poetry.lock +17 -6
- pyproject.toml +2 -1
Dockerfile
CHANGED
@@ -16,11 +16,13 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
|
|
16 |
RUN sed -i 's|http://archive.ubuntu.com|https://mirrors.tuna.tsinghua.edu.cn|g' /etc/apt/sources.list.d/ubuntu.sources
|
17 |
|
18 |
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
|
19 |
-
apt update && apt install -y curl libpython3-dev nginx libglib2.0-0 libglx-mesa0 \
|
20 |
&& rm -rf /var/lib/apt/lists/* \
|
21 |
&& curl -sSL https://install.python-poetry.org | python3 -
|
22 |
|
23 |
-
|
|
|
|
|
24 |
|
25 |
# Configure Poetry
|
26 |
ENV POETRY_NO_INTERACTION=1
|
|
|
16 |
RUN sed -i 's|http://archive.ubuntu.com|https://mirrors.tuna.tsinghua.edu.cn|g' /etc/apt/sources.list.d/ubuntu.sources
|
17 |
|
18 |
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
|
19 |
+
apt update && apt install -y curl libpython3-dev nginx libglib2.0-0 libglx-mesa0 pkg-config libicu-dev libgdiplus \
|
20 |
&& rm -rf /var/lib/apt/lists/* \
|
21 |
&& curl -sSL https://install.python-poetry.org | python3 -
|
22 |
|
23 |
+
RUN curl -o libssl1.deb http://archive.ubuntu.com/ubuntu/pool/main/o/openssl1.0/libssl1.0.0_1.0.2n-1ubuntu5_amd64.deb && dpkg -i libssl1.deb && rm -f libssl1.deb
|
24 |
+
|
25 |
+
ENV PYTHONDONTWRITEBYTECODE=1 DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1
|
26 |
|
27 |
# Configure Poetry
|
28 |
ENV POETRY_NO_INTERACTION=1
|
Dockerfile.arm
DELETED
@@ -1,43 +0,0 @@
|
|
1 |
-
FROM python:3.11
|
2 |
-
USER root
|
3 |
-
|
4 |
-
WORKDIR /ragflow
|
5 |
-
|
6 |
-
COPY requirements_arm.txt /ragflow/requirements.txt
|
7 |
-
|
8 |
-
|
9 |
-
RUN pip install nltk --default-timeout=10000
|
10 |
-
|
11 |
-
RUN pip install -i https://mirrors.aliyun.com/pypi/simple/ --default-timeout=1000 -r requirements.txt &&\
|
12 |
-
python -c "import nltk;nltk.download('punkt');nltk.download('wordnet')"
|
13 |
-
|
14 |
-
RUN apt-get update && \
|
15 |
-
apt-get install -y curl gnupg && \
|
16 |
-
rm -rf /var/lib/apt/lists/*
|
17 |
-
|
18 |
-
RUN curl -sL https://deb.nodesource.com/setup_20.x | bash - && \
|
19 |
-
apt-get install -y --fix-missing nodejs nginx ffmpeg libsm6 libxext6 libgl1
|
20 |
-
|
21 |
-
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
22 |
-
ENV PATH="/root/.cargo/bin:${PATH}"
|
23 |
-
|
24 |
-
RUN pip install graspologic
|
25 |
-
|
26 |
-
ADD ./web ./web
|
27 |
-
RUN cd ./web && npm i --force && npm run build
|
28 |
-
|
29 |
-
ADD ./api ./api
|
30 |
-
ADD ./conf ./conf
|
31 |
-
ADD ./deepdoc ./deepdoc
|
32 |
-
ADD ./rag ./rag
|
33 |
-
ADD ./agent ./agent
|
34 |
-
ADD ./graphrag ./graphrag
|
35 |
-
|
36 |
-
ENV PYTHONPATH=/ragflow/
|
37 |
-
ENV HF_ENDPOINT=https://hf-mirror.com
|
38 |
-
|
39 |
-
ADD docker/entrypoint.sh ./entrypoint.sh
|
40 |
-
ADD docker/.env ./
|
41 |
-
RUN chmod +x ./entrypoint.sh
|
42 |
-
|
43 |
-
ENTRYPOINT ["./entrypoint.sh"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Dockerfile.cuda
DELETED
@@ -1,27 +0,0 @@
|
|
1 |
-
FROM infiniflow/ragflow-base:v2.0
|
2 |
-
USER root
|
3 |
-
|
4 |
-
WORKDIR /ragflow
|
5 |
-
|
6 |
-
## for cuda > 12.0
|
7 |
-
RUN pip uninstall -y onnxruntime-gpu
|
8 |
-
RUN pip install onnxruntime-gpu --extra-index-url https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/onnxruntime-cuda-12/pypi/simple/
|
9 |
-
|
10 |
-
|
11 |
-
ADD ./web ./web
|
12 |
-
RUN cd ./web && npm i --force && npm run build
|
13 |
-
|
14 |
-
ADD ./api ./api
|
15 |
-
ADD ./conf ./conf
|
16 |
-
ADD ./deepdoc ./deepdoc
|
17 |
-
ADD ./rag ./rag
|
18 |
-
ADD ./agent ./agent
|
19 |
-
ADD ./graphrag ./graphrag
|
20 |
-
|
21 |
-
ENV PYTHONPATH=/ragflow/
|
22 |
-
ENV HF_ENDPOINT=https://hf-mirror.com
|
23 |
-
|
24 |
-
ADD docker/entrypoint.sh ./entrypoint.sh
|
25 |
-
RUN chmod +x ./entrypoint.sh
|
26 |
-
|
27 |
-
ENTRYPOINT ["./entrypoint.sh"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Dockerfile.scratch.oc9
DELETED
@@ -1,58 +0,0 @@
|
|
1 |
-
FROM opencloudos/opencloudos:9.0
|
2 |
-
USER root
|
3 |
-
|
4 |
-
WORKDIR /ragflow
|
5 |
-
|
6 |
-
RUN dnf update -y && dnf install -y wget curl gcc-c++ openmpi-devel
|
7 |
-
|
8 |
-
RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh && \
|
9 |
-
bash ~/miniconda.sh -b -p /root/miniconda3 && \
|
10 |
-
rm ~/miniconda.sh && ln -s /root/miniconda3/etc/profile.d/conda.sh /etc/profile.d/conda.sh && \
|
11 |
-
echo ". /root/miniconda3/etc/profile.d/conda.sh" >> ~/.bashrc && \
|
12 |
-
echo "conda activate base" >> ~/.bashrc
|
13 |
-
|
14 |
-
ENV PATH /root/miniconda3/bin:$PATH
|
15 |
-
|
16 |
-
RUN conda create -y --name py11 python=3.11
|
17 |
-
|
18 |
-
ENV CONDA_DEFAULT_ENV py11
|
19 |
-
ENV CONDA_PREFIX /root/miniconda3/envs/py11
|
20 |
-
ENV PATH $CONDA_PREFIX/bin:$PATH
|
21 |
-
|
22 |
-
# RUN curl -sL https://rpm.nodesource.com/setup_14.x | bash -
|
23 |
-
RUN dnf install -y nodejs
|
24 |
-
|
25 |
-
RUN dnf install -y nginx
|
26 |
-
|
27 |
-
ADD ./web ./web
|
28 |
-
ADD ./api ./api
|
29 |
-
ADD ./conf ./conf
|
30 |
-
ADD ./deepdoc ./deepdoc
|
31 |
-
ADD ./rag ./rag
|
32 |
-
ADD ./requirements.txt ./requirements.txt
|
33 |
-
ADD ./agent ./agent
|
34 |
-
ADD ./graphrag ./graphrag
|
35 |
-
|
36 |
-
RUN dnf install -y openmpi openmpi-devel python3-openmpi
|
37 |
-
ENV C_INCLUDE_PATH /usr/include/openmpi-x86_64:$C_INCLUDE_PATH
|
38 |
-
ENV LD_LIBRARY_PATH /usr/lib64/openmpi/lib:$LD_LIBRARY_PATH
|
39 |
-
RUN rm /root/miniconda3/envs/py11/compiler_compat/ld
|
40 |
-
RUN cd ./web && npm i --force && npm run build
|
41 |
-
RUN conda run -n py11 pip install $(grep -ivE "mpi4py" ./requirements.txt) # without mpi4py==3.1.5
|
42 |
-
RUN conda run -n py11 pip install redis
|
43 |
-
|
44 |
-
RUN dnf update -y && \
|
45 |
-
dnf install -y glib2 mesa-libGL && \
|
46 |
-
dnf clean all
|
47 |
-
|
48 |
-
RUN conda run -n py11 pip install ollama
|
49 |
-
RUN conda run -n py11 python -m nltk.downloader punkt
|
50 |
-
RUN conda run -n py11 python -m nltk.downloader wordnet
|
51 |
-
|
52 |
-
ENV PYTHONPATH=/ragflow/
|
53 |
-
ENV HF_ENDPOINT=https://hf-mirror.com
|
54 |
-
|
55 |
-
ADD docker/entrypoint.sh ./entrypoint.sh
|
56 |
-
RUN chmod +x ./entrypoint.sh
|
57 |
-
|
58 |
-
ENTRYPOINT ["./entrypoint.sh"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Dockerfile.slim
CHANGED
@@ -16,11 +16,13 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
|
|
16 |
RUN sed -i 's|http://archive.ubuntu.com|https://mirrors.tuna.tsinghua.edu.cn|g' /etc/apt/sources.list.d/ubuntu.sources
|
17 |
|
18 |
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
|
19 |
-
apt update && apt install -y curl libpython3-dev nginx libglib2.0-0 libglx-mesa0 \
|
20 |
&& rm -rf /var/lib/apt/lists/* \
|
21 |
&& curl -sSL https://install.python-poetry.org | python3 -
|
22 |
|
23 |
-
|
|
|
|
|
24 |
|
25 |
# Configure Poetry
|
26 |
ENV POETRY_NO_INTERACTION=1
|
@@ -72,6 +74,14 @@ COPY agent agent
|
|
72 |
COPY graphrag graphrag
|
73 |
COPY pyproject.toml poetry.toml poetry.lock ./
|
74 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
75 |
# Copy compiled web pages
|
76 |
COPY --from=builder /ragflow/web/dist /ragflow/web/dist
|
77 |
|
|
|
16 |
RUN sed -i 's|http://archive.ubuntu.com|https://mirrors.tuna.tsinghua.edu.cn|g' /etc/apt/sources.list.d/ubuntu.sources
|
17 |
|
18 |
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
|
19 |
+
apt update && apt install -y curl libpython3-dev nginx libglib2.0-0 libglx-mesa0 pkg-config libicu-dev libgdiplus \
|
20 |
&& rm -rf /var/lib/apt/lists/* \
|
21 |
&& curl -sSL https://install.python-poetry.org | python3 -
|
22 |
|
23 |
+
RUN curl -o libssl1.deb http://archive.ubuntu.com/ubuntu/pool/main/o/openssl1.0/libssl1.0.0_1.0.2n-1ubuntu5_amd64.deb && dpkg -i libssl1.deb && rm -f libssl1.deb
|
24 |
+
|
25 |
+
ENV PYTHONDONTWRITEBYTECODE=1 DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1
|
26 |
|
27 |
# Configure Poetry
|
28 |
ENV POETRY_NO_INTERACTION=1
|
|
|
74 |
COPY graphrag graphrag
|
75 |
COPY pyproject.toml poetry.toml poetry.lock ./
|
76 |
|
77 |
+
# Copy models downloaded via download_deps.py
|
78 |
+
RUN mkdir -p /ragflow/rag/res/deepdoc /root/.ragflow
|
79 |
+
RUN --mount=type=bind,source=huggingface.io,target=/huggingface.io \
|
80 |
+
tar --exclude='.*' -cf - \
|
81 |
+
/huggingface.io/InfiniFlow/text_concat_xgb_v1.0 \
|
82 |
+
/huggingface.io/InfiniFlow/deepdoc \
|
83 |
+
| tar -xf - --strip-components=3 -C /ragflow/rag/res/deepdoc
|
84 |
+
|
85 |
# Copy compiled web pages
|
86 |
COPY --from=builder /ragflow/web/dist /ragflow/web/dist
|
87 |
|
README.md
CHANGED
@@ -152,7 +152,7 @@ Try our demo at [https://demo.ragflow.io](https://demo.ragflow.io).
|
|
152 |
```
|
153 |
|
154 |
3. Build the pre-built Docker images and start up the server:
|
155 |
-
> Running the following commands automatically downloads the *dev* version RAGFlow Docker image. To download and run a specified Docker version, update `
|
156 |
|
157 |
```bash
|
158 |
$ cd ragflow/docker
|
|
|
152 |
```
|
153 |
|
154 |
3. Build the pre-built Docker images and start up the server:
|
155 |
+
> Running the following commands automatically downloads the *dev* version RAGFlow Docker image. To download and run a specified Docker version, update `RAGFLOW_IMAGE` in **docker/.env** to the intended version, for example `RAGFLOW_IMAGE=infiniflow/ragflow:v0.12.0`, before running the following commands.
|
156 |
|
157 |
```bash
|
158 |
$ cd ragflow/docker
|
README_ja.md
CHANGED
@@ -140,7 +140,7 @@
|
|
140 |
$ docker compose up -d
|
141 |
```
|
142 |
|
143 |
-
> 上記のコマンドを実行すると、RAGFlowの開発版dockerイメージが自動的にダウンロードされます。 特定のバージョンのDockerイメージをダウンロードして実行したい場合は、docker/.envファイルの
|
144 |
|
145 |
> コアイメージのサイズは約 9 GB で、ロードに時間がかかる場合があります。
|
146 |
|
|
|
140 |
$ docker compose up -d
|
141 |
```
|
142 |
|
143 |
+
> 上記のコマンドを実行すると、RAGFlowの開発版dockerイメージが自動的にダウンロードされます。 特定のバージョンのDockerイメージをダウンロードして実行したい場合は、docker/.envファイルのRAGFLOW_IMAGE変数を見つけて、対応するバージョンに変更してください。 例えば、`RAGFLOW_IMAGE=infiniflow/ragflow:v0.12.0`として、上記のコマンドを実行してください。
|
144 |
|
145 |
> コアイメージのサイズは約 9 GB で、ロードに時間がかかる場合があります。
|
146 |
|
README_ko.md
CHANGED
@@ -140,7 +140,7 @@
|
|
140 |
|
141 |
3. 미리 빌드된 Docker 이미지를 생성하고 서버를 시작하세요:
|
142 |
|
143 |
-
> 다음 명령어를 실행하면 *dev* 버전의 RAGFlow Docker 이미지가 자동으로 다운로드됩니다. 특정 Docker 버전을 다운로드하고 실행하려면, **docker/.env** 파일에서 `
|
144 |
```bash
|
145 |
$ cd ragflow/docker
|
146 |
$ chmod +x ./entrypoint.sh
|
|
|
140 |
|
141 |
3. 미리 빌드된 Docker 이미지를 생성하고 서버를 시작하세요:
|
142 |
|
143 |
+
> 다음 명령어를 실행하면 *dev* 버전의 RAGFlow Docker 이미지가 자동으로 다운로드됩니다. 특정 Docker 버전을 다운로드하고 실행하려면, **docker/.env** 파일에서 `RAGFLOW_IMAGE`을 원하는 버전으로 업데이트한 후, 예를 들어 `RAGFLOW_IMAGE=infiniflow/ragflow:v0.12.0`로 업데이트 한 뒤, 다음 명령어를 실행하세요.
|
144 |
```bash
|
145 |
$ cd ragflow/docker
|
146 |
$ chmod +x ./entrypoint.sh
|
README_zh.md
CHANGED
@@ -135,10 +135,10 @@
|
|
135 |
```bash
|
136 |
$ cd ragflow/docker
|
137 |
$ chmod +x ./entrypoint.sh
|
138 |
-
$ docker compose -f docker-compose
|
139 |
```
|
140 |
|
141 |
-
> 请注意,运行上述命令会自动下载 RAGFlow 的开发版本 docker 镜像。如果你想下载并运行特定版本的 docker 镜像,请在 docker/.env 文件中找到
|
142 |
|
143 |
> 核心镜像下载大小为 9 GB,可能需要一定时间拉取。请耐心等待。
|
144 |
|
@@ -178,18 +178,20 @@
|
|
178 |
|
179 |
- [.env](./docker/.env):存放一些基本的系统环境变量,比如 `SVR_HTTP_PORT`、`MYSQL_PASSWORD`、`MINIO_PASSWORD` 等。
|
180 |
- [service_conf.yaml](./docker/service_conf.yaml):配置各类后台服务。
|
181 |
-
- [docker-compose
|
182 |
|
183 |
请务必确保 [.env](./docker/.env) 文件中的变量设置与 [service_conf.yaml](./docker/service_conf.yaml) 文件中的配置保持一致!
|
184 |
|
|
|
|
|
185 |
> [./docker/README](./docker/README.md) 文件提供了环境变量设置和服务配置的详细信息。请**一定要**确保 [./docker/README](./docker/README.md) 文件当中列出来的环境变量的值与 [service_conf.yaml](./docker/service_conf.yaml) 文件当中的系统配置保持一致。
|
186 |
|
187 |
-
如需更新默认的 HTTP 服务端口(80), 可以在 [docker-compose
|
188 |
|
189 |
> 所有系统配置都需要通过系统重启生效:
|
190 |
>
|
191 |
> ```bash
|
192 |
-
> $ docker compose -f docker-compose
|
193 |
> ```
|
194 |
|
195 |
## 🪛 源码编译 Docker 镜像(不含 embedding 模型)
|
|
|
135 |
```bash
|
136 |
$ cd ragflow/docker
|
137 |
$ chmod +x ./entrypoint.sh
|
138 |
+
$ docker compose -f docker-compose.yml up -d
|
139 |
```
|
140 |
|
141 |
+
> 请注意,运行上述命令会自动下载 RAGFlow 的开发版本 docker 镜像。如果你想下载并运行特定版本的 docker 镜像,请在 docker/.env 文件中找到 RAGFLOW_IMAGE 变量,将其改为对应版本。例如 `RAGFLOW_IMAGE=infiniflow/ragflow:v0.12.0`,然后运行上述命令。
|
142 |
|
143 |
> 核心镜像下载大小为 9 GB,可能需要一定时间拉取。请耐心等待。
|
144 |
|
|
|
178 |
|
179 |
- [.env](./docker/.env):存放一些基本的系统环境变量,比如 `SVR_HTTP_PORT`、`MYSQL_PASSWORD`、`MINIO_PASSWORD` 等。
|
180 |
- [service_conf.yaml](./docker/service_conf.yaml):配置各类后台服务。
|
181 |
+
- [docker-compose.yml](./docker/docker-compose.yml): 系统依赖该文件完成启动。
|
182 |
|
183 |
请务必确保 [.env](./docker/.env) 文件中的变量设置与 [service_conf.yaml](./docker/service_conf.yaml) 文件中的配置保持一致!
|
184 |
|
185 |
+
如果不能访问镜像站点hub.docker.com或者模型站点huggingface.io,请按照[.env](./docker/.env)注释修改`RAGFLOW_IMAGE`和`HF_ENDPOINT`。
|
186 |
+
|
187 |
> [./docker/README](./docker/README.md) 文件提供了环境变量设置和服务配置的详细信息。请**一定要**确保 [./docker/README](./docker/README.md) 文件当中列出来的环境变量的值与 [service_conf.yaml](./docker/service_conf.yaml) 文件当中的系统配置保持一致。
|
188 |
|
189 |
+
如需更新默认的 HTTP 服务端口(80), 可以在 [docker-compose.yml](./docker/docker-compose.yml) 文件中将配置 `80:80` 改为 `<YOUR_SERVING_PORT>:80`。
|
190 |
|
191 |
> 所有系统配置都需要通过系统重启生效:
|
192 |
>
|
193 |
> ```bash
|
194 |
+
> $ docker compose -f docker-compose.yml up -d
|
195 |
> ```
|
196 |
|
197 |
## 🪛 源码编译 Docker 镜像(不含 embedding 模型)
|
api/versions.py
CHANGED
@@ -13,10 +13,8 @@
|
|
13 |
# See the License for the specific language governing permissions and
|
14 |
# limitations under the License.
|
15 |
#
|
16 |
-
import os
|
17 |
import dotenv
|
18 |
import typing
|
19 |
-
from api.utils.file_utils import get_project_base_directory
|
20 |
|
21 |
|
22 |
def get_versions() -> typing.Mapping[str, typing.Any]:
|
@@ -25,4 +23,4 @@ def get_versions() -> typing.Mapping[str, typing.Any]:
|
|
25 |
|
26 |
|
27 |
def get_rag_version() -> typing.Optional[str]:
|
28 |
-
return get_versions().get("
|
|
|
13 |
# See the License for the specific language governing permissions and
|
14 |
# limitations under the License.
|
15 |
#
|
|
|
16 |
import dotenv
|
17 |
import typing
|
|
|
18 |
|
19 |
|
20 |
def get_versions() -> typing.Mapping[str, typing.Any]:
|
|
|
23 |
|
24 |
|
25 |
def get_rag_version() -> typing.Optional[str]:
|
26 |
+
return get_versions().get("RAGFLOW_IMAGE", "infiniflow/ragflow:dev").split(":")[-1]
|
docker/.env
CHANGED
@@ -33,12 +33,16 @@ REDIS_PASSWORD=infini_rag_flow
|
|
33 |
|
34 |
SVR_HTTP_PORT=9380
|
35 |
|
36 |
-
|
|
|
|
|
|
|
|
|
37 |
|
38 |
TIMEZONE='Asia/Shanghai'
|
39 |
|
40 |
-
#
|
41 |
-
HF_ENDPOINT=https://hf-mirror.com
|
42 |
|
43 |
######## OS setup for ES ###########
|
44 |
# sysctl vm.max_map_count
|
|
|
33 |
|
34 |
SVR_HTTP_PORT=9380
|
35 |
|
36 |
+
RAGFLOW_IMAGE=infiniflow/ragflow:dev-slim
|
37 |
+
|
38 |
+
# If inside mainland China, decomment either of the following hub.docker.com mirrors:
|
39 |
+
# RAGFLOW_IMAGE=swr.cn-north-4.myhuaweicloud.com/infiniflow/ragflow:dev-slim
|
40 |
+
# RAGFLOW_IMAGE=registry.cn-hangzhou.aliyuncs.com/infiniflow/ragflow:dev-slim
|
41 |
|
42 |
TIMEZONE='Asia/Shanghai'
|
43 |
|
44 |
+
# If inside mainland China, decomment the following huggingface.co mirror:
|
45 |
+
# HF_ENDPOINT=https://hf-mirror.com
|
46 |
|
47 |
######## OS setup for ES ###########
|
48 |
# sysctl vm.max_map_count
|
docker/docker-compose-CN-oc9.yml
DELETED
@@ -1,30 +0,0 @@
|
|
1 |
-
include:
|
2 |
-
- path: ./docker-compose-base.yml
|
3 |
-
env_file: ./.env
|
4 |
-
|
5 |
-
services:
|
6 |
-
ragflow:
|
7 |
-
depends_on:
|
8 |
-
mysql:
|
9 |
-
condition: service_healthy
|
10 |
-
es01:
|
11 |
-
condition: service_healthy
|
12 |
-
image: edwardelric233/ragflow:oc9
|
13 |
-
container_name: ragflow-server
|
14 |
-
ports:
|
15 |
-
- ${SVR_HTTP_PORT}:9380
|
16 |
-
- 80:80
|
17 |
-
- 443:443
|
18 |
-
volumes:
|
19 |
-
- ./service_conf.yaml:/ragflow/conf/service_conf.yaml
|
20 |
-
- ./ragflow-logs:/ragflow/logs
|
21 |
-
- ./nginx/ragflow.conf:/etc/nginx/conf.d/ragflow.conf
|
22 |
-
- ./nginx/proxy.conf:/etc/nginx/proxy.conf
|
23 |
-
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
|
24 |
-
environment:
|
25 |
-
- TZ=${TIMEZONE}
|
26 |
-
- HF_ENDPOINT=https://hf-mirror.com
|
27 |
-
- MACOS=${MACOS}
|
28 |
-
networks:
|
29 |
-
- ragflow
|
30 |
-
restart: always
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
docker/docker-compose-CN.yml
DELETED
@@ -1,30 +0,0 @@
|
|
1 |
-
include:
|
2 |
-
- path: ./docker-compose-base.yml
|
3 |
-
env_file: ./.env
|
4 |
-
|
5 |
-
services:
|
6 |
-
ragflow:
|
7 |
-
depends_on:
|
8 |
-
mysql:
|
9 |
-
condition: service_healthy
|
10 |
-
es01:
|
11 |
-
condition: service_healthy
|
12 |
-
image: swr.cn-north-4.myhuaweicloud.com/infiniflow/ragflow:${RAGFLOW_VERSION}
|
13 |
-
container_name: ragflow-server
|
14 |
-
ports:
|
15 |
-
- ${SVR_HTTP_PORT}:9380
|
16 |
-
- 80:80
|
17 |
-
- 443:443
|
18 |
-
volumes:
|
19 |
-
- ./service_conf.yaml:/ragflow/conf/service_conf.yaml
|
20 |
-
- ./ragflow-logs:/ragflow/logs
|
21 |
-
- ./nginx/ragflow.conf:/etc/nginx/conf.d/ragflow.conf
|
22 |
-
- ./nginx/proxy.conf:/etc/nginx/proxy.conf
|
23 |
-
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
|
24 |
-
environment:
|
25 |
-
- TZ=${TIMEZONE}
|
26 |
-
- HF_ENDPOINT=https://hf-mirror.com
|
27 |
-
- MACOS=${MACOS}
|
28 |
-
networks:
|
29 |
-
- ragflow
|
30 |
-
restart: always
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
docker/docker-compose-gpu-CN-oc9.yml
DELETED
@@ -1,37 +0,0 @@
|
|
1 |
-
include:
|
2 |
-
- path: ./docker-compose-base.yml
|
3 |
-
env_file: ./.env
|
4 |
-
|
5 |
-
services:
|
6 |
-
ragflow:
|
7 |
-
depends_on:
|
8 |
-
mysql:
|
9 |
-
condition: service_healthy
|
10 |
-
es01:
|
11 |
-
condition: service_healthy
|
12 |
-
image: edwardelric233/ragflow:oc9
|
13 |
-
container_name: ragflow-server
|
14 |
-
ports:
|
15 |
-
- ${SVR_HTTP_PORT}:9380
|
16 |
-
- 80:80
|
17 |
-
- 443:443
|
18 |
-
volumes:
|
19 |
-
- ./service_conf.yaml:/ragflow/conf/service_conf.yaml
|
20 |
-
- ./ragflow-logs:/ragflow/logs
|
21 |
-
- ./nginx/ragflow.conf:/etc/nginx/conf.d/ragflow.conf
|
22 |
-
- ./nginx/proxy.conf:/etc/nginx/proxy.conf
|
23 |
-
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
|
24 |
-
environment:
|
25 |
-
- TZ=${TIMEZONE}
|
26 |
-
- HF_ENDPOINT=https://hf-mirror.com
|
27 |
-
- MACOS=${MACOS}
|
28 |
-
networks:
|
29 |
-
- ragflow
|
30 |
-
restart: always
|
31 |
-
deploy:
|
32 |
-
resources:
|
33 |
-
reservations:
|
34 |
-
devices:
|
35 |
-
- driver: nvidia
|
36 |
-
count: all
|
37 |
-
capabilities: [gpu]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
docker/docker-compose-gpu-CN.yml
DELETED
@@ -1,37 +0,0 @@
|
|
1 |
-
include:
|
2 |
-
- path: ./docker-compose-base.yml
|
3 |
-
env_file: ./.env
|
4 |
-
|
5 |
-
services:
|
6 |
-
ragflow:
|
7 |
-
depends_on:
|
8 |
-
mysql:
|
9 |
-
condition: service_healthy
|
10 |
-
es01:
|
11 |
-
condition: service_healthy
|
12 |
-
image: swr.cn-north-4.myhuaweicloud.com/infiniflow/ragflow:${RAGFLOW_VERSION}
|
13 |
-
container_name: ragflow-server
|
14 |
-
ports:
|
15 |
-
- ${SVR_HTTP_PORT}:9380
|
16 |
-
- 80:80
|
17 |
-
- 443:443
|
18 |
-
volumes:
|
19 |
-
- ./service_conf.yaml:/ragflow/conf/service_conf.yaml
|
20 |
-
- ./ragflow-logs:/ragflow/logs
|
21 |
-
- ./nginx/ragflow.conf:/etc/nginx/conf.d/ragflow.conf
|
22 |
-
- ./nginx/proxy.conf:/etc/nginx/proxy.conf
|
23 |
-
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
|
24 |
-
environment:
|
25 |
-
- TZ=${TIMEZONE}
|
26 |
-
- HF_ENDPOINT=https://hf-mirror.com
|
27 |
-
- MACOS=${MACOS}
|
28 |
-
networks:
|
29 |
-
- ragflow
|
30 |
-
restart: always
|
31 |
-
deploy:
|
32 |
-
resources:
|
33 |
-
reservations:
|
34 |
-
devices:
|
35 |
-
- driver: nvidia
|
36 |
-
count: all
|
37 |
-
capabilities: [gpu]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
docker/docker-compose-gpu.yml
CHANGED
@@ -9,7 +9,7 @@ services:
|
|
9 |
condition: service_healthy
|
10 |
es01:
|
11 |
condition: service_healthy
|
12 |
-
image:
|
13 |
container_name: ragflow-server
|
14 |
ports:
|
15 |
- ${SVR_HTTP_PORT}:9380
|
|
|
9 |
condition: service_healthy
|
10 |
es01:
|
11 |
condition: service_healthy
|
12 |
+
image: ${RAGFLOW_IMAGE}
|
13 |
container_name: ragflow-server
|
14 |
ports:
|
15 |
- ${SVR_HTTP_PORT}:9380
|
docker/docker-compose.yml
CHANGED
@@ -9,7 +9,7 @@ services:
|
|
9 |
condition: service_healthy
|
10 |
es01:
|
11 |
condition: service_healthy
|
12 |
-
image:
|
13 |
container_name: ragflow-server
|
14 |
ports:
|
15 |
- ${SVR_HTTP_PORT}:9380
|
|
|
9 |
condition: service_healthy
|
10 |
es01:
|
11 |
condition: service_healthy
|
12 |
+
image: ${RAGFLOW_IMAGE}
|
13 |
container_name: ragflow-server
|
14 |
ports:
|
15 |
- ${SVR_HTTP_PORT}:9380
|
docs/quickstart.mdx
CHANGED
@@ -177,7 +177,7 @@ This section provides instructions on setting up the RAGFlow server on Linux. If
|
|
177 |
|
178 |
3. Build the pre-built Docker images and start up the server:
|
179 |
|
180 |
-
> Running the following commands automatically downloads the *dev* version RAGFlow Docker image. To download and run a specified Docker version, update `
|
181 |
|
182 |
```bash
|
183 |
$ cd ragflow/docker
|
|
|
177 |
|
178 |
3. Build the pre-built Docker images and start up the server:
|
179 |
|
180 |
+
> Running the following commands automatically downloads the *dev* version RAGFlow Docker image. To download and run a specified Docker version, update `RAGFLOW_IMAGE` in **docker/.env** to the intended version, for example `RAGFLOW_IMAGE=infiniflow/ragflow:v0.12.0`, before running the following commands.
|
181 |
|
182 |
```bash
|
183 |
$ cd ragflow/docker
|
docs/references/faq.md
CHANGED
@@ -407,49 +407,25 @@ You can upgrade RAGFlow to either the dev version or the latest version:
|
|
407 |
|
408 |
To upgrade RAGFlow to the dev version:
|
409 |
|
410 |
-
|
411 |
-
|
412 |
-
cd ragflow
|
413 |
-
git pull
|
414 |
-
```
|
415 |
-
2. If you used `docker compose up -d` to start up RAGFlow server:
|
416 |
-
```bash
|
417 |
-
docker pull infiniflow/ragflow:dev
|
418 |
-
```
|
419 |
-
```bash
|
420 |
-
docker compose up ragflow -d
|
421 |
-
```
|
422 |
-
3. If you used `docker compose -f docker-compose-CN.yml up -d` to start up RAGFlow server:
|
423 |
```bash
|
424 |
-
|
425 |
```
|
|
|
426 |
```bash
|
427 |
-
docker compose -f docker-compose
|
|
|
428 |
```
|
429 |
|
430 |
To upgrade RAGFlow to the latest version:
|
431 |
|
432 |
1. Update **ragflow/docker/.env** as follows:
|
433 |
```bash
|
434 |
-
|
435 |
```
|
436 |
-
2.
|
437 |
```bash
|
438 |
-
|
439 |
-
|
440 |
```
|
441 |
-
|
442 |
-
3. If you used `docker compose up -d` to start up RAGFlow server:
|
443 |
-
```bash
|
444 |
-
docker pull infiniflow/ragflow:latest
|
445 |
-
```
|
446 |
-
```bash
|
447 |
-
docker compose up ragflow -d
|
448 |
-
```
|
449 |
-
4. If you used `docker compose -f docker-compose-CN.yml up -d` to start up RAGFlow server:
|
450 |
-
```bash
|
451 |
-
docker pull swr.cn-north-4.myhuaweicloud.com/infiniflow/ragflow:latest
|
452 |
-
```
|
453 |
-
```bash
|
454 |
-
docker compose -f docker-compose-CN.yml up -d
|
455 |
-
```
|
|
|
407 |
|
408 |
To upgrade RAGFlow to the dev version:
|
409 |
|
410 |
+
Update the RAGFlow image and restart RAGFlow:
|
411 |
+
1. Update **ragflow/docker/.env** as follows:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
412 |
```bash
|
413 |
+
RAGFLOW_IMAGE=infiniflow/ragflow:dev
|
414 |
```
|
415 |
+
2. Update ragflow image and restart ragflow:
|
416 |
```bash
|
417 |
+
docker compose -f docker/docker-compose.yml pull
|
418 |
+
docker compose -f docker/docker-compose.yml up -d
|
419 |
```
|
420 |
|
421 |
To upgrade RAGFlow to the latest version:
|
422 |
|
423 |
1. Update **ragflow/docker/.env** as follows:
|
424 |
```bash
|
425 |
+
RAGFLOW_IMAGE=infiniflow/ragflow:latest
|
426 |
```
|
427 |
+
2. Update the RAGFlow image and restart RAGFlow:
|
428 |
```bash
|
429 |
+
docker compose -f docker/docker-compose.yml pull
|
430 |
+
docker compose -f docker/docker-compose.yml up -d
|
431 |
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
poetry.lock
CHANGED
@@ -6016,6 +6016,16 @@ files = [
|
|
6016 |
[package.extras]
|
6017 |
windows-terminal = ["colorama (>=0.4.6)"]
|
6018 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6019 |
[[package]]
|
6020 |
name = "pyjwt"
|
6021 |
version = "2.8.0"
|
@@ -6262,18 +6272,19 @@ cli = ["click (>=5.0)"]
|
|
6262 |
|
6263 |
[[package]]
|
6264 |
name = "python-pptx"
|
6265 |
-
version = "0.
|
6266 |
-
description = "
|
6267 |
optional = false
|
6268 |
-
python-versions = "
|
6269 |
files = [
|
6270 |
-
{file = "
|
6271 |
-
{file = "python_pptx-0.
|
6272 |
]
|
6273 |
|
6274 |
[package.dependencies]
|
6275 |
lxml = ">=3.1.0"
|
6276 |
Pillow = ">=3.3.2"
|
|
|
6277 |
XlsxWriter = ">=0.5.7"
|
6278 |
|
6279 |
[[package]]
|
@@ -8779,4 +8790,4 @@ files = [
|
|
8779 |
[metadata]
|
8780 |
lock-version = "2.0"
|
8781 |
python-versions = ">=3.12,<3.13"
|
8782 |
-
content-hash = "
|
|
|
6016 |
[package.extras]
|
6017 |
windows-terminal = ["colorama (>=0.4.6)"]
|
6018 |
|
6019 |
+
[[package]]
|
6020 |
+
name = "pyicu"
|
6021 |
+
version = "2.13.1"
|
6022 |
+
description = "Python extension wrapping the ICU C++ API"
|
6023 |
+
optional = false
|
6024 |
+
python-versions = "*"
|
6025 |
+
files = [
|
6026 |
+
{file = "PyICU-2.13.1.tar.gz", hash = "sha256:d4919085eaa07da12bade8ee721e7bbf7ade0151ca0f82946a26c8f4b98cdceb"},
|
6027 |
+
]
|
6028 |
+
|
6029 |
[[package]]
|
6030 |
name = "pyjwt"
|
6031 |
version = "2.8.0"
|
|
|
6272 |
|
6273 |
[[package]]
|
6274 |
name = "python-pptx"
|
6275 |
+
version = "1.0.2"
|
6276 |
+
description = "Create, read, and update PowerPoint 2007+ (.pptx) files."
|
6277 |
optional = false
|
6278 |
+
python-versions = ">=3.8"
|
6279 |
files = [
|
6280 |
+
{file = "python_pptx-1.0.2-py3-none-any.whl", hash = "sha256:160838e0b8565a8b1f67947675886e9fea18aa5e795db7ae531606d68e785cba"},
|
6281 |
+
{file = "python_pptx-1.0.2.tar.gz", hash = "sha256:479a8af0eaf0f0d76b6f00b0887732874ad2e3188230315290cd1f9dd9cc7095"},
|
6282 |
]
|
6283 |
|
6284 |
[package.dependencies]
|
6285 |
lxml = ">=3.1.0"
|
6286 |
Pillow = ">=3.3.2"
|
6287 |
+
typing-extensions = ">=4.9.0"
|
6288 |
XlsxWriter = ">=0.5.7"
|
6289 |
|
6290 |
[[package]]
|
|
|
8790 |
[metadata]
|
8791 |
lock-version = "2.0"
|
8792 |
python-versions = ">=3.12,<3.13"
|
8793 |
+
content-hash = "84aaaf574297e9683b944e09d6c0b2dd42075a2f4b9959fa74852a907c119483"
|
pyproject.toml
CHANGED
@@ -72,7 +72,7 @@ pypdf = "^5.0.0"
|
|
72 |
pytest = "8.2.2"
|
73 |
python-dotenv = "1.0.1"
|
74 |
python-dateutil = "2.8.2"
|
75 |
-
python-pptx = "0.
|
76 |
pywencai = "0.12.2"
|
77 |
qianfan = "0.4.6"
|
78 |
ranx = "0.3.20"
|
@@ -112,6 +112,7 @@ pypdf2 = "^3.0.1"
|
|
112 |
graspologic = "^3.4.1"
|
113 |
pymysql = "^1.1.1"
|
114 |
mini-racer = "^0.12.4"
|
|
|
115 |
|
116 |
|
117 |
[tool.poetry.group.full]
|
|
|
72 |
pytest = "8.2.2"
|
73 |
python-dotenv = "1.0.1"
|
74 |
python-dateutil = "2.8.2"
|
75 |
+
python-pptx = "^1.0.2"
|
76 |
pywencai = "0.12.2"
|
77 |
qianfan = "0.4.6"
|
78 |
ranx = "0.3.20"
|
|
|
112 |
graspologic = "^3.4.1"
|
113 |
pymysql = "^1.1.1"
|
114 |
mini-racer = "^0.12.4"
|
115 |
+
pyicu = "^2.13.1"
|
116 |
|
117 |
|
118 |
[tool.poetry.group.full]
|