IT评测·应用市场-qidao123.com

标题: Mac M4 安装RAGFlow+ollama本地大模型踩坑经历 [打印本页]

作者: 南飓风    时间: 2025-3-8 02:10
标题: Mac M4 安装RAGFlow+ollama本地大模型踩坑经历
修改 Docker 配置文件添加镜像源地址
为了使 Docker 利用更快捷的镜像仓库服务,可以通过编辑 /etc/docker/daemon.json 文件实现。此文件用于指定一系列可信托的镜像服务器作为署理。
安装ragflow:
安装操作如下(https://github.com/infiniflow/ragflow/issues/5012)
  1. git clone <https://github.com/infiniflow/ragflow.git>
  2. cd ragflow/
  3. pip3 install huggingface_hub nltk
  4. python3 download_deps.py
复制代码
在python3 download_deps.py步遇到huggingface_hub.errors.LocalEntryNotFoundError,由于国内IP无法登录Huggingface导致。办理方法:
  1. pip install -U huggingface_hub hf_transfer -i <https://pypi.tuna.tsinghua.edu.cn/simple>
  2. export HF_ENDPOINT=https://hf-mirror.com
  3. #重新运行python3 download_deps.py即可
复制代码
若docker build 过程中出现
  1. ERROR: failed to solve: ubuntu:22.04: failed to resolve source metadata for docker.io/library/ubuntu:22.04: failed commit on ref "unknown-sha256:…": failed size validation: 7611 != 7283: failed precondition
复制代码
有大概是版本冲突导致,可以利用以下代码清理docker cache
  1. # Ensure You Have the Latest Version of Docker
  2. #Remove Unused Data:
  3. docker system prune -a
  4. docker builder prune
  5. # Force a Manual Pull of the Base Image
  6. docker pull --platform linux/arm64 ubuntu:22.04
  7. docker pull --platform linux/amd64 ubuntu:22.04
复制代码
  1. docker build -f Dockerfile.deps -t infiniflow/ragflow_deps .
  2. docker build -f Dockerfile -t infiniflow/ragflow:nightly .
  3. # Edit .env before run this
  4. docker compose -f docker/docker-compose-macos.yml up -d
复制代码
出现es01运行不起来反复开启关闭,修改 service.environment in docker/docker-compose-base.yml :
  1. environment:
  2. - node.name=es01
  3. - ELASTIC_PASSWORD=${ELASTIC_PASSWORD}
  4. - bootstrap.memory_lock=false
  5. - discovery.type=single-node
  6. - xpack.security.enabled=true
  7. - xpack.security.http.ssl.enabled=false
  8. - xpack.security.transport.ssl.enabled=false
  9. - cluster.routing.allocation.disk.watermark.low=5gb
  10. - cluster.routing.allocation.disk.watermark.high=3gb
  11. - cluster.routing.allocation.disk.watermark.flood_stage=2gb
  12. - TZ=${TIMEZONE}
  13. - "ES_JAVA_OPTS=-XX:UseSVE=0"
  14. - "CLI_JAVA_OPTS=-XX:UseSVE=0"
复制代码
链接RAGFLOW与Ollama


   

免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。




欢迎光临 IT评测·应用市场-qidao123.com (https://dis.qidao123.com/) Powered by Discuz! X3.4