Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using Docker Stages to support no-argument docker bulding #6764

Merged
merged 20 commits into from
Aug 31, 2020

Conversation

jamesemery
Copy link
Collaborator

Running just "docker build ." in a gatk clone works with this branch. Unfortunately unless you then run a prune command you will end up with a 9 GB "waste" docker image from the first stage leftover. The build.docker script handles this situation by deleting the intermediate stage using tags...

Fixes #6747

@jamesemery
Copy link
Collaborator Author

Now to begin the process of making the travis tests work on this branch....

@fleharty
Copy link
Contributor

Nifty, I learned about docker system prune...
Total reclaimed space: 9.254GB

@gatk-bot
Copy link

Travis reported job failures from build 31190
Failures in the following jobs:

Test Type JDK Job ID Logs
cloud openjdk11 31190.14 logs

@gatk-bot
Copy link

gatk-bot commented Aug 24, 2020

Travis reported job failures from build 31195
Failures in the following jobs:

Test Type JDK Job ID Logs
cloud openjdk11 31195.14 logs
integration openjdk8 31195.2 logs

@gatk-bot
Copy link

Travis reported job failures from build 31212
Failures in the following jobs:

Test Type JDK Job ID Logs
integration openjdk8 31212.2 logs

@gatk-bot
Copy link

Travis reported job failures from build 31215
Failures in the following jobs:

Test Type JDK Job ID Logs
integration openjdk8 31215.2 logs

@gatk-bot
Copy link

Travis reported job failures from build 31219
Failures in the following jobs:

Test Type JDK Job ID Logs
integration openjdk8 31219.2 logs

@gatk-bot
Copy link

Travis reported job failures from build 31232
Failures in the following jobs:

Test Type JDK Job ID Logs
integration openjdk11 31232.12 logs

@gatk-bot
Copy link

Travis reported job failures from build 31239
Failures in the following jobs:

Test Type JDK Job ID Logs
integration openjdk11 31239.12 logs

@jamesemery jamesemery force-pushed the je_makeTheDockerBuildContained branch from 374b0cd to dadc7e3 Compare August 27, 2020 13:36
@gatk-bot
Copy link

Travis reported job failures from build 31247
Failures in the following jobs:

Test Type JDK Job ID Logs
integration openjdk8 31247.2 logs

@gatk-bot
Copy link

Travis reported job failures from build 31250
Failures in the following jobs:

Test Type JDK Job ID Logs
integration openjdk8 31250.2 logs

@jamesemery
Copy link
Collaborator Author

@lbergelson this is finally working on travis! can you take a look and let me know your thoughts?

Copy link
Member

@lbergelson lbergelson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jamesemery Looks good but I have a few tiny comments.

.travis.yml Outdated
@@ -158,15 +158,22 @@ script:
fi;
sudo docker images;
echo ${TEST_TYPE};
sudo mkdir -p build/reports/;
sudo chmod -R a+w build/reports/;
sudo rm -r ./build;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this necessary? Just precautionary?

build_docker.sh Show resolved Hide resolved
sudo rm -r ./build;
./gradlew clean shadowTestClassJar shadowTestJar;
mkdir ./testJars;
echo $( find ./build/libs/ -name "gatk*test.jar");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add some comments here explaining what this is for?

@@ -16,8 +16,8 @@
// Asserting that Picard programs are able to pipe their output without errors
public void testPipeForPicardTools() {
File output = createTempFile("testOutput",".bam");
BaseTest.runProcess(ProcessController.getThreadLocal(), new String[]{"/bin/sh","-c"," ./gatk SortSam -I "+INPUT_BAM+" -O /dev/stdout -SO coordinate " +
"| ./gatk SetNmMdAndUqTags -I /dev/stdin -O "+ output.getAbsolutePath()+ " --CREATE_INDEX true -R "+b37_reference_20_21});//.split(" "));
BaseTest.runProcess(ProcessController.getThreadLocal(), new String[]{"/bin/sh","-c"," ${GATK_LAUNCH_SCRIPT} SortSam -I "+INPUT_BAM+" -O /dev/stdout -SO coordinate " +
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should be careful about this substitution. Can you have it default to ./gatk if it doesn't exist?


RUN export GRADLE_OPTS="-Xmx4048m -Dorg.gradle.daemon=false" && /gatk/gradlew clean collectBundleIntoDir shadowTestClassJar shadowTestJar -Drelease=$RELEASE
RUN cp -r $( find /gatk/build -name "*bundle-files-collected" )/ /gatk/unzippedJar/
RUN unzip -o -j $( find /gatk/unzippedJar -name "gatkPython*.zip" ) -d /gatk/unzippedJar/scripts
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comments about the test jar would be useful to explain that it's necessary plumbing for tests but not for the build itself

@jamesemery
Copy link
Collaborator Author

@lbergelson can you re-review? i have responded to your comments

@lbergelson
Copy link
Member

@jamesemery Did you forget to push some changes? I don't see any of the comments I asked for or the changes to what happens when the GATK_LAUNCH_SCRIPT is null.

Copy link
Member

@lbergelson lbergelson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jamesemery Looks good to me. 👍 when travis gives it the all clear

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make GATK docker buildable via a simple "docker build", with no required extra arguments
4 participants