ecmwf / ecmwflibs

Apache License 2.0
15 stars 9 forks source link

Can't install on Mac M2 with Docker #13

Open 28raining opened 1 year ago

28raining commented 1 year ago

This is my Dockerfile: (also tried Python 3.9.6)

FROM python:3.11.2-slim
RUN /usr/local/bin/python -m pip install --upgrade pip
RUN pip install ecmwflibs

To execute that: docker build -t "name:Dockerfile" .

Error message

 => ERROR [3/3] RUN pip install ecmwflibs                                                                                                                                                                                                   0.6s
------                                                                                                                                                                                                                                           
 > [3/3] RUN pip install ecmwflibs:
#6 0.481 ERROR: Could not find a version that satisfies the requirement ecmwflibs (from versions: none)
#6 0.482 ERROR: No matching distribution found for ecmwflibs

My docker version is: Docker version 20.10.23, build 7155243

And I'm running macOS Ventura 13.3 (macbook air m2)

On my mac, "pip install ecmwflibs" works fine. Only inside docker it doesn't work.

foufos commented 1 year ago

I am facing the same issue. @28raining did you manage to solve it?

28raining commented 1 year ago

I didn't get a chance to try it yet but there was a solution offered here https://github.com/rasterio/rasterio/issues/2801

Let us know if that works!

hammad93 commented 1 year ago

I've had a similar issue elsewhere and I would try to find another base Docker image. Try to see if you can make it work with the "latest" Python base docker image,

FROM python:latest
cdibble commented 10 months ago

I am having this issue but only as I introduce multi-architecture docker builds. When building on linux/amd64 it seemed to work fine, but when attempting to add in linux/arm64 I get the no matching distributions found error.

Could this be some of the core dependencies are platform-specific?