ICGC-TCGA-PanCancer / CGP-Somatic-Docker

Dockerised and simplified version of SeqWare-CGP-SomaticCore
GNU Affero General Public License v3.0
14 stars 9 forks source link

System wide Java is 1.7, not 1.8 as required by Dockstore #9

Closed brainstorm closed 7 years ago

brainstorm commented 7 years ago

While Java 1.8 seems installed in the docker image itself, the running version is Java 1.7. This situation turns out to be a problem when running dockstore.

The default java version in the $PATH when instantiating the container via docker run -it quay.io/pancancer/pcawg-sanger-cgp-workflow /bin/bashis:

root@f291760055fd:~/CGP-Somatic-Docker# java -version
java version "1.7.0_95"
OpenJDK Runtime Environment (IcedTea 2.6.4) (7u95-2.6.4-0ubuntu0.12.04.2)
OpenJDK 64-Bit Server VM (build 24.95-b01, mixed mode)

And while this repo's .travis.yml does run Oracle's JDK 1.8 when testing, it doesn't seem to be selected system-wide, yet it could be set in the Dockerfile easily via update-alternatives:

root@f291760055fd:~/CGP-Somatic-Docker# update-alternatives --set java /usr/lib/jvm/java-8-oracle/jre/bin/java
update-alternatives: using /usr/lib/jvm/java-8-oracle/jre/bin/java to provide /usr/bin/java (java) in manual mode.
root@f291760055fd:~/CGP-Somatic-Docker# java -version
java version "1.8.0_72"
Java(TM) SE Runtime Environment (build 1.8.0_72-b15)
Java HotSpot(TM) 64-Bit Server VM (build 25.72-b15, mixed mode)

May I send a pull request with those changes in mind?

brainstorm commented 7 years ago

The changes in the Dockerfile are namely:

-RUN mkdir -p /tmp/downloads $OPT/bin $OPT/etc $OPT/lib $OPT/share
+RUN mkdir -p /tmp/downloads $OPT/bin $OPT/etc $OPT/lib $OPT/share && update-alternatives --set java /usr/lib/jvm/java-8-oracle/jre/bin/java
 WORKDIR /tmp/downloads

Testing it doesn't break anything else right now...

denis-yuen commented 7 years ago

Hi, @brainstorm Following up on https://github.com/ga4gh/dockstore/issues/469#issuecomment-259168229 I think there may be a miscommunication here.

Normally the Dockstore command-line runs on the host, which starts a Docker container ( quay.io/pancancer/pcawg-sanger-cgp-workflow in this case). The version of Java inside the container is not relevant since the command-line is running on the host.

In your case, it looks like you're starting the CGP container interactively and then running the Dockstore command-line inside it, which isn't really what we intended.

brainstorm commented 7 years ago

Argh, I see, thanks @denis-yuen for the clarifications... I'll then both install oracle-8 JDK and cwltool in the host then, sorry for the confusion :/

denis-yuen commented 7 years ago

No worries, you may also wish to take a look at https://dockstore.org/onboarding which notes the version of cwltool that we tested with.