diff options
| author | Pjotr <wrk@bosa.lan> | 2026-10-24 09:33:40 +0000 |
|---|---|---|
| committer | Pjotr <wrk@bosa.lan> | 2026-10-24 09:33:40 +0000 |
| commit | a7ffb1cfecbdb8ac3fcc6286d7a09f7285c95d67 (patch) | |
| tree | 1cb865784d901fad979aed32694b77474019468d /src/routes | |
| parent | cda325b6334ef36e3f49501cfd77d68a7bd6a295 (diff) | |
| download | genenetwork4-a7ffb1cfecbdb8ac3fcc6286d7a09f7285c95d67.tar.gz | |
gemma: Make ravanan's batch system configurable (optional Slurm).
POST /compute/gemma/ravanan used to run every CWL step locally, because compute_ravanan never passed ravanan a batch system. Add a RavananBatch setting: - RAVANAN_BATCH_SYSTEM=single-machine (default) or slurm-api, failing closed on anything else, exactly like GN4_DB_MODE; - slurm-api adds --batch-system=slurm-api, --slurm-api-endpoint, --slurm-jwt (a *file*, which is what ravanan reads) and, when set, --slurm-partition/--slurm-nice; a slurm selection without an endpoint or a JWT file refuses to start rather than 502-ing every request; - --scratch defaults to ravanan_cache_dir for slurm, so the store and the job scratch space live on the same shared filesystem (with slurm that directory has to be visible to the compute nodes); - the response's ravanan note records which backend ran. The switch building is RavananBatch::ravanan_args so it is unit testable; compute_ravanan takes the backend and the scratch directory, and the route passes them from config. docs/ravanan-slurm.md documents the keys, the shared-directory requirement, and the slurm-side auth wiring (AuthType=auth/munge + AuthAltTypes=auth/jwt with SLURM_JWT in slurmrestd's environment) that makes REST-submitted jobs actually run.
Diffstat (limited to 'src/routes')
| -rw-r--r-- | src/routes/gemma.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/routes/gemma.rs b/src/routes/gemma.rs index 32d1818..e096150 100644 --- a/src/routes/gemma.rs +++ b/src/routes/gemma.rs @@ -204,10 +204,12 @@ pub async fn compute_gemma_ravanan( let config = Config::load(); gemma::compute_ravanan( &config.ravanan_cmd, + &config.ravanan_batch, &config.ccwl_cmd, &config.gemma_ravanan_workflow, &config.gemma_ravanan_manifest, &config.ravanan_cache_dir, + &config.ravanan_scratch, &request.genotype_file, &request.snps_file, &request.trait_values, |
