CLI Behavior for sipnet/model binary resolution #235
hdpriest-ui
started this conversation in
General
Replies: 1 comment
|
@dlebauer ; @infotroph ; @Alomir : will go forward with option B, download of binary to the run directory. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
We currently support two primary run modes for the workflow:
Apptainer-contained Slurm — The SIPNET binary ships inside the container image. We don't need to download or install anything for this approach.
Host-native conda/Slurm — The SIPNET binary must be present on the host filesystem at a known path before any ensemble jobs can run. This is currently handled by
tools/install_sipnet.sh, which clones the source repo and compiles viamake sipnet.This discussion is concerned with the 2nd use case.
In both options below; we will first allow the user to provide a local sipnet binary, and if that isn't the preferred option, we will obtain a copy of it via the below method(s)
Option A — Compile from source (current approach)
Clone
PecanProject/sipnet, check out the target revision, and compile locally. The script is idempotent and stores versioned binaries by git hash.Obviously, this takes more time, and could run into compile-tool issues (in theory, but probably not in practice)
Option B — Fetch a pre-compiled binary from GitHub Releases
Discover available releases and download the appropriate binary via the GitHub REST API using plain
curl. We would want to avoid using the gh cli; as this might not be available in the target environment. Curl will work just fine:We could allow the user to specify the sipnet version they wish to obtain for a particular run - this would enable the use of the most-recent version as standard, but also allow us to provision special-sauce versions if we need to deliver pre-production functionality for some reason.
In short, the install script would resolve the desired release, pull the matching binary, store it under the versioned naming convention already used by
install_sipnet.sh, and symlink it into place — matching the existing idempotent install pattern.No compile required, just a download and a link. Depends on us being disciplined about the content of the binaries in github, and requires curl and jq to be present on the install environment (easily resolved)
tl,dr; we should probably go with Option B.
All reactions