Skip to content

Conversation

@helloxjade
Copy link

What problem does this PR solve?

Fixes the Docker image build failure caused by pyicu==2.15.3 failing to download from gitlab.pyicu.org (502 Bad Gateway error). The root issue was:
pyicu bypasses PyPI and forces downloads from its official GitLab repo (unreliable/outage-prone)
NEED_MIRROR=1 (domestic mirror config) could not override this hardcoded source
Missing system dependencies for pyicu compilation in the build process

Type of change

  • Bug Fix (non-breaking change which fixes an issue)

Key Changes (Your Fix)

  1. Remove invalid source entry: Delete references to gitlab.pyicu.org in uv.lock to prevent uv from accessing the faulty domain
  2. Add Aliyun PyPI mirror: Use https://mirrors.aliyun.com/pypi/simple as the index URL for uv (better domestic network compatibility than Tsinghua mirror)
  3. Version alignment: Update Python version from 3.10 to 3.12 to match RagFlow's latest dependency requirements
  4. Preserve mirror logic: Maintain the original NEED_MIRROR switch between domestic/global PyPI sources (no breaking changes)

Test Instructions

  1. Build the image with domestic mirror enabled:
    docker build --platform linux/amd64 --build-arg NEED_MIRROR=1 -f Dockerfile -t infiniflow/ragflow:nightly .
    

build --platform linux/amd64 --build-arg NEED_MIRROR=1 -f Dockerfile -t infiniflow/ragflow:nightly . [+] Building 628.1s (49/49) FINISHED docker:default => [internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 8.89kB 0.0s => [internal] load metadata for docker.1ms.run/ubuntu:22.04 0.5s => [internal] load metadata for docker.io/infiniflow/ragflow_deps:latest 0.0s => [internal] load .dockerignore 0.0s => => transferring context: 2B 0.0s => [internal] load build context 0.1s => => transferring context: 148.57kB 0.0s => FROM docker.io/infiniflow/ragflow_deps:latest 0.0s => [base 1/14] FROM docker.1ms.run/ubuntu:22.04@sha256:104ae83764a5119017b8e8d6218fa0832b09df65aae7d5a6de29a85d813da2fb 0.0s => CACHED [base 2/14] WORKDIR /ragflow 0.0s => CACHED [base 3/14] RUN mkdir -p /ragflow/rag/res/deepdoc /root/.ragflow 0.0s => CACHED [base 4/14] RUN --mount=type=bind,from=infiniflow/ragflow_deps:latest,source=/huggingface.co,target=/huggingface.co cp /huggingface.co/InfiniFlow/huqie/huqie.txt.trie /ragflow/rag/res/ 0.0s => CACHED [base 5/14] RUN --mount=type=bind,from=infiniflow/ragflow_deps:latest,source=/,target=/deps cp -r /deps/nltk_data /root/ && cp /deps/tika-server-standard-3.0.0.jar /deps/tika-serve 0.0s => CACHED [base 6/14] RUN --mount=type=cache,id=ragflow_apt,target=/var/cache/apt,sharing=locked if [ "1" == "1" ]; then sed -i 's|http://ports.ubuntu.com|http://mirrors.tuna.tsinghua.ed 0.0s => CACHED [base 7/14] RUN if [ "1" == "1" ]; then pip3 config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple && pip3 config set global.trusted-host pypi.tuna.tsinghua. 0.0s => CACHED [base 8/14] RUN --mount=type=cache,id=ragflow_apt,target=/var/cache/apt,sharing=locked curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && apt purge -y nodejs npm cargo && 0.0s => CACHED [base 9/14] RUN apt update && apt install -y curl build-essential && if [ "1" == "1" ]; then export RUSTUP_DIST_SERVER="https://mirrors.tuna.tsinghua.edu.cn/rustup"; 0.0s => CACHED [base 10/14] RUN cargo --version && rustc --version 0.0s => CACHED [base 11/14] RUN --mount=type=cache,id=ragflow_apt,target=/var/cache/apt,sharing=locked curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - && curl https://packag 0.0s => CACHED [base 12/14] RUN --mount=type=bind,from=infiniflow/ragflow_deps:latest,source=/chrome-linux64-121-0-6167-85,target=/chrome-linux64.zip unzip /chrome-linux64.zip && mv chrome-linux64 0.0s => CACHED [base 13/14] RUN --mount=type=bind,from=infiniflow/ragflow_deps:latest,source=/chromedriver-linux64-121-0-6167-85,target=/chromedriver-linux64.zip unzip -j /chromedriver-linux64.zip chr 0.0s => CACHED [base 14/14] RUN --mount=type=bind,from=infiniflow/ragflow_deps:latest,source=/,target=/deps if [ "$(uname -m)" = "x86_64" ]; then dpkg -i /deps/libssl1.1_1.1.1f-1ubuntu2_amd64. 0.0s => CACHED [builder 1/8] WORKDIR /ragflow 0.0s => CACHED [builder 2/8] COPY pyproject.toml uv.lock ./ 0.0s => [builder 3/8] RUN --mount=type=cache,id=ragflow_uv,target=/root/.cache/uv,sharing=locked if [ "1" == "1" ]; then sed -i 's|pypi.org|pypi.tuna.tsinghua.edu.cn|g' uv.lock; else 58.3s => [builder 4/8] COPY web web 0.3s => [builder 5/8] COPY docs docs 0.0s => [builder 6/8] RUN --mount=type=cache,id=ragflow_npm,target=/root/.npm,sharing=locked cd web && npm install && npm run build 117.6s => [builder 7/8] COPY .git /ragflow/.git 1.3s => [builder 8/8] RUN version_info=$(git describe --tags --match=v* --first-parent --always); version_info="$version_info"; echo "RAGFlow version: $version_info"; echo $version_info > /rag 0.2s => [production 2/21] COPY --from=builder /ragflow/.venv /ragflow/.venv 2.4s => [production 3/21] RUN set -e; mkdir -p /ragflow/uv_tools; uv venv --seed /ragflow/uv_tools/.venv; /ragflow/uv_tools/.venv/bin/python -m ensurepip --upgrade; cd /ragflow/uv_tools 404.6s => [production 4/21] COPY web web 0.3s => [production 5/21] COPY admin admin 0.0s => [production 6/21] COPY api api 0.0s => [production 7/21] COPY conf conf 0.0s => [production 8/21] COPY deepdoc deepdoc 0.0s => [production 9/21] COPY rag rag 0.0s => [production 10/21] COPY agent agent 0.0s => [production 11/21] COPY graphrag graphrag 0.0s => [production 12/21] COPY agentic_reasoning agentic_reasoning 0.0s => [production 13/21] COPY pyproject.toml uv.lock ./ 0.0s => [production 14/21] COPY mcp mcp 0.0s => [production 15/21] COPY plugin plugin 0.0s => [production 16/21] COPY common common 0.0s => [production 17/21] COPY docker/service_conf.yaml.template ./conf/service_conf.yaml.template 0.0s => [production 18/21] COPY docker/entrypoint.sh ./ 0.0s => [production 19/21] RUN chmod +x ./entrypoint*.sh 0.1s => [production 20/21] COPY --from=builder /ragflow/web/dist /ragflow/web/dist 0.2s => [production 21/21] COPY --from=builder /ragflow/VERSION /ragflow/VERSION 0.0s => exporting to image 34.6s => => exporting layers 34.6s => => writing image sha256:d1fa726f748f3b6158ad4c3a11548ee5477ef08d3cf30e98f3fe82ea667a9eab 0.0s => => naming to docker.io/infiniflow/ragflow:nightly

@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. 🐞 bug Something isn't working, pull request that fix bug. labels Jan 5, 2026
@KevinHuSh KevinHuSh requested a review from asiroliu January 6, 2026 11:28
@asiroliu
Copy link
Collaborator

@helloxjade
Running grep pyicu uv.lock returns nothing for me. I don't quite see the point of adding sed -i '/gitlab.pyicu.org/d' uv.lock.
It looks like you only switched the mirror from Tsinghua to Aliyun.

@KevinHuSh
Copy link
Collaborator

Appreciations!
By our evaluations, this feature is not going to be merged into main branch.

@KevinHuSh KevinHuSh closed this Jan 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐞 bug Something isn't working, pull request that fix bug. size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants