From 3687dd338781ec758b9a496cfae68f77cdb50f80 Mon Sep 17 00:00:00 2001 From: Peter Parente Date: Sun, 25 Mar 2018 16:02:52 -0400 Subject: [PATCH 1/2] Add TEST_ONLY_BUILD arg --- .travis.yml | 2 +- datascience-notebook/Dockerfile | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index ce3802db..a2c47941 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,4 +7,4 @@ services: install: - make test-reqs script: - - make build-test-all + - make build-test-all DARGS="--build-arg BUILD_TEST_ONLY=1" diff --git a/datascience-notebook/Dockerfile b/datascience-notebook/Dockerfile index 5175f4a5..e6956dfa 100644 --- a/datascience-notebook/Dockerfile +++ b/datascience-notebook/Dockerfile @@ -4,6 +4,10 @@ FROM jupyter/scipy-notebook LABEL maintainer="Jupyter Project " +# Set when building on Travis so that certain long-running build steps can +# be skipped to shorten build time. +ARG TEST_ONLY_BUILD + USER root # R pre-requisites @@ -65,13 +69,16 @@ RUN conda config --system --append channels r && \ fix-permissions $CONDA_DIR && \ fix-permissions /home/$NB_USER -# Add Julia packages +# Add Julia packages. Only add HDF5 if this is not a test-only build since +# it takes roughly half the entire build time of all of the images on Travis +# to add this one package and often causes Travis to timeout. +# # Install IJulia as jovyan and then move the kernelspec out # to the system share location. Avoids problems with runtime UID change not # taking effect properly on the .local folder in the jovyan home dir. RUN julia -e 'Pkg.init()' && \ julia -e 'Pkg.update()' && \ - julia -e 'Pkg.add("HDF5")' && \ + (test $TEST_ONLY_BUILD || julia -e 'Pkg.add("HDF5")') && \ julia -e 'Pkg.add("Gadfly")' && \ julia -e 'Pkg.add("RDatasets")' && \ julia -e 'Pkg.add("IJulia")' && \ From e29efb73dc62cc7dbc7df4c39bf833b36314f9c5 Mon Sep 17 00:00:00 2001 From: Peter Parente Date: Sun, 25 Mar 2018 16:57:06 -0400 Subject: [PATCH 2/2] Fix arg name mismatch --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index a2c47941..723ffb62 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,4 +7,4 @@ services: install: - make test-reqs script: - - make build-test-all DARGS="--build-arg BUILD_TEST_ONLY=1" + - make build-test-all DARGS="--build-arg TEST_ONLY_BUILD=1"