test module skill with careless
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
# careless
|
||||
|
||||
Scaling and merging of X-ray diffraction data with approximate Bayesian
|
||||
inference (variational merging), built on TensorFlow.
|
||||
|
||||
- Upstream: https://github.com/rs-station/careless
|
||||
- License: MIT
|
||||
|
||||
## How it is built
|
||||
|
||||
The build installs a private miniconda into `$PREFIX/miniconda`, creates a
|
||||
`careless_<version>` env with Python 3.12 (upstream supports >=3.9,<3.13),
|
||||
and runs `pip install careless[cuda]==<version>` inside it. The `[cuda]`
|
||||
extra pulls the NVIDIA libraries as pip wheels, so the same install works
|
||||
on GPU and CPU-only Ra nodes.
|
||||
|
||||
Loading the module puts the env's `bin/` on `PATH` (the `careless` command
|
||||
is directly available, no `conda activate` needed) and sets `CARELESS_ENV`
|
||||
to the conda env path.
|
||||
|
||||
## Adding a new version
|
||||
|
||||
Add the version under `versions:` in `files/config.yaml`, then on a Ra
|
||||
login node: `./build <version>`.
|
||||
Executable
+27
@@ -0,0 +1,27 @@
|
||||
#!/usr/bin/env modbuild
|
||||
|
||||
pbuild::prep() {
|
||||
:
|
||||
}
|
||||
|
||||
pbuild::configure() {
|
||||
# careless is pip-installed, but upstream recommends a fresh conda env
|
||||
# (TensorFlow dependency conflicts), so install a private miniconda in PREFIX
|
||||
mkdir -p "$PREFIX/miniconda"
|
||||
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O "$PREFIX/miniconda/miniconda.sh"
|
||||
bash "$PREFIX/miniconda/miniconda.sh" -b -u -p "$PREFIX/miniconda/"
|
||||
"$PREFIX/miniconda/condabin/conda" create -y -n "careless_$V" python=3.12
|
||||
}
|
||||
|
||||
pbuild::compile() {
|
||||
:
|
||||
}
|
||||
|
||||
pbuild::install() {
|
||||
source "$PREFIX/miniconda/etc/profile.d/conda.sh"
|
||||
conda activate "careless_$V"
|
||||
pip install --upgrade pip
|
||||
# [cuda] extra ships the NVIDIA libs via pip wheels; works on CPU-only nodes too
|
||||
pip install --no-cache-dir "careless[cuda]==${V_PKG}"
|
||||
conda deactivate
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
---
|
||||
format: 1
|
||||
careless:
|
||||
defaults:
|
||||
group: MX
|
||||
overlay: base
|
||||
relstage: unstable
|
||||
versions:
|
||||
0.5.4:
|
||||
config:
|
||||
relstage: unstable
|
||||
@@ -0,0 +1,16 @@
|
||||
#%Module1.0
|
||||
|
||||
module-whatis "careless - merging crystallography data with variational inference"
|
||||
module-url "https://github.com/rs-station/careless"
|
||||
module-license "MIT"
|
||||
module-maintainer "MX Data <jiaxin.duan@psi.ch>"
|
||||
|
||||
module-help "
|
||||
careless: scaling and merging of X-ray diffraction data using
|
||||
approximate Bayesian inference (TensorFlow). Installed with the
|
||||
[cuda] extra, so it uses NVIDIA GPUs when available and falls
|
||||
back to CPU otherwise.
|
||||
"
|
||||
|
||||
setenv CARELESS_ENV $PREFIX/miniconda/envs/careless_$V
|
||||
prepend-path PATH $PREFIX/miniconda/envs/careless_$V/bin
|
||||
Reference in New Issue
Block a user