bird-house / finch

A Web Processing Service for Climate Indicators
https://finch.readthedocs.io/en/latest/
Apache License 2.0
12 stars 5 forks source link

Finch 0.9.1 docker image fails to run #248

Closed perronld closed 2 years ago

perronld commented 2 years ago

Description

Finch 0.9.1 docker image fails to start

Environment

Steps to Reproduce

docker run -ti --rm birdhouse/finch:version-0.9.1
[...]

  File "/code/finch/__init__.py", line 7, in <module>
    from .wsgi import application  # noqa: F401
  File "/code/finch/wsgi.py", line 6, in <module>
    from .processes import get_processes
  File "/code/finch/processes/__init__.py", line 4, in <module>
    import xclim
  File "/opt/conda/envs/finch/lib/python3.10/site-packages/xclim/__init__.py", line 7, in <module>
    from xclim.core.indicator import build_indicator_module_from_yaml
  File "/opt/conda/envs/finch/lib/python3.10/site-packages/xclim/core/indicator.py", line 111, in <module>
    from .. import indices
  File "/opt/conda/envs/finch/lib/python3.10/site-packages/xclim/indices/__init__.py", line 26, in <module>
    from ._agro import *
  File "/opt/conda/envs/finch/lib/python3.10/site-packages/xclim/indices/_agro.py", line 8, in <module>
    import xclim.indices.run_length as rl
  File "/opt/conda/envs/finch/lib/python3.10/site-packages/xclim/indices/run_length.py", line 17, in <module>
    from numba import njit
  File "/opt/conda/envs/finch/lib/python3.10/site-packages/numba/__init__.py", line 200, in <module>
    _ensure_critical_deps()
  File "/opt/conda/envs/finch/lib/python3.10/site-packages/numba/__init__.py", line 140, in _ensure_critical_deps
    raise ImportError("Numba needs NumPy 1.21 or less")

Additional Information

Since numba package is always late with numpy, pinning the numpy version in environment.yml will fix the issue. I downgraded numpy to 1.21 on a local image and it works properly:

FROM birdhouse/finch:version-0.9.1

RUN mamba install -c conda-forge -n finch numpy=1.21 -y && rm -rf /opt/conda/pkgs/*
aulemahal commented 2 years ago

What! I thought that issue was solved. Pinning xESMF to >= 0.6.3 might solve it. I'll test...

Is this crucial, like do you need a new release very soon, or can we wait a few weeks?

perronld commented 2 years ago

It can wait, since I have a clean workaround to run 0.9.1 in staging.

tlvu commented 2 years ago

Is this crucial, like do you need a new release very soon, or can we wait a few weeks?

Other than Louis-David, PAVICS production also need a new Finch so if possible, not in a few weeks. Production has been broken since a few weeks already.

On another note, could the wrong numpy chosen version be due to mamba? mamba is really quick but sometime it needs help to choose the proper versions.