Skip to content

Commit

Permalink
Merge pull request #16 from gaelforget/v0p2p2d
Browse files Browse the repository at this point in the history
V0p2p2d
  • Loading branch information
gaelforget authored Apr 19, 2024
2 parents 86da918 + 31e1216 commit 79ebd3f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
9 changes: 4 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ RUN cp ${mainpath}/src/setup.py ${mainpath}/setup.py
RUN cp ${mainpath}/src/runpluto.sh ${mainpath}/runpluto.sh
RUN cp ${mainpath}/src/Project.toml ${mainpath}/Project.toml

ENV USER_HOME_DIR /home/${NB_USER}
RUN echo 'alias julia="${USER_HOME_DIR}/.juliaup/bin/julia"' >> ~/.bashrc
ENV HOM /home/${NB_USER}
RUN echo 'alias julia="${HOM}/.juliaup/bin/julia --project=${HOM}"' >> ~/.bashrc

RUN conda config --env --add channels conda-forge
RUN conda config --env --add channels r
Expand All @@ -50,8 +50,8 @@ RUN conda install octave_kernel texinfo r-irkernel

RUN curl -fsSL https://install.julialang.org | sh -s -- --yes

RUN ${USER_HOME_DIR}/.juliaup/bin/julia --project=${mainpath} -e "import Pkg; Pkg.instantiate();"
RUN ${USER_HOME_DIR}/.juliaup/bin/julia --project=${mainpath} ${mainpath}/src/warmup.jl
RUN ${HOM}/.juliaup/bin/julia --project=${HOM} -e "import Pkg; Pkg.instantiate();"
RUN ${HOM}/.juliaup/bin/julia --project=${HOM} ${HOM}/src/warmup.jl

ENV MPI_INC_DIR /usr/lib/x86_64-linux-gnu/openmpi/include

Expand All @@ -60,4 +60,3 @@ RUN jupyter lab build && \
pip install ${mainpath} --no-cache-dir && \
rm -rf ~/.cache


11 changes: 8 additions & 3 deletions src/warmup.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ MC=MITgcm.MITgcm_config(inputs=MITgcm.read_toml(fil))
ClimateModels.setup(MC)
ClimateModels.build(MC)

mv(joinpath(MC,"MITgcm/mysetups/ECCOv4/build/mitgcmuv"),"mitgcmuv")
cp(joinpath(dirname(p0),"..","examples","configurations","ECCO4.toml"),"src/ECCO4.toml")
cp(joinpath(dirname(p0),"..","examples","configurations","OCCA2.toml"),"src/OCCA2.toml")
cp(joinpath(MC,"MITgcm/mysetups/ECCOv4/input/download_files.jl"),"src/download_files.jl")

mv(joinpath(MC,"MITgcm/mysetups/ECCOv4/build/mitgcmuv"),"src/mitgcmuv")
rm(pathof(MC),recursive=true)

##
Expand All @@ -35,8 +39,9 @@ Downloads.download(

##

run(`$(git()) clone https://github.com/gaelforget/OceanStateEstimation.jl`)
nb=joinpath(ENV["HOME"],"OceanStateEstimation.jl/examples/ECCO/ECCO_standard_plots.jl")
pth=joinpath(ENV["HOME"],"src","OceanStateEstimation.jl")
run(`$(git()) clone https://github.com/gaelforget/OceanStateEstimation.jl $pth`)
nb=joinpath(pth,"examples/ECCO/ECCO_standard_plots.jl")
Pluto.activate_notebook_environment(nb)
Pkg.instantiate()
include(nb)
Expand Down

0 comments on commit 79ebd3f

Please sign in to comment.