diff --git a/.binder/Dockerfile b/.binder/Dockerfile index 373884b9..403044e3 100644 --- a/.binder/Dockerfile +++ b/.binder/Dockerfile @@ -140,21 +140,9 @@ RUN julia -e 'import Pkg; Pkg.add("MKL_jll"); using MKL_jll;' # install Cropbox-related packages RUN julia -e 'using Pkg; pkg"add CropRootBox Garlic LeafGasExchange SimpleCrop";' -# create a system image with Cropbox built-in -ENV CROPBOX_IMG=${CROPBOX_DIR}/cropbox.so -RUN julia -e 'import Pkg; Pkg.add("PackageCompiler"); using PackageCompiler; create_sysimage(:Cropbox; sysimage_path="'${CROPBOX_IMG}'", precompile_execution_file="'${REPO_DIR}'/.binder/precompile.jl", cpu_target=PackageCompiler.default_app_cpu_target());' || exit 1 - -# update IJulia kernel with custom system image -RUN julia -e 'using IJulia; installkernel("Julia", "--project='${HOME}'", "--sysimage='${CROPBOX_IMG}'");' - # clean up as root USER root -# create a wrapper for Julia REPL with custom system image -RUN rm /usr/local/bin/julia && \ - echo -e '#!/bin/bash\n/opt/julia-'${JULIA_VERSION}'/bin/julia -J'${CROPBOX_IMG} '"$@"' > /usr/local/bin/julia && \ - chmod +x /usr/local/bin/julia - RUN chown -R ${NB_USER}:users ${HOME} && \ chown -R ${NB_USER}:users ${JULIA_DEPOT_PATH}