Fail to run milvus on Mac with M1 chip

ryan@Ryans-MacBook-Air ~ % docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
1af450a19e66 milvusdb/milvus:v2.0.0-rc2-20210712-a8e5fd2 “/tini – milvus run…” 17 hours ago Exited (132) 17 hours ago milvus-standalone
b15cd36af0cf quay.io/coreos/etcd:latest “etcd -listen-peer-u…” 17 hours ago Up 17 hours (healthy) 2379-2380/tcp milvus-etcd
7b4157065d87 minio/minio:RELEASE.2020-12-03T00-03-10Z “/usr/bin/docker-ent…” 17 hours ago Up 17 hours (healthy) 9000/tcp milvus-minio
ryan@Ryans-MacBook-Air ~ % docker logs 1af450a19e66
qemu: uncaught target signal 4 (Illegal instruction) - core dumped
ryan@Ryans-MacBook-Air ~ %

Can anyone help?

2 Likes

Seems to be an M1 issue trying to run am64 cointainers on the m1 chip. It is recommended that containers be arm64 based, which Milvus is not currently. `qemu: uncaught target signal 11 (Segmentation fault) - core dumped` when running `docker-compose up` on Apple Silicon · Issue #5123 · docker/for-mac · GitHub

Docker for m1 chip is now available. You can follow the instructions here, and try it again.

1 Like

Even with Docker Desktop for Apple Silicon I’m still running into qemu: uncaught target signal 4 (Illegal instruction) - core dumped . I have set --platform linux/amd64 in docker-compose.yml . Any other ideas? If not, when will an arm64 version of Milvus be available?

1 Like

Milvus uses FAISS as engine by default. And FAISS uses SIMD (supported by Intel CPU chips) to speed up vector distance calculation. When try to run SIMD on un-supported CPU chips, you’ll get this error “Illegal instruction”.
We can disable SIMD, thus Milvus should be able to run on Apple machine, but Milvus’s search performance will degrade greatly.

It would be great to have the option to disable SIMD. Better have it running with suboptimal performance than not running at all.

You can disable builtin AVX support by removing -mavx2 and all -mavx512 flags (in the FAISS Makefile) when compiling Milvus 1.1. I don’t have much experience running x86 emulation on M1, but if you’re comfortable compiling from source then this is worth a shot.

1 Like

If guys want to run milvus 2.0 with docker (Apple M1), this PR #12337 may help.

I think it is already available with a nightly test build on master. like: Release milvus-2.0.0-testing-20211201 · milvus-io/milvus (github.com)

4 Likes