Skip to content

Instantly share code, notes, and snippets.

@hexylena
Last active July 22, 2025 14:12
Show Gist options
  • Select an option

  • Save hexylena/1b7dac4d6f13b19b0fc00428cb9acca1 to your computer and use it in GitHub Desktop.

Select an option

Save hexylena/1b7dac4d6f13b19b0fc00428cb9acca1 to your computer and use it in GitHub Desktop.
wdl overriding
version 1.0
task t {
command {
python -V
}
runtime {
docker: "docker.io/library/python:3.12"
}
output {
Array[String] out = read_lines(stdout())
}
}
workflow wf {
call t { input:
}
}
version 1.1
task t {
command {
python -V
}
runtime {
docker: "docker.io/library/python:3.12"
}
output {
Array[String] out = read_lines(stdout())
}
}
workflow wf {
call t { input:
}
}

1.1 overriding of attrs

1.0:

16:03:52 w-lumc:[~/sasc/wdl-test/2025-07-22-override]130$ miniwdl run 1.0.wdl --cfg miniwdl.cfg
2025-07-22 16:03:58.770 wdl.w:wf workflow start :: name: "wf", source: "1.0.wdl", line: 17, column: 1, dir: "/home/user/sasc/wdl-test/2025-07-22-override/20250722_160358_wf"
2025-07-22 16:03:58.776 wdl.w:wf miniwdl :: version: "v1.13.0", uname: "Linux w-lumc 6.12.35-1.qubes.fc37.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Jun 30 01:40:47 GMT 2025 x86_64"
2025-07-22 16:03:58.785 wdl.w:wf ready :: job: "call-t", callee: "t"
2025-07-22 16:03:58.787 wdl.w:wf.t:call-t task setup :: name: "t", source: "1.0.wdl", line: 3, column: 1, dir: "/home/user/sasc/wdl-test/2025-07-22-override/20250722_160358_wf/call-t", thread: 136011106080448
2025-07-22 16:03:58.935 wdl.w:wf.t:call-t Singularity runtime initialized (BETA) :: singularity_version: "apptainer version 1.4.1-1.fc41"
2025-07-22 16:03:58.937 wdl.w:wf.t:call-t ignored runtime settings :: keys: ["threads"]
2025-07-22 16:03:58.943 wdl.w:wf.t:call-t singularity run :: pid: 69272, log: "/home/user/sasc/wdl-test/2025-07-22-override/20250722_160358_wf/call-t/singularity.log.txt"
2025-07-22 16:03:59.160 wdl.w:wf.t:call-t done
2025-07-22 16:03:59.160 wdl.w:wf finish :: job: "call-t"
2025-07-22 16:03:59.168 wdl.w:wf done
{
  "dir": "/home/user/sasc/wdl-test/2025-07-22-override/20250722_160358_wf",
  "outputs": {
    "wf.t.out": [
      "Python 3.12.11"
    ]
  }
}

16:04:05 w-lumc:[~/sasc/wdl-test/2025-07-22-override]$ miniwdl run 1.0.wdl --cfg miniwdl.cfg -i inputs.json

check JSON input; unknown input/output: wf.t.runtime.docker

1.1: Supports Overriding

16:03:24 w-lumc:[~/sasc/wdl-test/2025-07-22-override]$ miniwdl run -i inputs.json 1.1.wdl --cfg miniwdl.cfg 
2025-07-22 16:03:25.026 wdl.w:wf workflow start :: name: "wf", source: "1.1.wdl", line: 17, column: 1, dir: "/home/user/sasc/wdl-test/2025-07-22-override/20250722_160325_wf"
2025-07-22 16:03:25.027 wdl.w:wf miniwdl :: version: "v1.13.0", uname: "Linux w-lumc 6.12.35-1.qubes.fc37.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Jun 30 01:40:47 GMT 2025 x86_64"
2025-07-22 16:03:25.034 wdl.w:wf ready :: job: "call-t", callee: "t"
2025-07-22 16:03:25.035 wdl.w:wf.t:call-t task setup :: name: "t", source: "1.1.wdl", line: 3, column: 1, dir: "/home/user/sasc/wdl-test/2025-07-22-override/20250722_160325_wf/call-t", thread: 130359007848128
2025-07-22 16:03:25.148 wdl.w:wf.t:call-t Singularity runtime initialized (BETA) :: singularity_version: "apptainer version 1.4.1-1.fc41"
2025-07-22 16:03:25.149 wdl.w:wf.t:call-t ignored runtime settings :: keys: ["threads"]
2025-07-22 16:03:59.860 wdl.w:wf.t:call-t singularity pull :: image: "/home/user/sasc/wdl-test/2025-07-22-override/.miniwdl/apptainer_cache/docker___docker.io_library_python_3.10.sif", seconds_waited: 0, seconds_pulling: 34
2025-07-22 16:03:59.865 wdl.w:wf.t:call-t singularity run :: pid: 69345, log: "/home/user/sasc/wdl-test/2025-07-22-override/20250722_160325_wf/call-t/singularity.log.txt"
2025-07-22 16:04:00.132 wdl.w:wf.t:call-t done
2025-07-22 16:04:00.132 wdl.w:wf finish :: job: "call-t"
2025-07-22 16:04:00.133 wdl.w:wf done
{
  "dir": "/home/user/sasc/wdl-test/2025-07-22-override/20250722_160325_wf",
  "outputs": {
    "wf.t.out": [
      "Python 3.10.18"
    ]
  }
}
miniwdl run -i inputs.json 1.1.wdl --cfg miniwdl.cfg  66,21s user 5,41s system 201% cpu 35,536 total
16:04:00 w-lumc:[~/sasc/wdl-test/2025-07-22-override]$ miniwdl run 1.1.wdl --cfg miniwdl.cfg       
2025-07-22 16:04:39.924 wdl.w:wf workflow start :: name: "wf", source: "1.1.wdl", line: 17, column: 1, dir: "/home/user/sasc/wdl-test/2025-07-22-override/20250722_160439_wf"
2025-07-22 16:04:39.927 wdl.w:wf miniwdl :: version: "v1.13.0", uname: "Linux w-lumc 6.12.35-1.qubes.fc37.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Jun 30 01:40:47 GMT 2025 x86_64"
2025-07-22 16:04:39.934 wdl.w:wf ready :: job: "call-t", callee: "t"
2025-07-22 16:04:39.935 wdl.w:wf.t:call-t task setup :: name: "t", source: "1.1.wdl", line: 3, column: 1, dir: "/home/user/sasc/wdl-test/2025-07-22-override/20250722_160439_wf/call-t", thread: 137046739769024
2025-07-22 16:04:40.064 wdl.w:wf.t:call-t Singularity runtime initialized (BETA) :: singularity_version: "apptainer version 1.4.1-1.fc41"
2025-07-22 16:04:40.065 wdl.w:wf.t:call-t ignored runtime settings :: keys: ["threads"]
2025-07-22 16:04:40.071 wdl.w:wf.t:call-t singularity run :: pid: 69519, log: "/home/user/sasc/wdl-test/2025-07-22-override/20250722_160439_wf/call-t/singularity.log.txt"
2025-07-22 16:04:40.344 wdl.w:wf.t:call-t done
2025-07-22 16:04:40.345 wdl.w:wf finish :: job: "call-t"
2025-07-22 16:04:40.350 wdl.w:wf done
{
  "dir": "/home/user/sasc/wdl-test/2025-07-22-override/20250722_160439_wf",
  "outputs": {
    "wf.t.out": [
      "Python 3.12.11"
    ]
  }
}
{
"wf.t.runtime.docker": "docker.io/library/python:3.10"
}
[scheduler]
container_backend=singularity
task_concurrency=100
fail_fast=false
[task_runtime]
defaults = {
"maxRetries": 2,
"threads": 4,
"docker": "ubuntu:20.04"
}
[singularity]
exe = ["apptainer"]
image_cache = "$PWD/.miniwdl/apptainer_cache"
run_options = [
"--containall",
"--network", "none"
]
[file_io]
allow_any_input=true
use_relative_output_paths=true
[call_cache]
put = false
get = false
Dir = "$PWD/.miniwdl/call_cache"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment