fix: resolve pyicu build failure from gitlab.pyicu.org 502 error #12447
+2
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Key Changes (Your Fix)
gitlab.pyicu.orginuv.lockto prevent uv from accessing the faulty domainhttps://mirrors.aliyun.com/pypi/simpleas the index URL for uv (better domestic network compatibility than Tsinghua mirror)NEED_MIRRORswitch between domestic/global PyPI sources (no breaking changes)Test Instructions
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