-
Notifications
You must be signed in to change notification settings - Fork 358
ctsm_pylib container? #3239
Copy link
Copy link
Open
Labels
b4bbit-for-bitbit-for-bitdevopsDevelopment Operations to improve development throughput, E.g., adding GitHub WorkflowsDevelopment Operations to improve development throughput, E.g., adding GitHub Workflowsenhancementnew capability or improved behavior of existing capabilitynew capability or improved behavior of existing capabilitypriority: lowBackground task that doesn't need to be done right away.Background task that doesn't need to be done right away.
Milestone
Metadata
Metadata
Assignees
Labels
b4bbit-for-bitbit-for-bitdevopsDevelopment Operations to improve development throughput, E.g., adding GitHub WorkflowsDevelopment Operations to improve development throughput, E.g., adding GitHub Workflowsenhancementnew capability or improved behavior of existing capabilitynew capability or improved behavior of existing capabilitypriority: lowBackground task that doesn't need to be done right away.Background task that doesn't need to be done right away.
Type
Fields
Give feedbackNo fields configured for issues without a type.
We have a few GitHub workflow jobs that require the use of
ctsm_pylib. Whenever those run, they have to download the packages and install the environment—there's no way to cache it. This counts towards the ESCOMP org's bandwidth billing.It would be cheaper (and maybe faster) to have a
ctsm_pylibcontainer that the jobs could run in. As far as I can tell, as long as that container is public and hosted on GitHub Container Registry (as ourctsm-docscontainer is), this would not count toward our bandwidth usage.On the other hand, if we're close to having self-hosted GitHub runners, it's possible the
ctsm_pylibenvironment could be cached on those, avoiding this issue—at least for people with permissions to use those runners.I've had a stab at this, the results of which you can see on the PR at samsrabin#13.
The container and Python unit testing work on my Mac. From the top level of a CTSM checkout, open an interactive terminal in the container like so:
podman run --rm -it -v $PWD:/home/mambauser ghcr.io/samsrabin/ctsm/ctsm_pylib-container:latest bashThen, in the container, do:
cd python ./run_ctsm_py_tests -uand it should work. (Although depending on your CTSM version you may have some failing/erroring tests.)
However, I can't get it to work in the GitHub workflow. Once that's working, it'd be nice to try minimizing the image size using Alpine Linux instead of what comes with the default micromamba image (I think Arch). We would also want to have a dual arm64/amd64 image as well; the current one (
dd25c67e7ed6) is just arm64.