diff --git a/appendix b/appendix index 51287a6..2db1013 100644 --- a/appendix +++ b/appendix @@ -48,29 +48,17 @@ ENV NB_USER=${NB_USER} ## ONBUILD section. These commands are run in child Dockerfiles. These are run right after the FROM image is loaded +ONBUILD RUN echo "py-rocket-base: looking for configuration files to use" + ONBUILD USER ${NB_USER} # ${REPO_DIR} is owned by ${NB_USER} ONBUILD COPY --chown=${NB_USER}:${NB_USER} . ${REPO_DIR}/childimage -# repo2docker will load files from a .binder or binder directory if -# present. We check if those directories exist. -ONBUILD RUN echo "Checking for 'binder' or '.binder' subfolder" \ - ; cd "${REPO_DIR}/childimage/" \ - ; if [ -d binder ] ; then \ - echo "Using 'binder/' build context" \ - ; elif [ -d .binder ] ; then \ - echo "Using '.binder/' build context" \ - ; else \ - echo "Using './' build context" \ - ; fi - # Copy Desktop files into ${REPO_DIR}/Desktop if they exist. start will copy to Application dir and Desktop # Will not fail if Desktop dir exists but is empty ONBUILD RUN echo "Checking for 'Desktop directory'..." \ ; cd "${REPO_DIR}/childimage/" \ - ; [ -d binder ] && cd binder \ - ; [ -d .binder ] && cd .binder \ ; if test -d Desktop ; then \ mkdir -p "${REPO_DIR}/Desktop" && \ [ "$(ls -A Desktop 2>/dev/null)" ] && cp -r Desktop/* "${REPO_DIR}/Desktop/"; \ @@ -81,8 +69,6 @@ ONBUILD RUN echo "Checking for 'Desktop directory'..." \ ONBUILD USER root ONBUILD RUN echo "Checking for 'apt.txt'..." \ ; cd "${REPO_DIR}/childimage/" \ - ; [ -d binder ] && cd binder \ - ; [ -d .binder ] && cd .binder \ ; if test -f "apt.txt" ; then \ package_list=$(grep -v '^\s*#' apt.txt | grep -v '^\s*$' | sed 's/\r//g; s/#.*//; s/^[[:space:]]*//; s/[[:space:]]*$//' | awk '{$1=$1};1') \ && apt-get update --fix-missing > /dev/null \ @@ -97,8 +83,6 @@ ONBUILD USER ${NB_USER} # sometimes package solving will get rid of pip installed packages. Make sure jupyter-remote-desktop-proxy does not disappear ONBUILD RUN echo "Checking for 'conda-lock.yml' or 'environment.yml'..." \ ; cd "${REPO_DIR}/childimage/" \ - ; [ -d binder ] && cd binder \ - ; [ -d .binder ] && cd .binder \ ; if test -f "conda-lock.yml" ; then echo "Using conda-lock.yml" & \ conda-lock install --name ${CONDA_ENV} \ && pip install --no-deps jupyter-remote-desktop-proxy \ @@ -118,8 +102,6 @@ ONBUILD RUN echo "Checking for 'conda-lock.yml' or 'environment.yml'..." \ # to avoid wasting space. ONBUILD RUN echo "Checking for pip 'requirements.txt'..." \ ; cd "${REPO_DIR}/childimage/" \ - ; [ -d binder ] && cd binder \ - ; [ -d .binder ] && cd .binder \ ; if test -f "requirements.txt" ; then \ ${NB_PYTHON_PREFIX}/bin/pip install --no-cache -r requirements.txt \ ; fi @@ -127,8 +109,6 @@ ONBUILD RUN echo "Checking for pip 'requirements.txt'..." \ # Add the r packages ONBUILD RUN echo "Checking for 'install.R" \ ; cd "${REPO_DIR}/childimage/" \ - ; [ -d binder ] && cd binder \ - ; [ -d .binder ] && cd .binder \ ; if test -f "install.R" ; then echo "Using install.R" & \ Rscript install.R \ ; fi @@ -137,8 +117,6 @@ ONBUILD RUN echo "Checking for 'install.R" \ # This is sourced in ${REPO_DIR}/start ONBUILD RUN echo "Checking for 'start'..." \ ; cd "${REPO_DIR}/childimage/" \ - ; [ -d binder ] && cd binder && cp start ${REPO_DIR}/childimage/start \ - ; [ -d .binder ] && cd .binder && cp start ${REPO_DIR}/childimage/start \ ; if test -f "start" ; then \ chmod +x start \ ; fi @@ -149,8 +127,6 @@ ONBUILD RUN echo "Checking for 'start'..." \ # leave behind. ONBUILD RUN echo "Checking for 'postBuild'..." \ ; cd "${REPO_DIR}/childimage/" \ - ; [ -d binder ] && cd binder \ - ; [ -d .binder ] && cd .binder \ ; if test -f "postBuild" ; then \ chmod +x postBuild \ && ./postBuild \