Closed yangboz closed 4 hours ago
RAGFlow is supposed to support Aarch64 machine. We only built and uploaded x86 docker image. For ARM machine such as MAC m1, you need to use https://github.com/infiniflow/ragflow/blob/main/Dockerfile.arm to compile RAGFlow docker image.
The RAGFlow image still produces an error even with requirments_arm.txt and Dockerfile.arm being used on Apple M2 chip
Agree. When you use this in order to build arm image:
docker build -t infiniflow/ragflow:dev -f Dockerfile.arm .
you always get similiar errors:
The conflict is caused by:
257.1 The user requested pycryptodome>=3.20.0
257.1 minio 7.2.4 depends on pycryptodome
257.1 volcengine 1.0.141 depends on pycryptodome==3.9.9
and since changing requirements.txt causes Docker not using cache it takes almost forever to fix it. I gave up.
Could you fix arm reqs, please?
Remove version information
Remove version information
For which package(s)? Every time I change requirements Docker not using cache it takes almost forever to fix it. I gave up.
My best practice is that ignore the version conflicts and build the image anyway. Then, start the container go into it, pip install all the 'module not found can't resolve'. At last, docker commit.
删除版本信息
适用于哪些套餐?每次我更改要求 Docker 不使用缓存时,几乎需要很长时间才能修复它。我放弃了。
会出现两次版本冲突,运行的时候也会出现两次缺少包,建议忽略版本冲突构建,这是我修改后的 accelerate==0.27.2 aiohttp==3.9.3 aiosignal==1.3.1 annotated-types==0.6.0 anyio==4.3.0 argon2-cffi==23.1.0 argon2-cffi-bindings==21.2.0
attrs==23.2.0 blinker==1.7.0 cachelib==0.12.0 cachetools==5.3.3 certifi==2024.2.2 cffi==1.16.0 charset-normalizer==3.3.2 click==8.1.7 coloredlogs==15.0.1 cryptography==42.0.5 dashscope==1.14.1 datasets==2.17.1 datrie==0.8.2 demjson3==3.0.6 dill==0.3.8 distro==1.9.0 elastic-transport==8.12.0 elasticsearch==8.12.1 elasticsearch-dsl==8.12.0 et-xmlfile==1.1.0 filelock==3.13.1 fastembed==0.2.6 FlagEmbedding==1.2.5 Flask==3.0.2 Flask-Cors==4.0.0 Flask-Login==0.6.3 Flask-Session==0.6.0 flatbuffers==23.5.26 frozenlist==1.4.1 fsspec==2023.10.0 h11==0.14.0 hanziconv==0.3.2 httpcore==1.0.4 httpx==0.27.0 huggingface-hub==0.20.3 humanfriendly==10.0 idna==3.6 install==1.3.5 itsdangerous==2.1.2 Jinja2==3.1.3 joblib==1.3.2 lxml==5.1.0 MarkupSafe==2.1.5 minio==7.2.4 mpmath==1.3.0 multidict==6.0.5 multiprocess==0.70.16 networkx==3.2.1 nltk==3.8.1 numpy==1.26.4
ollama==0.1.9
openai==1.12.0 opencv-python==4.9.0.80 openpyxl==3.1.2 packaging==23.2 pandas==2.2.1 pdfminer.six==20221105 pdfplumber==0.10.4 peewee==3.17.1 pillow==10.2.0 protobuf==4.25.3 psutil==5.9.8 pyarrow==15.0.0 pyarrow-hotfix==0.6 pyclipper==1.3.0.post5 pycparser==2.21 pycryptodome pycryptodome-test-vectors==1.0.14 pycryptodomex==3.20.0 pydantic==2.6.2 pydantic_core==2.16.3 PyJWT==2.8.0 PyMySQL==1.1.0 PyPDF2==3.0.1 pypdfium2==4.27.0 python-dateutil==2.8.2 python-docx==1.1.0 python-dotenv==1.0.1 python-pptx==0.6.23 pytz PyYAML==6.0.1 redis==5.0.3 regex==2023.12.25 requests==2.31.0 ruamel.yaml==0.18.6 ruamel.yaml.clib==0.2.8 safetensors==0.4.2 scikit-learn==1.4.1.post1 scipy==1.12.0 sentence-transformers==2.4.0 shapely==2.0.3 six==1.16.0 sniffio==1.3.1 StrEnum==0.4.15 sympy==1.12 threadpoolctl==3.3.0 tika==2.6.0 tiktoken==0.6.0 tokenizers==0.15.2 torch==2.2.1 tqdm==4.66.2 transformers==4.38.1
typing_extensions==4.10.0 tzdata==2024.1 urllib3==2.2.1 Werkzeug==3.0.1 xgboost==2.0.3 XlsxWriter==3.2.0 xpinyin==0.7.6 xxhash==3.4.1 yarl==1.9.4 zhipuai==2.0.1 BCEmbedding loguru==0.7.2 umap-learn fasttext==0.9.2 volcengine==1.0.141 opencv-python-headless==4.9.0.80 readability-lxml==0.8.1 html_text==0.6.2 cn2an==0.5.22 roman-numbers==1.0.2 word2number==1.1
I have updated the requirements_arm.txt
and Dockerfile.arm
. Now we can successfully build the Docker image for ARM.
@aopstudio thanks! That worked, I was able to build on Mac M1 MAX:
[+] Building 1250.0s (11/20) docker:desktop-linux
[+] Building 1257.5s (21/21) FINISHED docker:desktop-linux
=> [internal] load build definition from Dockerfile.arm 0.0s
=> => transferring dockerfile: 906B 0.0s
=> [internal] load metadata for docker.io/library/python:3.11 0.6s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [ 1/16] FROM docker.io/library/python:3.11@sha256:01b1035a2912ade481cf6db2381d 0.0s
=> [internal] load build context 0.0s
=> => transferring context: 41.70kB 0.0s
=> CACHED [ 2/16] WORKDIR /ragflow 0.0s
=> CACHED [ 3/16] COPY requirements_arm.txt /ragflow/requirements.txt 0.0s
=> [ 4/16] RUN pip install -i https://mirrors.aliyun.com/pypi/simple/ --default-timeout=1000 -r requirements.txt &&python -c "import nltk;nltk.download('punkt');nl 972.7s
=> [ 5/16] RUN apt-get update && apt-get install -y curl gnupg && rm -rf /var/lib/apt/lists/* 6.9s
=> [ 6/16] RUN curl -sL https://deb.nodesource.com/setup_20.x | bash - && apt-get install -y --fix-missing nodejs nginx ffmpeg libsm6 libxext6 libgl1 128.7s
=> [ 7/16] ADD ./web ./web 0.1s
=> [ 8/16] RUN cd ./web && npm i --force && npm run build 143.7s
=> [ 9/16] ADD ./api ./api 0.0s
=> [10/16] ADD ./conf ./conf 0.0s
=> [11/16] ADD ./deepdoc ./deepdoc 0.0s
=> [12/16] ADD ./rag ./rag 0.0s
=> [13/16] ADD ./graph ./graph 0.0s
=> [14/16] ADD docker/entrypoint.sh ./entrypoint.sh 0.0s
=> [15/16] ADD docker/.env ./ 0.0s
=> [16/16] RUN chmod +x ./entrypoint.sh 0.1s
=> exporting to image 4.7s
=> => exporting layers 4.7s
=> => writing image sha256:a330d9ed0984 0.0s
=> => naming to docker.io/infiniflow/ragflow:dev
But in the dashboard I get sometimes:
and
And on completion I get some sentences cut every time. I am using llama3:
Everythin up and running, no error logs in other containers:
Thanks for the support!
@nikitashekhov
no such key
error. IndexError...
, I have never seen this before. Could you tell us when you got this error? Maybe you can check the logs to find out the reason.Max Tokens
in Chat Configuration-Model setting
@aopstudio thanks! That worked, I was able to build on Mac M1 MAX:
[+] Building 1250.0s (11/20) docker:desktop-linux [+] Building 1257.5s (21/21) FINISHED docker:desktop-linux => [internal] load build definition from Dockerfile.arm 0.0s => => transferring dockerfile: 906B 0.0s => [internal] load metadata for docker.io/library/python:3.11 0.6s => [internal] load .dockerignore 0.0s => => transferring context: 2B 0.0s => [ 1/16] FROM docker.io/library/python:3.11@sha256:01b1035a2912ade481cf6db2381d 0.0s => [internal] load build context 0.0s => => transferring context: 41.70kB 0.0s => CACHED [ 2/16] WORKDIR /ragflow 0.0s => CACHED [ 3/16] COPY requirements_arm.txt /ragflow/requirements.txt 0.0s => [ 4/16] RUN pip install -i https://mirrors.aliyun.com/pypi/simple/ --default-timeout=1000 -r requirements.txt &&python -c "import nltk;nltk.download('punkt');nl 972.7s => [ 5/16] RUN apt-get update && apt-get install -y curl gnupg && rm -rf /var/lib/apt/lists/* 6.9s => [ 6/16] RUN curl -sL https://deb.nodesource.com/setup_20.x | bash - && apt-get install -y --fix-missing nodejs nginx ffmpeg libsm6 libxext6 libgl1 128.7s => [ 7/16] ADD ./web ./web 0.1s => [ 8/16] RUN cd ./web && npm i --force && npm run build 143.7s => [ 9/16] ADD ./api ./api 0.0s => [10/16] ADD ./conf ./conf 0.0s => [11/16] ADD ./deepdoc ./deepdoc 0.0s => [12/16] ADD ./rag ./rag 0.0s => [13/16] ADD ./graph ./graph 0.0s => [14/16] ADD docker/entrypoint.sh ./entrypoint.sh 0.0s => [15/16] ADD docker/.env ./ 0.0s => [16/16] RUN chmod +x ./entrypoint.sh 0.1s => exporting to image 4.7s => => exporting layers 4.7s => => writing image sha256:a330d9ed0984 0.0s => => naming to docker.io/infiniflow/ragflow:dev
But in the dashboard I get sometimes:
and
And on completion I get some sentences cut every time. I am using llama3:
Everythin up and running, no error logs in other containers:
Thanks for the support! follow previous step it works on M 1 too.
Describe your problem
Container ragflow-es-01 [+] Running 6/6 Healthy10.8s ✔ Container ragflow-mysql Healthy10.8s ✔ Container ragflow-redis Running0.0s s ✔ Container ragflow-es-01 Healthy10.8s ✔ Container ragflow-minio Running0.0s ✔ Container ragflow-server Started11.0s ! ragflow The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested 0.0s
any idea ? thanks a lot.