[Bug]: Update Python in Docker images

用户使用 RAGFlow 的 latest nightly Docker 镜像启动容器后,在运行时输出中看到 google.api_core 发出的 FutureWarning,提示 Python 版本(3.10.12)将在 2026-10-04 停止支持。该问题在 RAGFlow 官方 Docke

[Bug]: Update Python in Docker images

[Bug]: Update Python in Docker images

快速结论:该报错是 Python 3.10.12 即将失去 Google 官方支持时的 FutureWarning 警告。优先拉取最新 nightly Docker 镜像,并验证容器内 Python 版本是否已升级到 3.12。

问题场景

用户使用 RAGFlow 的 latest nightly Docker 镜像启动容器后,在运行时输出中看到 google.api_core 发出的 FutureWarning,提示 Python 版本(3.10.12)将在 2026-10-04 停止支持。该问题在 RAGFlow 官方 Docker 镜像的环境中出现。

报错原文

/ragflow/.venv/lib/python3.10/site-packages/google/api_core/_python_version_support.py:266: FutureWarning: You are using a Python version (3.10.12) which Google will stop supporting in new releases of google.api_core once it reaches its end of life (2026-10-04). Please upgrade to the latest Python version, or at least Python 3.11, to continue receiving updates for google.api_core past that date.
  warnings.warn(message, FutureWarning)
/ragflow/.venv/lib/python3.10/site-packages/google/api_core/_python_version_support.py:266: FutureWarning: You are using a Python version (3.10.12) which Google will stop supporting in new releases of google.api_core once it reaches its end of life (2026-10-04). Please upgrade to the latest Python version, or at least Python 3.11, to continue receiving updates for google.api_core past that date.
  warnings.warn(message, FutureWarning)

原因分析

RAGFlow 旧版 Docker 镜像基于 Python 3.10.12 构建,而 google.api_core 对即将终止支持的 Python 版本发出警告。RAGFlow 项目方已通过 PR #11846 将 Docker 镜像的基础环境升级为 Ubuntu 24.04,并将目标 Python 版本切换至 3.12,同时更新了依赖管理命令。该更改已合并到主分支,因此新版镜像应该不会出现此警告。

环境排查

  • 确认你使用的 RAGFlow Docker 镜像标签(如 latestnightly
  • 进入容器后执行 python --version 确认当前 Python 版本
  • 检查 /ragflow/.venv/bin/python 的版本链接

解决步骤

  1. 拉取最新 nightly 镜像:由于镜像构建和发布可能存在延迟,请再次尝试拉取最新 nightly 镜像。命令参考:
    docker pull infiniflow/ragflow:nightly
  2. 验证 Python 版本:启动新容器后,使用以下命令检查容器内 Python 版本是否为 3.12:
    docker exec <container_name> python --version
  3. 如果仍使用旧版本:可能是镜像尚未同步到最新代码的构建产物,建议稍等后再次拉取,或检查 GitHub Actions 中的镜像构建状态。

验证方法

确保运行 RAGFlow 时不再显示上述 FutureWarning 信息,并且容器内 python --version 输出为 Python 3.12 或更高版本(而非 3.10.12)。

参考来源

infiniflow/ragflow #11857

GamsGo AI

AI 工具推荐

想把多个 AI 模型放在一个入口?

GamsGo AI 集成 ChatGPT、DeepSeek、Gemini、Claude、Midjourney、Veo 等常用模型,适合写作、绘图、视频和日常 AI 工作流。

了解 GamsGo AI

推广链接:通过此链接购买,我可能获得佣金,不影响你的价格。

celebrityanime
celebrityanime
文章: 10590

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注