Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pip Managed Runtime Dependencies #314

Draft
wants to merge 25 commits into
base: develop
Choose a base branch
from
Draft

Conversation

mdavis36
Copy link
Collaborator

@mdavis36 mdavis36 commented Nov 8, 2024

Summary

  • This PR is a refactoring of our package management system for python packages in the Spheral build pipeline.

Spheral +python variant

  • The spheral spack package will default to +python. This will add python as a dependency for building spheral. It will also enable +python for polytope.
  • We no longer need any of our pip package dependencies in spack.
    • Reduces Docker TPL builds from ~60 min to ~30.

Build Time Deps

  • We still need spack to build python for us :( .
    • The defaults on LC fails to build mpi4py correctly.
    • CMake complains abour missing development targets from many of the python modules on LC.
  • We need decorator (for PYB11Generator), as well as sphinx and sphinx-rtd-theme.
    • These are stored in scripts/build-requirements.txt
  • Using the new Spheral_Python_Env function we build a virtual environment target in the build tree with these dependencies. All pybind11 code and documentation is generated from this environment.

Runtime Deps

  • Using the same Spheral_Python_Env function we can generate a Virtual Env in the Install directory from runtime-requirements.txt.
  • spheral-setup-venv will now copy only the necessary Spheral libraries into this environment at the install time.

The build and runtime environment target scripts will be run on every make call. However after the initial installation on the first make this only takes a few seconds as pip will check each time to ensure the environments satisfy their respective requirements.txt files.

Caching Builds for LC

It seems as if all pip packages install from a local Livermore pypi repo. This could be very advantageous and might mean we may not have to manage cached tars ourselves.

  • ATS will be a problem on air-gapped systems, currently it needs to pull ATS from the github repo.

C++ Only Builds

  • When building Spheral w/o the python interface we no longer need spack to build python.
    • Note: It will still try as caliper has a hard dependency on python.
    • TODO: Remove Caliper python dependency in caliper package? (this will get rid of python from our spack build tree entirely for ~python specs).

ToDo :

  • Annotate RELEASE_NOTES.md with notable changes.
  • Create LLNLSpheral PR pointing at this branch. (PR#)
  • LLNLSpheral PR has passed all tests.

…IR; System + compiler specific cache directories; Clean targets for pip cache and envs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant