[Bug]: Solution to M4 mac arch64 elastic container crashing and $PY rag/svr/task_executor.py $1 issue with main server.
Is there an existing issue for the same bug?
- [x] I have checked the existing issues.
RAGFlow workspace code commit ID
4e2afcd
RAGFlow image version
nightly
Other environment information
M4, macmini pro , 15.3.1 (24D70)
Actual behavior
this is actual solution to solve the problem.
I added below 3 ENV variables to my .env file under docker directory:
_JAVA_OPTIONS=-XX:UseSVE=0 OPENBLAS_CORETYPE=generic NUMBA_DISABLE_JIT=1
This solution solves 2 problems:
- Elastic search container constantly re-boot due to Java crash.. related to MacBook m4 macmini ARch64 incompatibility .
- main ragflow server , not being able to start properly due to executor failing all the time again due to MacBook m4 Arch64 incompatibility .
basically if you get this: illegal $PY rag/svr/task_executor.py $1
Expected behavior
No response
Steps to reproduce
this is a fix.. just add those lines to .env file if you are on macOS m4
_JAVA_OPTIONS=-XX:UseSVE=0
OPENBLAS_CORETYPE=generic
NUMBA_DISABLE_JIT=1
Additional information
No response
Also, you could build an image from source.
git clone https://github.com/infiniflow/ragflow.git
cd ragflow/
pip3 install huggingface_hub nltk
python3 download_deps.py
docker build -f Dockerfile.deps -t infiniflow/ragflow_deps .
docker build -f Dockerfile -t infiniflow/ragflow:nightly .
docker build --build-arg LIGHTEN=1 -f Dockerfile -t infiniflow/ragflow:nightly-slim .
I used the two solutions above, set the environment variables in the env, and pulled the nightly code to rebuild the image, and finally it could run on the M4 chip.
I ended up using this, but also had the issue that elastic search was set to use 8GB memory. However, I had only allotted 6GB for all of Docker. Once I bumped ES down to 4GB (which is still a lot) things started running smoothly