querybook icon indicating copy to clipboard operation
querybook copied to clipboard

Unable to run locally on Apple Silicon

Open jbrr opened this issue 4 years ago • 4 comments

The main issue is that the MySQL and Elasticsearch versions used in docker-compose.yml don't have arm64 compatible Docker images. I was able to fix this by changing the MySQL image to mariadb:10.5.4, and Elasticsearch to docker.elastic.co/elasticsearch/elasticsearch:7.8.0. I would just put up a PR, but I don't know nearly enough about this project, nor Elasticsearch or MariaDB to know if there are going to be issues with such large version jumps. This also may just be something to mention in the documentation instead of updating docker-compose, not sure the best way to approach that.

Additionally, and this seems unrelated to the M1 chip, but I'm surprised I didn't see any mentions of it, I had all sorts of issues with snowflake-sqlalchemy dependency. Those issues are pretty well outlined here: https://github.com/snowflakedb/snowflake-connector-python/issues/225. I eventually got around it by forcing some reinstalls and upgrades on the querybook_web container:

pip install --force-reinstall --upgrade azure-storage-blob==2.1.0 urllib3==1.25.10

After that, though, I've got it running on the M1 chip.

jbrr avatar Jul 05 '21 22:07 jbrr

Hey Jeff, I think mariadb 10.5.4 would work but elasticsearch 7.* would not work. Can you check searching with cmd+k works in your dev environment?

Also thanks for letting me know about the snowflake issue, I will keep this issue open until the documentation is updated 👍

czgu avatar Jul 06 '21 20:07 czgu

@czgu you're absolutely right, it doesn't look like that elasticsearch version is working:

GET http://elasticsearch:9200/search_datadocs_v1/datadocs/_search [status:404 request:0.003s]

[2021-07-07 Wed 05:49:20] - /opt/querybook/querybook/server/datasources/search.py - WARNING "Got ElasticSearch exception:

NotFoundError(404, 'index_not_found_exception', 'no such index [search_datadocs_v1]')"

[2021-07-07 Wed 05:49:20] - /opt/querybook/querybook/server/datasources/search.py - DEBUG "No Elasticsearch attempt succeeded"

That's unfortunately the oldest available version that supports arm64

jbrr avatar Jul 07 '21 05:07 jbrr

Any updates on this? I am still running into this issue on an M1 machine.

kainoa21 avatar Apr 28 '22 21:04 kainoa21

Not sure if there's still someone have problem on using querybook on M1 machine. For me, I added platform: linux/x86_64 to mysql in the docker-compose.yml file like:

services:
    mysql:
        platform: linux/x86_64

It works fine. Hope this helps.

ShuchiZhang avatar Aug 22 '22 15:08 ShuchiZhang