Skip to content

Where do containers fit in? #1

Open
@vsoch

Description

@vsoch

I'm reading over the overview draft (really exciting!) and I'd like to brainstorm how containers fit into this model. Right now we have them as a part of composition:

Bindmount libraries into containers. Verify ABI compatibility of sub-DAG from host with binaries in container ecosystem

Which I think means that we would be able to build packages into containers with spack containerize and then check compatability with libraries on the host (MPI for Singularity comes to mind as a good example).

So to step back - there are two scenarios I can see containers:

  1. Build an entire set of packages into a container (e.g., spack containerize). We are following the same build routines but inside of a container with spack. For running this container, we'd need to be checking against the host for ABI compatability, per what is written into the current spec.
  2. Obtain a package as a container (not sure this exists).
  3. Build a package as a container (a derivative of 1, but with just one package, and hopefully with multi staged builds to minimize the redudancy) and then add the executable container to the path akin to having pulled it (2.)

For the second point, I'm wondering if this could be a use case for spack (or this general package manager model), period. If we imagine that a user wants to use spack as a container registry, instead of compiling / building on their host, would this be hard or unreasonable to do? A "build" really comes down to ensuring the container technology is installed, and there is a means to pull based on a specific hash or tag, and then have containers as executables on the path (Singularity) or run them (Docker, less likely for HPC, but podman and friends are just around the corner). We can focus on the Singularity use case to start, since the container is akin to an executable binary. This would mean that the user is allowed to install any container URI available, and the containers in storage would need to be namespaced depending on their URI. Reproducibility then would not depend on what spack does, but on if the version of the container changes. We would then need some way to still check the container for ABI compatability with the host (again focusing on Singularity). In the same way we could export a tree of packages and dependencies, we could also export a list of containers.

For point 3, this is similar to the idea of having isolated environments for other needs too (I remember the discussion about pex, for example). It would allow the user to have a combination of natively built packages and containers "for all those other use cases where I want to keep things separate."

And another idea, maybe this is a point 4. If we are bind mounting containers to potentially eventually link to a library inside, you could imagine having containers that exist only to serve as bind resources for some set of libraries that might require very hard to satisfy host dependencies.

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