Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker image does not build on Apple Silicon #221

Open
mfitz opened this issue Jan 11, 2024 · 1 comment
Open

Docker image does not build on Apple Silicon #221

mfitz opened this issue Jan 11, 2024 · 1 comment
Labels
bug Something isn't working has workaround This is a low priority issue as there is a known workaround to it

Comments

@mfitz
Copy link
Contributor

mfitz commented Jan 11, 2024

Although AWS CodeBuild builds our GeNet Docker image as normal in our CD pipeline, @KasiaKoz and I are both unable to build the Docker image on our local M1/M2 laptops. The failure looks like this:

docker build -t local-genet .

[+] Building 18.4s (7/8)
 => [internal] load build definition from Dockerfile                                                                                                                                     0.0s
 => => transferring dockerfile: 465B                                                                                                                                                     0.0s
 => [internal] load .dockerignore                                                                                                                                                        0.0s
 => => transferring context: 71B                                                                                                                                                         0.0s
 => [internal] load metadata for docker.io/mambaorg/micromamba:1.5.3-bullseye-slim                                                                                                       2.1s
 => [internal] load build context                                                                                                                                                        0.9s
 => => transferring context: 54.70MB                                                                                                                                                     0.9s
 => [1/4] FROM docker.io/mambaorg/micromamba:1.5.3-bullseye-slim@sha256:11b2d9547654b8658b640dcee8cf0b568aed0b3bef41421c5c7b2584ee6fb074                                                 4.3s
 => => resolve docker.io/mambaorg/micromamba:1.5.3-bullseye-slim@sha256:11b2d9547654b8658b640dcee8cf0b568aed0b3bef41421c5c7b2584ee6fb074                                                 0.0s
 => => sha256:fd5745bb03f9eb2c63daeba9640390ff8daca886a577907c64bdea2e2a706bdb 2.56kB / 2.56kB                                                                                           0.0s
 => => sha256:c8ae20330f21b702c571a04574b2f9ce9ef2ddb2f3bf1a81c1a7e0486d648985 6.30kB / 6.30kB                                                                                           0.0s
 => => sha256:ca426296fe928600d0b4b844aee43e2b70a05c6f4032de5f65dcc49f5cedfd82 30.06MB / 30.06MB                                                                                         1.6s
 => => sha256:61662ceafcee50e989e821b41998a0d5986684e010ee14cdbb3f5d59a6051b0e 6.86MB / 6.86MB                                                                                           1.3s
 => => sha256:11b2d9547654b8658b640dcee8cf0b568aed0b3bef41421c5c7b2584ee6fb074 2.36kB / 2.36kB                                                                                           0.0s
 => => sha256:c038bd8e28c9aa023d5de2bc3e76a41ebe044dbfa06748360cdb568d9d61d80d 115.22kB / 115.22kB                                                                                       0.6s
 => => sha256:4f4fb700ef54461cfa02571ae0db9a0dc1e0cdb5577484a6d75e68dc38e8acc1 32B / 32B                                                                                                 0.7s
 => => sha256:3e0f945f255be245b386c3ef618c26090ec26bdc4f0b2c2c2777d50cf1d9be38 520B / 520B                                                                                               1.6s
 => => sha256:32e5bfc8ef05cbd4f9506b6870eda5b45c0d7b8a6e2684432fd000815e446f11 284B / 284B                                                                                               1.8s
 => => sha256:2bf0e975df35f3925bf0f59edd44c66e390f249565fd09e90f9b67f09b8d1f72 22.66kB / 22.66kB                                                                                         2.0s
 => => sha256:267cd75647e257b9098a0fe56619a55c64b8a8f54a69883d4d51ddb75b370c0d 213B / 213B                                                                                               3.5s
 => => sha256:92f5d9afa28e24b33a4285ca22889de56a12fe370a93b4767103daf839122a98 683B / 683B                                                                                               2.4s
 => => extracting sha256:ca426296fe928600d0b4b844aee43e2b70a05c6f4032de5f65dcc49f5cedfd82                                                                                                1.6s
 => => sha256:60042355fb6f27c1edd82696815387955831be3352f2eb3102c77e706970079b 644B / 644B                                                                                               2.3s
 => => sha256:04abe5668e6835ae34481b3905e84c28b65fd7c1930d491302ba3520e57f94f2 344B / 344B                                                                                               2.6s
 => => extracting sha256:c038bd8e28c9aa023d5de2bc3e76a41ebe044dbfa06748360cdb568d9d61d80d                                                                                                0.0s
 => => extracting sha256:61662ceafcee50e989e821b41998a0d5986684e010ee14cdbb3f5d59a6051b0e                                                                                                0.1s
 => => extracting sha256:4f4fb700ef54461cfa02571ae0db9a0dc1e0cdb5577484a6d75e68dc38e8acc1                                                                                                0.0s
 => => extracting sha256:3e0f945f255be245b386c3ef618c26090ec26bdc4f0b2c2c2777d50cf1d9be38                                                                                                0.0s
 => => extracting sha256:32e5bfc8ef05cbd4f9506b6870eda5b45c0d7b8a6e2684432fd000815e446f11                                                                                                0.0s
 => => extracting sha256:2bf0e975df35f3925bf0f59edd44c66e390f249565fd09e90f9b67f09b8d1f72                                                                                                0.0s
 => => extracting sha256:267cd75647e257b9098a0fe56619a55c64b8a8f54a69883d4d51ddb75b370c0d                                                                                                0.0s
 => => extracting sha256:92f5d9afa28e24b33a4285ca22889de56a12fe370a93b4767103daf839122a98                                                                                                0.0s
 => => extracting sha256:60042355fb6f27c1edd82696815387955831be3352f2eb3102c77e706970079b                                                                                                0.0s
 => => extracting sha256:04abe5668e6835ae34481b3905e84c28b65fd7c1930d491302ba3520e57f94f2                                                                                                0.0s
 => [2/4] COPY --chown=mambauser:mambauser . ./src                                                                                                                                       1.0s
 => ERROR [3/4] RUN micromamba install -y -n base -c conda-forge -c city-modelling-lab python=3.11 "proj>=9.3" pip coin-or-cbc --file src/requirements/base.txt &&     micromamba clea  10.8s
------
 > [3/4] RUN micromamba install -y -n base -c conda-forge -c city-modelling-lab python=3.11 "proj>=9.3" pip coin-or-cbc --file src/requirements/base.txt &&     micromamba clean --all --yes:
#6 10.67 error    libmamba Could not solve for environment specs
#6 10.67     The following packages are incompatible
#6 10.67     ├─ osmium <3.7  does not exist (perhaps a typo or a missing channel);
#6 10.67     └─ pyomo >=6,<7  does not exist (perhaps a typo or a missing channel).
#6 10.75 critical libmamba Could not solve for environment specs
------
executor failed running [/usr/local/bin/_dockerfile_shell.sh micromamba install -y -n base -c conda-forge -c city-modelling-lab python=3.11 "proj>=9.3" pip coin-or-cbc --file src/requirements/base.txt &&     micromamba clean --all --yes]: exit code: 1
@mfitz mfitz added the bug Something isn't working label Jan 11, 2024
@brynpickering
Copy link
Contributor

This is a problem of Apple Silicon devices using Linux with ARM architecture by default. Pyomo is one of the conda forge libraries without a Linux ARM64 version available. The easiest is to change the architecture used for the docker build (for instructions, see our internal docs here)

@brynpickering brynpickering added the has workaround This is a low priority issue as there is a known workaround to it label Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working has workaround This is a low priority issue as there is a known workaround to it
Projects
None yet
Development

No branches or pull requests

2 participants