From 543d164e9bcd60e7e462cef7a1b03237e2454242 Mon Sep 17 00:00:00 2001 From: Liu An Date: Wed, 25 Mar 2026 17:14:48 +0800 Subject: [PATCH] Fix: add build-essential for Python C extension packages (#13772) ### What problem does this PR solve? The removal of cargo in commit f59d96f87 also removed build-essential which was needed to compile C extension packages like datrie. Use aliyun mirror for coverage pip install ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --- .github/workflows/tests.yml | 2 +- Dockerfile | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c7315e5aa1..ebf62ee7d3 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -220,7 +220,7 @@ jobs: echo "HOST_ADDRESS=http://host.docker.internal:${SVR_HTTP_PORT}" >> ${GITHUB_ENV} # Patch entrypoint.sh for coverage - sed -i '/"\$PY" api\/ragflow_server.py \${INIT_SUPERUSER_ARGS} &/c\ echo "Ensuring coverage is installed..."\n "$PY" -m pip install coverage\n export COVERAGE_FILE=/ragflow/logs/.coverage\n echo "Starting ragflow_server with coverage..."\n "$PY" -m coverage run --source=./api/apps --omit="*/tests/*,*/migrations/*" -a api/ragflow_server.py ${INIT_SUPERUSER_ARGS} &' ./entrypoint.sh + sed -i '/"\$PY" api\/ragflow_server.py \${INIT_SUPERUSER_ARGS} &/c\ echo "Ensuring coverage is installed..."\n "$PY" -m pip install coverage -i https://mirrors.aliyun.com/pypi/simple\n export COVERAGE_FILE=/ragflow/logs/.coverage\n echo "Starting ragflow_server with coverage..."\n "$PY" -m coverage run --source=./api/apps --omit="*/tests/*,*/migrations/*" -a api/ragflow_server.py ${INIT_SUPERUSER_ARGS} &' ./entrypoint.sh sudo docker compose -f docker-compose.yml -p ${GITHUB_RUN_ID} up -d cd .. diff --git a/Dockerfile b/Dockerfile index 35fd3249e4..f859084814 100644 --- a/Dockerfile +++ b/Dockerfile @@ -42,6 +42,7 @@ RUN --mount=type=cache,id=ragflow_apt,target=/var/cache/apt,sharing=locked \ echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache && \ chmod 1777 /tmp && \ apt update && \ + apt install -y build-essential && \ apt install -y libglib2.0-0 libglx-mesa0 libgl1 && \ apt install -y pkg-config libicu-dev libgdiplus && \ apt install -y default-jdk && \