Skip to main content

Extends miniwdl to run workflows on SLURM clusters in singularity containers.

This SLURM backend plugin for miniwdl runs WDL task containers by creating a job script that is submitted to a SLURM cluster. In case the job description has a container, singularity will be used as container runtime.

Installation

For the latest stable version:

pip install miniwdl-slurm

For the development version:

pip install git+https://github.com/miniwdl-ext/miniwdl-slurm.git

Configuration

The following miniwdl configuration example can be used to use miniwdl on a SLURM cluster:

[scheduler]
container_backend=slurm_singularity
# task_concurrency defaults to the number of processors on the system.
# since we submit the jobs to SLURM this is not necessary.
# higher numbers means miniwdl has to monitor more processes simultaneously
# which might impact performance.
task_concurrency=200

# This setting allows running tasks to continue, even if one other tasks fails.
# Useful in combination with call caching. Prevents wasting resources by
# cancelling jobs half-way that would probably succeed.
fail_fast = false

[call_cache]
# The following settings create a call cache under the current directory.
# This prevents wasting unnecessary resources on the cluster by rerunning
# jobs that have already succeeded.
put = true
get = true
dir = "$PWD/miniwdl_call_cache"

[task_runtime]
# Setting a 'maxRetries' default allows jobs that fail due to intermittent
# errors on the cluster to be retried.
defaults = {
        "maxRetries": 2,
        "docker": "ubuntu:20.04"
    }

[singularity]
# This plugin wraps the singularity backend. Make sure the settings are
# appropriate for your cluster.
exe = ["singularity"]

# the miniwdl default options contain options to run as a fake root, which
# is not available on most clusters. So the run options do need to be
# overriden.
# --containall: isolates container environment, does not mount home, and
# isolates IPC and PID namespace.
# --no-mount hostfs: Prohibit mounting of any host filesystems unless
# explcitly mounted.
# --network none: Do not allow any network traffic inside and outside
# the container. This is a sane default for reproducible workflows,
# as "the internet" can vary, but if you have explicit download tasks
# you might need to remove this.
run_options = [
        "--containall",
        "--no-mount", "hostfs",
        "--network", "none"
    ]

# Location of the singularity images (optional). The miniwdl-slurm plugin
# will set it to a directory inside $PWD. This location must be reachable
# for the submit nodes.
image_cache = "$PWD/miniwdl_singularity_cache"

[slurm]
# extra arguments passed to the sbatch command (optional).
extra_args="--partition heavy_users,gpu --comment 'run with miniwdl'"

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

miniwdl_slurm-0.4.0.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

miniwdl_slurm-0.4.0-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file miniwdl_slurm-0.4.0.tar.gz.

File metadata

  • Download URL: miniwdl_slurm-0.4.0.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.2

File hashes

Hashes for miniwdl_slurm-0.4.0.tar.gz
Algorithm Hash digest
SHA256 c412ae0cc0bbde0c0ce46a9ca75e81a9209a066ac7ab507abc5835a2434c7269
MD5 6339f886cdb4ab5625383aa588cdc4de
BLAKE2b-256 76dd2b43669c0c05c8ca40990d118e06bca69cd508d6cd3e1d51a6d8a442abb8

See more details on using hashes here.

File details

Details for the file miniwdl_slurm-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: miniwdl_slurm-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 7.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.2

File hashes

Hashes for miniwdl_slurm-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bd96053fcf94633a615ad38dc1b28201c5defd3165681c0cf445dc832c08f444
MD5 8418cc398a0ae2eb79e734757faa55de
BLAKE2b-256 7c3d9ba2232062c3eb577faf711ed85a87b3ae8911fa498433357da524a3f28c

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 files

0.3.0

2 files

0.2.0

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page