Commit 5eed02bb authored by Hahn, Steven's avatar Hahn, Steven
Browse files

Sunny 0.3.0

parent 904b2475
Loading
Loading
Loading
Loading
+15 −7
Original line number Diff line number Diff line
from jupyter-notebook:latest
from savannah.ornl.gov/gravitas/jupyter-notebook:25.2.1

run apt-get update -y && \
    apt-get upgrade -y && \
@@ -6,18 +6,23 @@ run apt-get update -y && \

user jovyan

#ENV JULIA_CPU_TARGET="generic;sandybridge,-xsaveopt,clone_all;haswell,-rdrnd,base(1);x86-64-v4,-rdrnd,base(1)"
ENV JULIA_CPU_TARGET="x86-64-v3"
run julia -e 'using Pkg; Pkg.Registry.update(); \
    Pkg.add([Pkg.PackageSpec(;name="JLLWrappers", version="1.7.0"), \
             Pkg.PackageSpec(;name="Sunny", version="0.7.5"), \
             Pkg.PackageSpec(;name="WGLMakie"), \
             Pkg.PackageSpec(;name="MKL"), \
             Pkg.PackageSpec(;name="WGLMakie"), \
             Pkg.PackageSpec(;name="PackageCompiler"), \
             Pkg.PackageSpec(;url="https://github.com/quantumsteve/Bonito.jl",rev="jupyter_base_url")]); \
     using PackageCompiler, IJulia, Sunny, WGLMakie, MKL; \
     create_sysimage([:IJulia, :Sunny, :WGLMakie, :MKL], sysimage_path="/home/jovyan/sys_flux_plots.so", cpu_target=ENV["JULIA_CPU_TARGET"]); \
     IJulia.installkernel("Julia Sunny WGLMakie", "--sysimage=/home/jovyan/sys_flux_plots.so")'
             Pkg.PackageSpec(;url="https://github.com/quantumsteve/Bonito.jl",rev="jupyter_base_url")])'

ADD precompile ./precompile

run julia -e 'using PackageCompiler; \
    create_sysimage(["IJulia", "Sunny", "WGLMakie", "MKL"], \
                      sysimage_path="/home/jovyan/sys_flux_plots.so", \
                      precompile_execution_file=["precompile/01_LSWT_CoRh2O4.jl", "precompile/02_LLD_CoRh2O4.jl"], \
                      cpu_target=ENV["JULIA_CPU_TARGET"])'
run julia -e 'using IJulia; IJulia.installkernel("Julia Sunny WGLMakie", "--sysimage=/home/jovyan/sys_flux_plots.so")'

# Move the kernelspec out of ${HOME} to the system share location.
# Avoids problems with runtime UID change not taking effect properly
@@ -30,6 +35,9 @@ run fix-permissions "${JULIA_PKGDIR}" "${CONDA_DIR}/share/jupyter"
run chmod -R 777 /opt/julia

user root

run rm -rf precompile

COPY examples ./examples
run chmod -R 777 examples