Skip to content

Use package manager for installation #1

Open

Description

@jentjr

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.

Activity

  1. christianlangevin commented on Jul 13, 2019

    @christianlangevin

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

  2. jentjr commented on Jul 14, 2019

    @jentjr
    Author

    @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.

  3. mwtoews commented on Jul 7, 2022

    @mwtoews

    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.

  4. wpbonelli commented on Dec 15, 2022

    @wpbonelli
    Member

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

  5. jentjr commented on Dec 16, 2022

    @jentjr
    Author

    Great. Thank you!

  6. Hugovdberg commented on Jan 14, 2025

    @Hugovdberg

    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.

  7. wpbonelli commented on Jan 14, 2025

    @wpbonelli
    Member

    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.

  8. Hugovdberg commented on Jan 14, 2025

    @Hugovdberg

    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.

  9. wpbonelli commented on Jan 14, 2025

    @wpbonelli
    Member
  10. scharlton2 commented on Jan 14, 2025

    @scharlton2

    @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.

  11. scharlton2 commented on Jan 23, 2025

    @scharlton2

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions