Skip to content

Possible to build without internet access aka pre-built dependencies? #128

Closed
@mathomp4

Description

@mathomp4

A user I help support with the GEOS model has asked for neural-fortran to be used. The main issue I'm currently having is how I can build it in my "usual" way.

For example, currently I use ESMA-Baselibs to install the "base libraries" used by GEOS. Now, Baselibs is "nice" for clusters in that I can clone it on a node with internet access (and download a few things not on GitHub and not submodule-able) and then do all the other tasks on a compute node where things like make -j10 are allowed (head nodes maaaaybe they'd allow make -j2).

The issue I see here is that if I use the CMake install method, it looks like it always uses FetchContent which of course would fail on a compute node at CMake time since it couldn't get the code since compute nodes can't see the internet.

So, I wondered, do you have ideas on how to handle this? My first thought was I can add functional-fortran, h5fortran, and json-fortran as submodules, but I think I'd need to do something like in, say, functional.cmake:

find_package(functional 0.6.1 QUIET)
if (NOT functional_FOUND)

  FetchContent_Declare(functional
    GIT_REPOSITORY https://github.com/wavebitscientific/functional-fortran
    GIT_TAG 0.6.1
    GIT_SHALLOW true
  )

  FetchContent_Populate(functional)
...

Does that look about right? I'm going to try this and see in some test builds but I even wondered if you'd be willing to support such a change.

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