How to run Picard docker image
2
0
Entering edit mode
5.2 years ago
elcortegano ▴ 200

I'm trying to run Picard CreateSequenceDictionary using the docker image provided by the Broadinstitute (here), but |I'm having troubles when running it, and don't understand why.

I download and run it as:

docker pull broadinstitute/picard
docker run --rm -v $PWD:/usr/working broadinstitute/picard CreateSequenceDictionary R=ref.fa.gz O=ref.fa.gz.dict

But this returns an error:

docker: Error response from daemon: OCI runtime create failed: container_linux.go:345: starting container process caused "exec: \"CreateSequenceDictionary\": executable file not found in $PATH": unknown.

If the image is run without specifying the command (e.g. without CreateSequenceDictionary and the arguments) nothing is returned.

Does anybody know how to run this image properly?

EDIT

The docker image even does not work if a change the Dockerfile provided in the official Github repository and add an entrypoint to the executable:

ENTRYPOINT ["/usr/local/openjdk-8/bin/java -jar /usr/picard/picard.jar"]

However, the original image will work with the command used in the entrypoint if the image is run interactively (with -i -t options), which is not how I want to run it.

This time, with the entrypoint, the error is:

docker: Error response from daemon: OCI runtime create failed: container_linux.go:345: starting container process caused "exec: \"/usr/local/openjdk-8/bin/java -jar /usr/picard/picard.jar\": stat /usr/local/openjdk-8/bin/java -jar /usr/picard/picard.jar: no such file or directory": unknown.

Any ideas on how make it work?

next-gen alignment docker picard • 4.2k views
ADD COMMENT
0
Entering edit mode
5.2 years ago
elcortegano ▴ 200

The problem was this was with the syntax for the ENTRYPOINT, if fixed to this:

ENTRYPOINT ["java","-jar,"/usr/picard/picard.jar"]

This can be seen at docker documentation: https://docs.docker.com/engine/reference/builder/#entrypoint.

If this line is added to the picard Dockerfile provided by the Broadinstitute, the resulting docker image will run non-interactively as:

docker run --rm -v $PWD:/usr/working picard CreateSequenceDictionary R=genome.fa O=genome.fa.dict

(For example).

ADD COMMENT
1
Entering edit mode
17 months ago
geocarvalho ▴ 390

I had the same issue, but I found out in the previous GitHub issues that it was made in a way to run like this:

docker run broadinstitute/picard:latest java "-Xmx60g" -jar /usr/picard/picard.jar CreateSequenceDictionary --help

Then is not necessary to change the entrypoint to build from scratch.

ADD COMMENT
0
Entering edit mode

docker run -v $PWD:$PWD quay.io/biocontainers/picard:3.2.0--hdfd78af_0 picard -Xmx3072M CreateSequenceDictionary --help

ADD REPLY

Login before adding your answer.

Traffic: 1388 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6