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

[Feature Request]: Support for Apple Silicon Mac #253

Closed vega113 closed 1 month ago

vega113 commented 6 months ago

Is there an existing issue for the same feature request?

Is your feature request related to a problem?

Hi.
It looks like the docker image and instructions are for Linux. I tried to run the docker compose on my M2 Mac, but I do get errors related to MySQL.

! mysql The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
 runtime: failed to create new OS thread (have 2 already; errno=22)


### Describe the feature you'd like

Apple Silicone support and clear instructions how to install in Mac

### Describe implementation you've considered

I tried to add     `platform: linux/amd64` to MySQL image deofinition in docker compose, but this didn't help.

### Documentation, adoption, use case

_No response_

### Additional information

_No response_
litetoooooom commented 6 months ago

M

franztao commented 6 months ago

M

hxf829 commented 6 months ago

modify docker-compose-base.yml image mysql: image: mysql/mysql-server:latest

vega113 commented 6 months ago

@hxf829 Thanks. That helped. However I get now some issue with starting MySQL. Missing permission.


ragflow-mysql   | 2024-04-10T08:28:05.436873Z 0 [Warning] [MY-011068] [Server] The syntax '--skip-host-cache' is deprecated and will be removed in a future release. Please use SET GLOBAL host_cache_size=0 instead.
ragflow-mysql   | 2024-04-10T08:28:05.442115Z 0 [Warning] [MY-010918] [Server] 'default_authentication_plugin' is deprecated and will be removed in a future release. Please use authentication_policy instead.
ragflow-mysql   | 2024-04-10T08:28:05.442322Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.32) starting as process 1
ragflow-mysql   | mysqld: 
ragflow-mysql   | File './binlog.index' not found (OS errno 13 - Permission denied)
ragflow-mysql   | 
ragflow-mysql   | 
ragflow-mysql   | 2024-04-10T08:28:05.455909Z 0 [ERROR] [MY-010119] [Server] Aborting
ragflow-mysql   | 2024-04-10T08:28:05.457529Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.32)  MySQL Community Server - GPL.
ragflow-mysql exited with code 1
ragflow-mysql   | [Entrypoint] Starting MySQL 8.0.32-1.2.11-server
ragflow-mysql   | 2024-04-10T08:28:06.548380Z 0 [Warning] [MY-011068] [Server] The syntax '--skip-host-cache' is deprecated and will be removed in a future release. Please use SET GLOBAL host_cache_size=0 instead.
ragflow-mysql   | 2024-04-10T08:28:06.550551Z 0 [Warning] [MY-010918] [Server] 'default_authentication_plugin' is deprecated and will be removed in a future release. Please use authentication_policy instead.
ragflow-mysql   | 2024-04-10T08:28:06.550634Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.32) starting as process 1
ragflow-mysql   | mysqld: File './binlog.index' not found (OS errno 13 - Permission denied)
ragflow-mysql   | 2024-04-10T08:28:06.562618Z 0 [ERROR] [MY-010119] [Server] Aborting
ragflow-mysql   | 2024-04-10T08:28:06.567073Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.32)  MySQL Community Server - GPL.
ragflow-mysql exited with code 1
ragflow-mysql   | [Entrypoint] Starting MySQL 8.0.32-1.2.11-server
ragflow-es-01   | 
ragflow-es-01   | 
ragflow-es-01   | ERROR: Elasticsearch exited unexpectedly, with exit code 137
ragflow-mysql   | 2024-04-10T08:28:08.193320Z 0 [Warning] [MY-011068] [Server] The syntax '--skip-host-cache' is deprecated and will be removed in a future release. Please use SET GLOBAL host_cache_size=0 instead.
ragflow-mysql   | 2024-04-10T08:28:08.199096Z 0 [Warning] [MY-010918] [Server] 'default_authentication_plugin' is deprecated and will be removed in a future release. Please use authentication_policy instead.
ragflow-mysql   | 2024-04-10T08:28:08.199287Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.32) starting as process 1
ragflow-mysql   | mysqld: File './binlog.index' not found (OS errno 13 - Permission denied)
ragflow-mysql   | 2024-04-10T08:28:08.215373Z 0 [ERROR] [MY-010119] [Server] Aborting
ragflow-mysql   | 2024-04-10T08:28:08.216843Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.32)  MySQL Community Server - GPL.
dependency failed to start: container ragflow-es-01 is unhealthy```

I use Colima as docker container, maybe it is related
KevinHuSh commented 6 months ago

Have a look at #329

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
joeke80215 commented 2 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

change install==1.3.5 to pip-install==1.3.5 and tabulate-0.9.0 to tabulate==0.9.0 on requirements_arm.txt

houchenll commented 2 months ago

modify docker-compose-base.yml image mysql: image: mysql/mysql-server:latest

works for me, Apple M2 Pro

yuzhichang commented 1 month ago

Latest main has changed mysql from 5.7 to 8.0. I've verify it work on linux/arm64.