Skip to content

Conversation

@samqin123
Copy link

No description provided.

@samqin123
Copy link
Author

  1. 模型下载后,其实还是默认要访问hf,调用all-MiniLM-L6-v2,否则就会报错。最好还是本地优先模型,毕竟已经下载了。所以修改了一下。2. 端口配置参数加入.env.example了,8000端口很容易冲突,代码修改不符合一般常识。

@samqin123
Copy link
Author

代码修改总结 :

  • 在 start.sh 脚本中添加了自动激活Python 3.10环境的功能,包括检查conda是否存在、初始化conda并激活py310环境
  • 在 start.sh 中添加了 export TOKENIZERS_PARALLELISM=false 以消除Hugging Face tokenizers的并行处理警告
  • 优化了本地模型调用,通过 temp_model_download.sh 脚本设置HF_ENDPOINT镜像站点提高下载速度和稳定性
  • 项目现在能在不同Python基础版本的环境中自动适配到Python 3.10
  • 添加了 test_offline_model_loading.py 测试脚本验证离线模型加载功能

Copy link
Author

@samqin123 samqin123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

请忽略,这是py312环境下部署导致错误,这个降级没必要采纳。

@IamCVer
Copy link
Contributor

IamCVer commented Sep 19, 2025

借本次PR表述一些我昨天在Windows10系统使用docker部署项目时,遇到的一些问题:

1.在 Windows 环境下构建 Linux Docker 镜像时会遇到的问题

问题:查看docker logs 显示 sh: 1: ./start.sh: not found

根本原因在于 Windows 和 Linux 系统使用了不同的“换行符”(Line Endings)。
Windows 换行符 (CRLF):当您在 Windows 系统上编辑和保存文本文件(包括 .sh 脚本)时,每一行的结尾都是由一个“回车符”(Carriage Return, \r)和一个“换行符”(Line Feed, \n)组成的,即 \r\n。
Linux 换行符 (LF):Linux 系统只使用一个“换行符”(\n)来表示一行的结束。
当将一个在 Windows 上创建的 start.sh 文件复制到 Linux 容器中时。Linux 的 sh 解释器在读取这个脚本时,会把每一行末尾的那个看不见的 \r 字符也当作内容的一部分。
所以,当 Docker 容器执行启动命令 ["./start.sh"] 时,Linux 的 sh 解释器实际上是想去执行一个名为 start.sh\r 的文件。因为文件名中多了一个 \r 字符,而这样一个文件在容器里是不存在的,所以系统就报了 not found 的错误。

解决方案:
在Dockerfile 中,找到下面这行:

RUN chmod +x start.sh

将其替换为下面的新指令,我们将在这行命令中加入 sed 指令,它会在设置执行权限之前,先修复文件的换行符。

RUN sed -i 's/\r$//' start.sh && chmod +x start.sh

2.8000端口冲突问题,只需要换个端口启动即可
docker run -d -p 8081:8000 --name youtu-test-container-fixed youtu_graphrag:v1

@samqin123
Copy link
Author

修复了上传文件,readme文档中增加了1,如何使用本地模型,2. schema文件的意义和构建指引(这个可能请作者修改标准化),以及其它改善。 对于llm模型,作者能否增加其它可选模型,以及llm的api能力?另外也请务必考虑国内用户的便捷性。

@siyuan-youtu
Copy link
Contributor

Thank you for taking the time to read the code and for your contribution. We noticed that this PR includes a number of unrelated files. We’ve also observed a similar issue in other PR https://github.com/TencentCloudADP/youtu-graphrag/pull/55/files. Would you be able to review the changes again and resubmit a cleaned-up version?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants