NOAA-GFDL / MDTF-diagnostics

Analysis framework and collection of process-oriented diagnostics for weather and climate simulations
https://mdtf-diagnostics.readthedocs.io/en/main/
Other
64 stars 100 forks source link

micromamba environment installation error #605

Open aradhakrishnanGFDL opened 4 months ago

aradhakrishnanGFDL commented 4 months ago

1- Installing this environment using micromamba as part of the container tests fail

src/conda/env_NCL_base.yml

error snippet

26.86 error    libmamba Could not solve for environment specs
26.86     The following package could not be installed
26.86     └─ ncl 6.6.2**  does not exist (perhaps a typo or a missing channel).
26.86 critical libmamba Could not solve for environment specs

I've used https://hub.docker.com/r/mambaorg/micromamba latest and 1.5.8 tags. I recollect that this worked last year. Does this issue ring a bell even without the docker dependency here? I remember some libmamba confusions in the past.

2- The following issue is only in the main branch with the addition of new packages (gridfill) in env_python3_base.yml. I can't reproduce the same in an older version where this package does not exist.

error    libmamba Could not solve for environment specs
15.14     The following package could not be installed
15.14     └─ gridfill 1.1.1**  does not exist (perhaps a typo or a missing channel).

This environment also requires that we install git in our container for other extra packages.

wrongkindofdoctor commented 4 months ago

@aradhakrishnanGFDL I suspect that, like the macOS M-series package, the container's micromamba package does not support NCL or gridfill.

The gridfill package is only required for the incoming Finite Amplitude Rossby Wave diagnostic, so I'll comment it out if I can't fix it.

It's probably time to implement separate environment files and build scripts for micromamba, conda, and stripped-down environments for containers that only work with subsets of PODs if you are concerned with size/build time.

wrongkindofdoctor commented 4 months ago

@aradhakrishnanGFDL I've created separate env installation files for micromamba and updated the micromamba_env_install.sh script to reference them. The env_python3_base_micromamba.yml file no longer contains the falwa package and its gridfill dependency. This does not resolve the NCL issue, but you should be able to install the base and python3_base environments individually with micromamba using the -e parameter as specified in the README.

aradhakrishnanGFDL commented 4 months ago

Thanks @wrongkindofdoctor. That helps. My goal is to be able to have the environments (minus NCL and R) installed in the container, without any errors. Tabling Size and build time concerns for later, although it's reasonable right now IMO.

Any pointers or recommendations to specific micromamba versions used in the framework so I can use that from the container as well?

For the environments that need "git", curious to look for best practices suitable for dev vs operational. For now, I will install git in the docker image and remove it once the environment is installed.

wrongkindofdoctor commented 4 months ago

@aradhakrishnanGFDL I'm using v1.5.1 from Homebrew for Apple Silicon chips on my Mac, though there is a newer version available. In general, I recommend using the latest version available unless there are package compatibility issues.

As for the git packages, most of them are required for om4labs. We could require all dependencies to be pip or conda packages, but I'm not sure if we'd be able to get the repo owners of the current git packages to commit to this.