common-workflow-language / common-workflow-language/cwltool

Some Docker containers put executable in /tmp which interferes with our mounting a different directory to /tmp

Open
#1,003 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
376
Forks
255
Avg merge
2d 7h
Merged PRs (30d)
12

Description

The docker biocontainer at https://hub.docker.com/r/biocontainers/fastqc/ is installing an executable in the image's tmp directory; this is overwritten at run time by CWL, causing the executable to be unfindable. Should there be some improved behaviour to avoid this issue in the future, other than depending on containers to install software correctly?

CWL:
``` cwl
class: CommandLineTool
cwlVersion: v1.0
baseCommand: fastqc
inputs:
- id: fastq
type: File
inputBinding:
position: 2
doc: FastQ file from next-generation sequencers
outputs:
- id: qc
type: File
outputBinding:
glob: $(inputs.fastq.basename)_fastqc.html
label: fastqc
arguments:
- position: 1
prefix: -o
valueFrom: .
hints:
- class: DockerRequirement
dockerPull: 'biocontainers/fastqc:0.11.5'
```

EXECUTION ERROR LOG
```
../cwltool/cwltool.py 1.0.20181201184214
Resolved 'fastqc.cwl' to 'file:///Users/hachiya/Projects/cwl/test/fastqc.cwl'
[job fastqc.cwl] /private/tmp/docker_tmp2n7jVv$ docker \
run \
-i \
--volume=/private/tmp/docker_tmp2n7jVv:/GBeTqb:rw \
--volume=/private/var/folders/xq/lfrhc_kx6s399r5brzbt2n0m0000gn/T/tmp01vkkV:*/tmp:rw* \
--volume=/Users/hachiya/Projects/cwl/G1K/NA18942/Phase3/Exome/ERR034597.filt.fastq:/var/lib/cwl/stg4cee5fcb-0c36-4612-8e3d-9aa4b95521ff/ERR034597.filt.fastq:ro \
--workdir=/GBeTqb \
--read-only=true \
--user=501:20 \
--rm \
--env=TMPDIR=/tmp \
--env=HOME=/GBeTqb \
biocontainers/fastqc:0.11.5 \
fastqc \
/var/lib/cwl/stg4cee5fcb-0c36-4612-8e3d-9aa4b95521ff/ERR034597.filt.fastq
docker: Error response from daemon: OCI runtime create failed: container_linux.go:348: starting container process caused "exec: \"fastqc\": executable file not found in $PATH": unknown.
[job fastqc.cwl] Job error:
Error collecting output for parameter 'qc':
fastqc.cwl:16:7: Did not find output file with glob pattern: '['index.html']'
[job fastqc.cwl] completed permanentFail
{}
Final process status is permanentFail
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.