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

Use package manager for installation #1

Open
jentjr opened this issue May 15, 2019 · 11 comments
Open

Use package manager for installation #1

jentjr opened this issue May 15, 2019 · 11 comments

Comments

@jentjr
Copy link

jentjr commented May 15, 2019

Any plans to use conda, or another packaging tool to distribute and install MODFLOW binaries? I would be willing to give this a shot to make the binaries available through conda-forge.

@langevin-usgs
Copy link
Contributor

@jentjr, how would this work? Would the installer just pull them out of this repo? Or would it actually handle the compiling as well?

@jentjr
Copy link
Author

jentjr commented Jul 14, 2019

@langevin-usgs, my thought was to create recipes using the conda-build compiler toolchains to compile for each platform from source. I’m not sure, but it may be possible to pull them directly from this repo.

@mwtoews
Copy link

mwtoews commented Jul 7, 2022

Having looked at https://github.com/conda-forge/modflow6-feedstock for a few weeks, I can say that the conda-forge ecosystem is not that great, as it has old and unmaintained Fortran compilers. (Only Linux has modern compilers on conda-forge). Until there are better Fortran compilers, I don't think conda is a suitable platform to build and distribute Fortran-based applications for all platforms.

I'm planning to submit a PR for a simple Python script that could install executables using the Releases API, which would replace the manual "choose download", "click download", "unzip to folder" steps in a command-line fashion.

@wpbonelli
Copy link
Contributor

@jentjr the get-modflow tool contributed by @mwtoews is included with FloPy 3.3.6 released today, there is more info here

@jentjr
Copy link
Author

jentjr commented Dec 16, 2022

Great. Thank you!

@Hugovdberg
Copy link

With the advent of pixi it would be interesting to see if it could be viable to expose the executables via a conda feedstock. Pixi is a (very fast!) conda replacement with decent pypi integration, mostly based around conda-forge, but more importantly creates a lock file with the current versions that are installed in a project specific environment. This can then be committed to version control to allow reproducibility of conda environments (also cross platform!). Should these executables be installable via conda-forge this would allow projects to pin the exact set of binaries used, and then requiring only a pixi install to recreate the project with the same binaries.

It is already possible to pin the version in pixi using a task that calls get-modflow to download the executables which is then set as a dependency of the tasks that use the executables, but that feels a little hacky and requires to run that task at least once before the environment can be used.

@wpbonelli
Copy link
Contributor

We have already begun to use pixi internally for MF6 development, indeed. And we have started to investigate putting MF6 on conda forge as well. I am not directly involved in the latter but AFAIK the main challenge is to find a compatible compiler in the conda ecosystem, the GCC available is too old and flang still seems too immature.

@Hugovdberg
Copy link

would it be possible to, instead of building on conda forge, to keep the current build train, but make a conda feedstock that exposes the precompiled binaries that currently reside on this repo? The conda build would then only need to download and extract the zip, and wrap it in a conda package such that they are automatically extracted to the correct location in the environment.

@wpbonelli
Copy link
Contributor

@scharlton2

@scharlton2
Copy link

@Hugovdberg At first, I thought this might not pass the initial conda-forge submission due to potential malware risks. However, it's similar to the Panoply feedstock (https://github.com/conda-forge/panoply-feedstock), where we add a JDK dependency, download pre-compiled Java classes from NASA (https://www.giss.nasa.gov/tools/panoply/download), and create scripts to run the JAR files. So, I think it could possible. And since you're a member of conda-forge you may be able to approve the initial submission yourself.

@scharlton2
Copy link

UPDATE: The latest version of gfortran available on conda-forge (14.2.0) successfully compiles and runs the latest release of MODFLOW 6 (6.6.0) on Windows. However, the default Fortran compiler for Windows specified in conda-forge ({{ compiler('fortran') }}) is flang 5.0.0 (as defined in conda-forge-pinning-feedstock), which is unable to compile MODFLOW 6 (6.6.0).

The current conda-forge build of MODFLOW 6 can be found at modflow6-feedstock.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants