Skip to content

Spack packages of MICe software (and some external dependencies)

License

Notifications You must be signed in to change notification settings

Mouse-Imaging-Centre/mice-spack-packages

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 

Repository files navigation

A Spack repo for some MICe-developed and -maintained software packages, some of which are of general interest to MINC users and others mostly for internal use.

Usage

Initial setup:

  1. git clone https:/spack/spack.git
  2. git clone https:/Mouse-Imaging-Centre/mice-spack-packages.git
  3. source spack/share/spack/setup-env.sh
  4. configure main spack repo to point to this repo (repo-wide via spack repo add ... or per-env basis)
  5. detect compilers: spack compiler find --scope=site
  6. (highly recommended) detect external packages (--scope=site)
  7. configure etc/spack/modules.yaml -- in particular, if using tcl modules instead of lmod (not recommended), set 'autoload: direct' or generated modulefiles won't respect Python dependencies

Building the set of packages:

  1. export MY_SPACK_ENV="my-new-env-yy-mm-dd"
  2. spack env create ${MY_SPACK_ENV}
  3. edit var/spack/environments/${MY_SPACK_ENV}/spack.yaml as appropriate
  4. spack env activate ${MY_SPACK_ENV}
  5. spack concretize (optional)
  6. spack install
  7. (after running spack concretize or spack install you'll have to delete var/spack/environments/${MY_SPACK_ENV}/spack.lock after changing spack.yaml (including via spack add, spack remove, etc), and after editing a package that's successfully installed you'll have to remove the lockfile and also uninstall the package--Spack seemingly doesn't track changes to the package.py in the hash)
  8. spack module lmod refresh # generate module files (or tcl instead of lmod)
  9. spack env loads -m lmod # generate "loads" file (a shell file to be sourced)
  10. convert the loads file to a modulefile
  11. install R packages and make a module (assumes you have devtools and packrat installed e.g. as a user, from previous Spack env, Packrat env, etc.):
  12. echo 'depends_on('r-packages/<version>') >> /path/to/StdEnv.lua
  13. configure qbatch, RMINC, and Pydpiper by setting PYDPIPER_CONFIG_FILE, RMINC_BATCH_CONF, and relevant QBATCH vars (e.g. in modulefiles)
  14. if you blacklisted LD_LIBRARY_PATH in the module generation, hack the modules to add ${pkgs.{flex}/lib to LD_LIBRARY_PATH in order for minccalc to work (and similarly for libtiff if using opencv Python package, etc.)
  15. check that the generated modules actually work -- Spack might have generated them out-of-order (see e.g. github.com/spack/spack/issues/26771) or even left some out entirely

About

Spack packages of MICe software (and some external dependencies)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages