diff --git a/.gitignore b/.gitignore index 18a36af9..a3e343cf 100644 --- a/.gitignore +++ b/.gitignore @@ -9,7 +9,7 @@ MANIFEST repo2docker/s2i -bin/ +^bin/ lib/ share/ include/ diff --git a/repo2docker/detectors.py b/repo2docker/detectors.py index b124c945..1b4797e7 100644 --- a/repo2docker/detectors.py +++ b/repo2docker/detectors.py @@ -139,7 +139,7 @@ class CondaBuildPack(S2IBuildPack): class JuliaBuildPack(S2IBuildPack): name = Unicode('julia') - build_image = Unicode('jupyterhub/singleuser-builder-julia:v0.2.2', config=True) + build_image = Unicode('jupyterhub/singleuser-builder-julia:v0.2.3', config=True) def detect(self, workdir): return os.path.exists(os.path.join(workdir, 'REQUIRE')) diff --git a/s2i-builders/julia/s2i/bin/assemble b/s2i-builders/julia/s2i/bin/assemble new file mode 100755 index 00000000..2b3f0083 --- /dev/null +++ b/s2i-builders/julia/s2i/bin/assemble @@ -0,0 +1,28 @@ +#!/bin/bash -e +# +# S2I assemble script for the jupyterhub/singleuser-builder image. +# The 'assemble' script builds your application source so that it is ready to run. +# +# For more information refer to the documentation: +# https://github.com/openshift/source-to-image/blob/master/docs/builder_image.md +# + +if [[ "$1" == "-h" ]]; then + exec /usr/libexec/s2i/usage +fi + +# Restore artifacts from the previous build (if they exist). +# +echo "---> Installing application source..." +mkdir -p ${APP_DIR}/src +cp -Rf /tmp/src/. ${APP_DIR}/src + +# HACK: We copy it to current directory too, since people wanna see the +# notebooks and stuff in there. Figure out a way to tweak this? +cp -Rf /tmp/src/. . + +echo "---> Building application from source..." +if [ -f ${APP_DIR}/src/REQUIRE ]; then + cat ${APP_DIR}/src/REQUIRE >> $JULIA_PKGDIR/v0.6/REQUIRE + julia -e "Pkg.resolve()" +fi diff --git a/s2i-builders/julia/s2i/bin/run b/s2i-builders/julia/s2i/bin/run new file mode 100755 index 00000000..cc98dccb --- /dev/null +++ b/s2i-builders/julia/s2i/bin/run @@ -0,0 +1,10 @@ +#!/bin/bash -e +# +# S2I run script for the 'ubuntu1610-python35-venv' image. +# The run script executes the server that runs your application. +# +# For more information see the documentation: +# https://github.com/openshift/source-to-image/blob/master/docs/builder_image.md +# + +exec ${APP_DIR}/venv/bin/jupyter notebook --ip=0.0.0.0 diff --git a/s2i-builders/julia/s2i/bin/save-artifacts b/s2i-builders/julia/s2i/bin/save-artifacts new file mode 100755 index 00000000..7359dfb5 --- /dev/null +++ b/s2i-builders/julia/s2i/bin/save-artifacts @@ -0,0 +1,10 @@ +#!/bin/sh -e +# +# S2I save-artifacts script for the 'ubuntu1610-python35-venv' image. +# The save-artifacts script streams a tar archive to standard output. +# The archive contains the files and folders you want to re-use in the next build. +# +# For more information see the documentation: +# https://github.com/openshift/source-to-image/blob/master/docs/builder_image.md +# +# tar cf - diff --git a/s2i-builders/julia/s2i/bin/usage b/s2i-builders/julia/s2i/bin/usage new file mode 100755 index 00000000..2aff1f76 --- /dev/null +++ b/s2i-builders/julia/s2i/bin/usage @@ -0,0 +1,12 @@ +#!/bin/bash -e +cat < ubuntu1610-python35-venv + +You can then run the resulting image via: +docker run +EOF diff --git a/s2i-builders/julia/version b/s2i-builders/julia/version index f0cfd3bb..576b7771 100644 --- a/s2i-builders/julia/version +++ b/s2i-builders/julia/version @@ -1 +1 @@ -v0.2.2 +v0.2.3 diff --git a/setup.py b/setup.py index f38bc0a3..7af489ac 100644 --- a/setup.py +++ b/setup.py @@ -92,7 +92,7 @@ else: setup( name='jupyter-repo2docker', - version='0.2.9', + version='0.2.10', install_requires=[ 'docker', 'traitlets',