infiniflow / ragflow

RAGFlow is an open-source RAG (Retrieval-Augmented Generation) engine based on deep document understanding.
https://ragflow.io
Apache License 2.0
21.68k stars 2.12k forks source link

[Question]: Mac computers: Docker-compose is unable to execute sudo sysctl -w vm.max_map_count=262144. #420

Closed erichan2046 closed 1 month ago

erichan2046 commented 6 months ago

Describe your problem

Hello. I am using Docker Desktop on a Mac system and I'm unable to configure using this command. sudo sysctl -w vm.max_map_count=262144. It results in a failure to start Ragflow. Could you please suggest any solutions?

By the way, I am using a Mac with an ARM architecture, and I cannot install docker-machine. Additionally, I am unable to run screen ~/Library/Containers/com.docker.docker/Data/vms/0/tty. Is there a solution you could suggest?

jaskirat-1998 commented 6 months ago

does the ragflow-es-01 container fail for you when you try to run without setting this parameter? I think I am facing the same issue. I used sysctl -a command to check all the system parameters, the vm.max_map_count parameter is not present in the available system parameters on my macOS system.

jaskirat-1998 commented 6 months ago

does the ragflow-es-01 container fail for you when you try to run without setting this parameter? I think I am facing the same issue. I used sysctl -a command to check all the system parameters, the vm.max_map_count parameter is not present in the available system parameters on my macOS system.

In short I cannot set this parameter as it does not exist on my Mac M2 OS

ooooo-create commented 6 months ago

may be it's helpful.https://github.com/infiniflow/ragflow/blob/main/docs%2Fmax_map_count.md

1of13 commented 6 months ago

Macs running macOS do not have the vm.max_map_count parameter because it is specific to the Linux kernel. The developers added a "Dockerfile.scratch" script to help with installation on Macs with Apple silicone. However, that is not currently working either. It is too bad! I was looking forward to using Ragflow.

FellowTraveler commented 3 months ago

Having trouble running ragflow on M3 Silicon Mac or even building the docker: docker build --no-cache -t infiniflow/ragflow:dev -f Dockerfile.arm .

Output:

Dockerfile.arm:7
--------------------
   6 |     COPY requirements_arm.txt /ragflow/requirements.txt
   7 | >>> RUN pip install -i https://mirrors.aliyun.com/pypi/simple/ --default-timeout=1000 -r requirements.txt &&\
   8 | >>> python -c "import nltk;nltk.download('punkt');nltk.download('wordnet')"
   9 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c pip install -i https://mirrors.aliyun.com/pypi/simple/ --default-timeout=1000 -r requirements.txt &&python -c \"import nltk;nltk.download('punkt');nltk.download('wordnet')\"" did not complete successfully: exit code: 1

View build details: docker-desktop://dashboard/build/desktop-linux/desktop-linux/fvay1k2wtt4fzbb2yijrj0r2t
learnerLj commented 3 months ago

在 M3 Silicon Mac 上运行 ragflow 甚至构建 docker 时遇到问题: docker build --no-cache -t infiniflow/ragflow:dev -f Dockerfile.arm .

输出:

Dockerfile.arm:7
--------------------
   6 |     COPY requirements_arm.txt /ragflow/requirements.txt
   7 | >>> RUN pip install -i https://mirrors.aliyun.com/pypi/simple/ --default-timeout=1000 -r requirements.txt &&\
   8 | >>> python -c "import nltk;nltk.download('punkt');nltk.download('wordnet')"
   9 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c pip install -i https://mirrors.aliyun.com/pypi/simple/ --default-timeout=1000 -r requirements.txt &&python -c \"import nltk;nltk.download('punkt');nltk.download('wordnet')\"" did not complete successfully: exit code: 1

View build details: docker-desktop://dashboard/build/desktop-linux/desktop-linux/fvay1k2wtt4fzbb2yijrj0r2t

Same problem

dividor commented 2 months ago

This is being looked at under this issue, where there is a proposed fix ...

https://github.com/infiniflow/ragflow/issues/1919

yuzhichang commented 1 month ago

@FellowTraveler @learnerLj We've published multi-arch image ragflow:dev-slim. Here's how we do it: https://github.com/infiniflow/ragflow/blob/main/docs/guides/develop/build_docker_image.md

yuzhichang commented 1 month ago

Issue fixed in PR https://github.com/infiniflow/ragflow/pull/2041