kopia lustrzana https://github.com/jupyterhub/repo2docker
27 wiersze
853 B
Bash
Executable File
27 wiersze
853 B
Bash
Executable File
#!/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..."
|
|
# 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 environment.yml ]; then
|
|
conda env update -n root -f environment.yml
|
|
conda clean -tipsy
|
|
elif [ -f requirements.txt ]; then
|
|
pip install -r requirements.txt
|
|
fi
|