Hi all , and thanks for providing this forum.
I am new to workflows and pretty new to containers, so please excuse any newbie blunders.
I am learning CWL via this Carpentries Incubator lesson.
As I want to run my workflow on an HPC system later, I’m replacing the use of cwltool
in the tutorial with the use of toil-cwl-runner
which, however, uses cwltool
under the hood.
Also, because it is a requirement on our systems, we use podman
instead of docker
and I was delighted to see that cwltool
offers a flag --podman
.
However, I cannot get the first single step workflow example from the tutorial to run with either cwltool
or toil
and --podman
.
I’m posting an example error below which throws a cwltool.errors.WorkflowException
related to the missing Docker. I think the issue may be related to the one workflow step having a DockerRequirement
though.
This may also just be because I don’t understand enough of podman and docker and got something wrong in the setup there.
Anyhow, the workflow calls just one step with these hints:
#!/usr/bin/env cwl-runner
cwlVersion: v1.0
class: CommandLineTool
hints:
DockerRequirement:
dockerPull: quay.io/biocontainers/fastqc:0.11.9--hdfd78af_1
SoftwareRequirement:
packages:
fastqc:
specs: [ "http://identifiers.org/biotools/fastqc" ]
version: [ "0.11.9--hdfd78af_1", "0.11.9" ]
I have pulled the container requirements mentioned in the tutorial setup as well as the one from the DockerRequirement
manually in podman
:
$> podman images -a
REPOSITORY TAG IMAGE ID CREATED SIZE
quay.io/biocontainers/cutadapt 3.7--py39hbf8eff0_1 1a64f7e399a3 8 months ago 174 MB
quay.io/biocontainers/samtools 1.14--hb421002_0 33de2337c097 13 months ago 74.8 MB
quay.io/biocontainers/fastqc 0.11.9--hdfd78af_1 cc8b303fee58 20 months ago 602 MB
quay.io/biocontainers/fastqc 0.11.5--hdfd78af_5 9cd78d3e9edf 20 months ago 601 MB
quay.io/biocontainers/star 2.7.5c--0 8993688148d9 2 years ago 17.2 MB
quay.io/biocontainers/subread 1.5.0p3--0 e49b037a2f50 6 years ago 44.5 MB
However, when running the workflow, I get a log full of errors like the one below, complaining that Docker isn’t available:
[2022-11-17T14:52:17+0100] [MainThread] [I] [toil.worker] ---TOIL WORKER OUTPUT LOG---
[2022-11-17T14:52:17+0100] [MainThread] [I] [toil] Running Toil version 5.7.1-b5cae9634820d76cb6c13b2a6312895122017d54 on host OBFUSCATED.
[2022-11-17T14:52:17+0100] [MainThread] [I] [toil.worker] Working on job 'CWLJob' rna_seq_workflow_1.cwl.quality_control.fastqc_2_podman.cwl kind-CWLJob/instance-iycjn0s8 v4
[2022-11-17T14:52:18+0100] [MainThread] [I] [toil.worker] Loaded body Job('CWLJob' rna_seq_workflow_1.cwl.quality_control.fastqc_2_podman.cwl kind-CWLJob/instance-iycjn0s8 v4) from description 'CWLJob' rna_seq_workflow_1.cwl.quality_control.fastqc_2_podman.cwl kind-CWLJob/instance-iycjn0s8 v4
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
[2022-11-17T14:52:18+0100] [MainThread] [W] [toil.fileStores.abstractFileStore] Failed job accessed files:
[2022-11-17T14:52:18+0100] [MainThread] [W] [toil.fileStores.abstractFileStore] Downloaded file 'files/no-job/file-ecac9c91ada040f4bc9fe528902e71b6/GSM461177_2_subsampled.fastqsanger' to path '/tmp/76b9115df48f50138cbbb189eed16e24/9f36/f2df/tmpu1c2stxi.tmp'
Traceback (most recent call last):
File "/home/OBFUSCATED/src/novice-tutorial-exercises/env/lib/python3.10/site-packages/cwltool/job.py", line 805, in run
self.get_from_requirements(
File "/home/OBFUSCATED/src/novice-tutorial-exercises/env/lib/python3.10/site-packages/cwltool/docker.py", line 232, in get_from_requirements
if self.get_image(
File "/home/OBFUSCATED/src/novice-tutorial-exercises/env/lib/python3.10/site-packages/cwltool/docker.py", line 120, in get_image
subprocess.check_output( # nosec
File "/usr/lib/python3.10/subprocess.py", line 421, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/usr/lib/python3.10/subprocess.py", line 526, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['docker', 'images', '--no-trunc', '--all']' returned non-zero exit status 1.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/OBFUSCATED/src/novice-tutorial-exercises/env/lib/python3.10/site-packages/toil/worker.py", line 407, in workerScript
job._runner(jobGraph=None, jobStore=jobStore, fileStore=fileStore, defer=defer)
File "/home/OBFUSCATED/src/novice-tutorial-exercises/env/lib/python3.10/site-packages/toil/job.py", line 2406, in _runner
returnValues = self._run(jobGraph=None, fileStore=fileStore)
File "/home/OBFUSCATED/src/novice-tutorial-exercises/env/lib/python3.10/site-packages/toil/job.py", line 2324, in _run
return self.run(fileStore)
File "/home/OBFUSCATED/src/novice-tutorial-exercises/env/lib/python3.10/site-packages/toil/cwl/cwltoil.py", line 2209, in run
output, status = ToilSingleJobExecutor().execute(
File "/home/OBFUSCATED/src/novice-tutorial-exercises/env/lib/python3.10/site-packages/cwltool/executors.py", line 143, in execute
self.run_jobs(process, job_order_object, logger, runtime_context)
File "/home/OBFUSCATED/src/novice-tutorial-exercises/env/lib/python3.10/site-packages/toil/cwl/cwltoil.py", line 930, in run_jobs
return super().run_jobs(process, job_order_object, logger, runtime_context)
File "/home/OBFUSCATED/src/novice-tutorial-exercises/env/lib/python3.10/site-packages/cwltool/executors.py", line 251, in run_jobs
job.run(runtime_context)
File "/home/OBFUSCATED/src/novice-tutorial-exercises/env/lib/python3.10/site-packages/cwltool/job.py", line 856, in run
raise WorkflowException(
cwltool.errors.WorkflowException: Docker is not available for this tool, try --no-container to disable Docker, or install a user space Docker replacement like uDocker with --user-space-docker-cmd.: Command '['docker', 'images', '--no-trunc', '--all']' returned non-zero exit status 1.
[2022-11-17T14:52:18+0100] [MainThread] [E] [toil.worker] Exiting the worker because of a failed job on host OBFUSCATED
Has anyone experienced something similar and knows a solution? Currently testing on WSL2 with Ubuntu 20.04.
Thanks!