Exact icon indicating copy to clipboard operation
Exact copied to clipboard

Improvments for Apple Silicon (M1) Support in Setup Documentation

Open rafoolin opened this issue 11 months ago • 0 comments

Hi, I recently set up Exact locally on my Mac with Apple Silicon (M1) and encountered several issues during the installation process. It took some time to resolve them, so I wanted to share my experience to help improve the installation process or documentation.

After cloning the code and following the documentation, I ran my docker app and then ran the following command:

docker-compose -f docker-compose.yml up -d --build

I encountered the following error and similar ones:

ERROR: Could not find a version that satisfies the requirement slideio==2.7.0 (from versions: none)
#12 14.84 ERROR: No matching distribution found for slideio==2.7.0
------
executor failed running [/bin/sh -c pip3 install -r requirements.txt]: exit code: 1
ERROR: Service 'web' failed to build : Build failed

Then I had to run this command to check my system architecture:

uname -m

For my case it was arm64, as my Mac is using Apple Silicon. Then I had to change the docker-compose.yml as follow:

services:
  web:
    platform: linux/amd64

In Dockerfile, modified the base image and added the following:

FROM --platform=linux/amd64 python:3.10

After these changes, I was able to successfully build and run Exact. After fixing the Docker build, the application started running at:

http://0.0.0.0:8000/

However, when opening the link, I encountered the following Django error: Image

The DJANGO_ALLOWED_HOSTS environment variable needed explicitly adding 0.0.0.0. I modified env.dev and added:

DJANGO_ALLOWED_HOSTS=localhost 127.0.0.1 [::1] 0.0.0.0

After making these changes, I rebuilt the Docker container again and then Exact was running successfully on my Mac.

rafoolin avatar Feb 11 '25 00:02 rafoolin