-
Notifications
You must be signed in to change notification settings - Fork 155
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
aarch64 support #204
Comments
Alright well, here's how to fix the basemap issue at least. This is going to be an extract from a Dockerfile, because I'm still in the middle of debugging this, but just in case anyone happens to want to continue from where I'm inevitably going to leave this, I thought it was worth documenting. Basemap requires RUN curl -L "https://download.osgeo.org/geos/geos-3.11.2.tar.bz2" | tar -xvj \
&& cd geos-3.11.2 \
&& make \
&& make install If you then clone the repo and However, this 1) makes nicely defined conda envs impossible because as far as I can tell there's no way to tell conda to skip running setuptools and 2) means you don't get OpenMP support. I don't need OpenMP support, but I'm kinda motivated to see if I can get this working anyway. The reason OpenMP support fails I assume is because there's no aarch64 wheels for @erogluorhan @wjcapehart @MauricioLorey10 If you only need edit: simplified the extract a little to remove the unneeded core count stuff |
The fact that I can't figure out how to stop conda from calling setup.py, or at least act in exactly the same way pip install does. I would have thought that this conda file would work:
(forked repo for my own testing) but it seems no edits to how I'm specifying it in the env definition, nor edits to Unfortunately, while getting random stuff built in containers is where I know what I'm doing, Python dependency management very much isn't! |
I started writing out Dockerfiles for |
I was having some weird issues previously, but here's a workaround that appears to work, even if it's not... pretty. Be warned, it skips OpenMP support. You must also have geos installed as per my second comment to build basemap. Conda env file: name: raw_to_cf
channels:
- conda-forge
- default
dependencies:
# Note: Nuitka only supports up to 3.10 at the moment
- python=3.10.9
- boto3
- cloudpathlib
- xarray
- netcdf4
# Ideally this would be in its own env, because it ends up in the final image otherwise
- conda-pack
# This is the only way I could find to install currently because of https://github.com/NCAR/wrf-python/issues/204
# This requires a force reinstall of numpy for conda to think the environment is sane
# because pip clobbers it
# Run this after installation:
# micromamba install -n base -c conda-forge --force-reinstall numpy
- pip:
- wrf-python pip is managing the install for |
Very simple conda create -n wrf -c anaconda python=3.8 Basemap
conda activate wrf
apt update && apt install gcc g++ make cmake gfortran
git clone https://github.com/NCAR/wrf-python.git
pip install . |
I've been trying to get wrf-python to work on my M1 device as well. I am getting errors about the setup.py file when I try to run pip install . |
Seen a couple issues with people asking for Apple M1 support, but to correctly name the problem: the library won't build on the aarch64/arm64 architecture.
We encountered pretty much this issue with
wrf-python
today when trying to put together multi-arch container images to support both amd64 and aarch64 hosts. This issue affects all aarch64 machines, not just M1's.While the wheels for basemap-1.3.6 aren't available for aarch64, when built on an aarch64 build host (with appropriate build tools and
geos-3.11.2
compiled and installed previously), basemap seems to install fine. I'd provide Dockerfile samples, but it would be a pain to extract to a simplified example and it fails with some numpy issues later on anyway.I'll continue bashing my head against it for a bit and see if I can come up with a build process that works for the whole library.
Related: #199, #148
The text was updated successfully, but these errors were encountered: